Package org.moeaframework.algorithm.sa
Class AMOSA
java.lang.Object
org.moeaframework.algorithm.AbstractAlgorithm
org.moeaframework.algorithm.sa.AbstractSimulatedAnnealingAlgorithm
org.moeaframework.algorithm.sa.AMOSA
- All Implemented Interfaces:
Extensible
,Algorithm
,Configurable
,Stateful
Implementation of the simulated annealing-based multiobjective optimization algorithm (AMOSA). AMOSA incorporates
the archive mechanism in order to provide non-dominated set of solutions so called Pareto front.
References:
- Sanghamitra Bandyopadhyay, Sriparna Saha, Ujjwal Maulik, Kalyanmoy Deb (2008). A Simulated Annealing-Based Multiobjective Optimization Algorithm: AMOSA. IEEE Transactions on Evolutionary Computation, vol. 12, no. 3, pp. 269-283.
-
Field Summary
Fields inherited from class org.moeaframework.algorithm.sa.AbstractSimulatedAnnealingAlgorithm
archive, coolingSchedule, currentPoint, initialization, initialTemperature, mutation, temperature, terminationCondition
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
-
Constructor Summary
ConstructorDescriptionCreates a new instance of the AMOSA algorithm with default settings.AMOSA
(Problem problem, Initialization initialization, Mutation mutation, double gamma, int softLimit, int hardLimit, double stoppingTemperature, double initialTemperature, double alpha, int numberOfIterationsPerTemperature, int numberOfHillClimbingIterationsForRefinement) Creates a new instance of the AMOSA algorithm. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getGamma()
Returns the gamma value.int
Returns the hard limit.int
Returns the number of hill climbing iterations for refinement.int
Returns the number of iterations performed at each temperature.int
Returns the soft limit.void
Performs any initialization that is required by this algorithm.protected void
iterate
(double temperature) Performs one iteration of this SA instance using the given temperature.void
setGamma
(double gamma) Sets the value of gamma, which determines the number of random solutions generated to fill the initial population.void
setHardLimit
(int hardLimit) Sets the hard limit, which controls the maximum size of the archive or result set at termination.void
setNumberOfHillClimbingIterationsForRefinement
(int numberOfHillClimbingIterationsForRefinement) Sets the number of hill climbing iterations to refine initial solutions.void
setNumberOfIterationsPerTemperature
(int numberOfIterationsPerTemperature) Sets the number of iterations performed at each temperature.void
setSoftLimit
(int softLimit) Sets the soft limit, which controls the maximum size that the archive can be filled before clustering is used to reduce the size to the hard limit.void
Called when the termination condition is reached and the run is complete.Methods inherited from class org.moeaframework.algorithm.sa.AbstractSimulatedAnnealingAlgorithm
getArchive, getCoolingSchedule, getCurrentPoint, getInitialization, getInitialTemperature, getMutation, getResult, getTemperature, getTerminationCondition, iterate, loadState, saveState, setArchive, setCoolingSchedule, setInitialization, setInitialTemperature, setMutation, setTerminationCondition
Methods inherited from class org.moeaframework.algorithm.AbstractAlgorithm
assertNotInitialized, evaluate, getExtensions, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, step
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.core.Algorithm
evaluateAll, evaluateAll, run, run
Methods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
Methods inherited from interface org.moeaframework.algorithm.extension.Extensible
addExtension, removeExtension
-
Constructor Details
-
AMOSA
Creates a new instance of the AMOSA algorithm with default settings.- Parameters:
problem
- the problem to solve
-
AMOSA
public AMOSA(Problem problem, Initialization initialization, Mutation mutation, double gamma, int softLimit, int hardLimit, double stoppingTemperature, double initialTemperature, double alpha, int numberOfIterationsPerTemperature, int numberOfHillClimbingIterationsForRefinement) Creates a new instance of the AMOSA algorithm.- Parameters:
problem
- the problem to solveinitialization
- the method for initializing solutionsmutation
- the mutation operatorgamma
- the gamma valuesoftLimit
- the soft limithardLimit
- the hard limitstoppingTemperature
- the stopping (minimum) temperatureinitialTemperature
- the initial (maximum) temperaturealpha
- the cooling ratenumberOfIterationsPerTemperature
- the number of iterations at each temperaturenumberOfHillClimbingIterationsForRefinement
- the number of hill climbing iterations performed on initial solutions
-
-
Method Details
-
getGamma
public double getGamma()Returns the gamma value.- Returns:
- the gamma value
-
setGamma
public void setGamma(double gamma) Sets the value of gamma, which determines the number of random solutions generated to fill the initial population. This value must be >= 1 and is typically set to 2.- Parameters:
gamma
- the gamma value
-
getSoftLimit
public int getSoftLimit()Returns the soft limit.- Returns:
- the soft limit
-
setSoftLimit
public void setSoftLimit(int softLimit) Sets the soft limit, which controls the maximum size that the archive can be filled before clustering is used to reduce the size to the hard limit.- Parameters:
softLimit
- the soft limit
-
getHardLimit
public int getHardLimit()Returns the hard limit.- Returns:
- the hard limit
-
setHardLimit
public void setHardLimit(int hardLimit) Sets the hard limit, which controls the maximum size of the archive or result set at termination.- Parameters:
hardLimit
- the hard limit
-
getNumberOfIterationsPerTemperature
public int getNumberOfIterationsPerTemperature()Returns the number of iterations performed at each temperature. Note that all iterations for the same temperature are evaluated in a single call toAbstractAlgorithm.step()
.- Returns:
- the number of iterations
-
setNumberOfIterationsPerTemperature
public void setNumberOfIterationsPerTemperature(int numberOfIterationsPerTemperature) Sets the number of iterations performed at each temperature.- Parameters:
numberOfIterationsPerTemperature
- the number of iterations
-
getNumberOfHillClimbingIterationsForRefinement
public int getNumberOfHillClimbingIterationsForRefinement()Returns the number of hill climbing iterations for refinement.- Returns:
- the number of iterations
-
setNumberOfHillClimbingIterationsForRefinement
public void setNumberOfHillClimbingIterationsForRefinement(int numberOfHillClimbingIterationsForRefinement) Sets the number of hill climbing iterations to refine initial solutions. This is only performed during initialization and, as such, this value can only be set before initialization.- Parameters:
numberOfHillClimbingIterationsForRefinement
- the number of iterations
-
initialize
public void initialize()Description copied from interface:Algorithm
Performs any initialization that is required by this algorithm. This method should only be called once, though the specific implementation may choose to no-op or throwAlgorithmInitializationException
if called multiple times.Implementations should always call
super.initialize()
to ensure the algorithm is initialized correctly.- Specified by:
initialize
in interfaceAlgorithm
- Overrides:
initialize
in classAbstractSimulatedAnnealingAlgorithm
-
iterate
protected void iterate(double temperature) Description copied from class:AbstractSimulatedAnnealingAlgorithm
Performs one iteration of this SA instance using the given temperature.- Specified by:
iterate
in classAbstractSimulatedAnnealingAlgorithm
- Parameters:
temperature
- the current temperature
-
terminate
public void terminate()Description copied from interface:Algorithm
Called when the termination condition is reached and the run is complete. This method is automatically called when usingAlgorithm.run(TerminationCondition)
, but can also be invoked directly if executing the algorithm step-by-step withAlgorithm.step()
.Implementations should always call
super.terminate()
to ensure the algorithm is terminated correctly.- Specified by:
terminate
in interfaceAlgorithm
- Overrides:
terminate
in classAbstractAlgorithm
-