public abstract class AbstractSingleProblem extends AbstractProblem
In order to provide a visualized evaluation the method replayWithVisualization(core.AbstractRepresentation)
must be overwritten.
To support requirement changes based on different parameters override the following method:
-AbstractProblem.adjustRequirements(java.util.Hashtable, java.util.Hashtable)
Constructor and Description |
---|
AbstractSingleProblem() |
Modifier and Type | Method and Description |
---|---|
double |
evaluateFitness(AbstractRepresentation candidate)
Evaluates the given representation by calculating its corresponding fitness value.
|
abstract double |
getMaximumFitness()
Returns the achievable maximum fitness of this problem.
|
void |
replayWithVisualization(AbstractRepresentation candidate)
This function is called when the user request a visual replay from the problem.
|
adjustRequirements, getRandom, setRandom
getProperties, getPropertyValue, getTypeOfProperty, getXMLData, setProperties, setXMLData
public void replayWithVisualization(AbstractRepresentation candidate)
It is recommended to use advanced threading for display like SwingWorker
.
candidate
- The candidate whose replay has been requested.public final double evaluateFitness(AbstractRepresentation candidate)
candidate
- The candidate solution to be evaluated.public abstract double getMaximumFitness()