public abstract class AbstractProblem extends AbstractComponent
AbstractRepresentation
.
After evaluating the given candidate representation it is highly recommended to
call the representation's setFitness(double fitness)
method.
Currently, there are two types (subclasses) of problems:
AbstractSingleProblem
: a problem which can assign a definite fitness value to individual solution candidates.
AbstractMultiProblem
: a problem which can only establish a rank of candidates with decreasing performance.
Constructor and Description |
---|
AbstractProblem() |
Modifier and Type | Method and Description |
---|---|
java.util.Hashtable<java.lang.String,XMLFieldEntry> |
adjustRequirements(java.util.Hashtable<java.lang.String,XMLFieldEntry> requirements,
java.util.Hashtable<java.lang.String,XMLFieldEntry> properties)
Adjusts and returns the requirements of this problem that is modified according to the properties.
|
java.util.Random |
getRandom()
Returns the random generator object of this problem.
|
void |
setRandom(java.util.Random generator)
Sets the random generator of this class to the given value.
|
getProperties, getPropertyValue, getTypeOfProperty, getXMLData, setProperties, setXMLData
public java.util.Random getRandom()
public void setRandom(java.util.Random generator)
generator
- The new random generator to be used.public java.util.Hashtable<java.lang.String,XMLFieldEntry> adjustRequirements(java.util.Hashtable<java.lang.String,XMLFieldEntry> requirements, java.util.Hashtable<java.lang.String,XMLFieldEntry> properties)
requirements
- The set of requirement keys and values read from the source XML file.properties
- The set of property keys and values.