public interface Algorithm extends Stateful
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
isTerminated()
Returns
true if this algorithm is terminated; false
otherwise. |
default void |
run(int evaluations)
Executes this algorithm, terminating when it reaches a target number of function
evaluations.
|
default void |
run(TerminationCondition terminationCondition)
Executes this algorithm until the terminal condition signals it to stop.
|
void |
step()
Performs one logical step of this algorithm.
|
void |
terminate()
Terminates this algorithm.
|
checkTypeSafety, getState, loadState, saveState, setState, writeTypeSafety
Problem getProblem()
NondominatedPopulation getResult()
void step()
This method should not be invoked when isTerminated()
returns
true
.
default void run(int evaluations)
getNumberOfEvaluations()
to verify the
actual number of evaluations.evaluations
- the number of function evaluationsdefault void run(TerminationCondition terminationCondition)
terminationCondition
- the termination conditionvoid evaluate(Solution solution)
solution
- the solution to be evaluatedProblem.evaluate(Solution)
int getNumberOfEvaluations()
evaluate
method was invoked. This
is the primary measure of runtime for optimization algorithms.evaluate
method was invokedboolean isTerminated()
true
if this algorithm is terminated; false
otherwise.true
if this algorithm is terminated; false
otherwiseterminate()
void terminate()
getResult()
and
getNumberOfEvaluations()
methods are still required to work
after termination.Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.