|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.core.spi.ProblemProvider
public abstract class ProblemProvider
Defines an SPI for instantiation optimization problems. Problems are
identified by a unique name. The methods of the provider must return null if the problem is not supported by the provider.
If the provider can supply the problem but an error occurred during
instantiation, the provider may throw a ProviderNotFoundException
along with the details causing the exception.
To provide a custom ProblemProvider, first extend this class and
implement the two abstract methods. Next, build a JAR file containing the
custom provider. Within the JAR file, create the file
META-INF/services/org.moeaframework.problem.ProblemProvider
containing on a single line the class name of the custom provider. Lastly,
add this JAR file to the classpath. Once these steps are completed, the
problem(s) are now accessible via the
ProblemFactory.getProblem(String) and
ProblemFactory.getReferenceSet(String) methods.
As problems names are often used in file names, it is best to avoid
characters which are not compatible with the file system. It is suggested
that names match the following regular expression:
^[a-zA-Z0-9()\-,]+$.
| Constructor Summary | |
|---|---|
ProblemProvider()
Constructs a problem provider. |
|
| Method Summary | |
|---|---|
abstract Problem |
getProblem(String name)
Returns the problem with the specified name, or null if this
provider does not support the problem. |
abstract NondominatedPopulation |
getReferenceSet(String name)
Returns the reference set for the specified problem, or null if
this provider does not support the problem or no reference set is
available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProblemProvider()
| Method Detail |
|---|
public abstract Problem getProblem(String name)
null if this
provider does not support the problem.
name - the problem name
null if this
provider does not support the problempublic abstract NondominatedPopulation getReferenceSet(String name)
null if
this provider does not support the problem or no reference set is
available.
name - the problem name
null if
this provider does not support the problem or no reference set
is available
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||