|
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.algorithm.jmetal.JMetalAlgorithmAdapter
public class JMetalAlgorithmAdapter
Adapter for JMetal algorithms. This allows JMetal algorithms to be used
within the MOEA Framework as an Algorithm.
| Constructor Summary | |
|---|---|
JMetalAlgorithmAdapter(jmetal.core.Algorithm algorithm,
JMetalProblemAdapter problem)
Constructs an adapter for the specified JMetal algorithm. |
|
| Method Summary | |
|---|---|
void |
evaluate(Solution solution)
Evaluates the specified solution for the problem being solved by this algorithm. |
int |
getNumberOfEvaluations()
Returns the number of times the evaluate method was invoked. |
Problem |
getProblem()
Returns the problem being solved by this algorithm. |
NondominatedPopulation |
getResult()
Returns the current best-known result. |
Serializable |
getState()
Throws NotSerializableException since JMetal algorithms are
currently not serializable. |
boolean |
isTerminated()
Returns true if this algorithm is terminated; false
otherwise. |
void |
setState(Object state)
Throws NotSerializableException since JMetal algorithms are
currently not serializable. |
void |
step()
Performs one logical step of this algorithm. |
void |
terminate()
Terminates this algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMetalAlgorithmAdapter(jmetal.core.Algorithm algorithm,
JMetalProblemAdapter problem)
algorithm - the JMetal algorithm| Method Detail |
|---|
public void evaluate(Solution solution)
Algorithm
evaluate in interface Algorithmsolution - the solution to be evaluatedProblem.evaluate(Solution)public int getNumberOfEvaluations()
Algorithmevaluate method was invoked. This
is the primary measure of runtime for optimization algorithms.
getNumberOfEvaluations in interface Algorithmevaluate method was invokedpublic Problem getProblem()
Algorithm
getProblem in interface Algorithmpublic NondominatedPopulation getResult()
Algorithm
getResult in interface Algorithmpublic void step()
Algorithm
This method should not be invoked when Algorithm.isTerminated() returns
true.
step in interface Algorithmpublic boolean isTerminated()
Algorithmtrue if this algorithm is terminated; false
otherwise.
isTerminated in interface Algorithmtrue if this algorithm is terminated; false
otherwiseAlgorithm.terminate()public void terminate()
AlgorithmAlgorithm.getResult() and
Algorithm.getNumberOfEvaluations() methods are still required to work
after termination.
terminate in interface Algorithm
public Serializable getState()
throws NotSerializableException
NotSerializableException since JMetal algorithms are
currently not serializable.
getState in interface AlgorithmSerializable object representing the internal state of
this algorithm
NotSerializableException - if this algorithm does not support
serialization
public void setState(Object state)
throws NotSerializableException
NotSerializableException since JMetal algorithms are
currently not serializable.
setState in interface Algorithmstate - the internal state of this algorithm
NotSerializableException - if this algorithm does not support
serialization
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||