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