Package org.opt4j.core.optimizer
Interface Optimizer
- All Known Implementing Classes:
AbstractOptimizer
,DifferentialEvolution
,EvolutionaryAlgorithm
,MOPSO
,RandomSearch
,SimulatedAnnealing
public interface Optimizer
This
Optimizer
interface has to be implemented by all
population-based optimizers.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds anOptimizerIterationListener
to this optimizer.void
Adds anOptimizerStateListener
to this optimizer.int
Return the current iteration.boolean
Returnstrue
if theOptimizer
is running.void
optimize()
Starts the optimization process.void
Removes anOptimizerIterationListener
from this optimizer.void
Removes anOptimizerStateListener
from this optimizer.void
This method is called once the optimization process has started.void
This method is called once the optimization process has stopped.
-
Method Details
-
optimize
Starts the optimization process.- Throws:
StopException
- if the optimization is stoppedTerminationException
- if the optimization is terminated
-
addOptimizerIterationListener
Adds anOptimizerIterationListener
to this optimizer.- Parameters:
listener
- the OptimizerIterationListener to add- See Also:
-
removeOptimizerIterationListener
Removes anOptimizerIterationListener
from this optimizer.- Parameters:
listener
- the OptimizerIterationListener to remove- See Also:
-
addOptimizerStateListener
Adds anOptimizerStateListener
to this optimizer.- Parameters:
listener
- the OptimizerStateListener to add- See Also:
-
removeOptimizerStateListener
Removes anOptimizerStateListener
from this optimizer.- Parameters:
listener
- the OptimizerStateListener to remove- See Also:
-
getIteration
int getIteration()Return the current iteration.- Returns:
- the current iteration
-
isRunning
boolean isRunning()Returnstrue
if theOptimizer
is running.- Returns:
true
if the optimizer is running
-
startOptimization
void startOptimization()This method is called once the optimization process has started. -
stopOptimization
void stopOptimization()This method is called once the optimization process has stopped.
-