Package de.uka.ipd.sdq.tcfmoop.config
Class ParetoOptimalSetStabilityConfig
java.lang.Object
de.uka.ipd.sdq.tcfmoop.config.AbstractConfiguration
de.uka.ipd.sdq.tcfmoop.config.ParetoOptimalSetStabilityConfig
- All Implemented Interfaces:
IConfiguration
Configuration class for ParetoOptimalSetStability termination criterion.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The evaluation modes that this criterion supports. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the mode of the evaluation.int
Get the minimum number of iterations the individuals have to survive.int
Get the minimum number of individuals to survive.double
Get the minimum percentage number of individuals to survive.void
Set the evaluation mode that this criterion supports.void
setMinimumIterationsToSurvive
(int minimumIterationsToSurvive) Set the minimum number of iterations the individuals have to survive.void
setMinimumSurvivors
(int minimumSurvivors) Set the minimum number of individuals to survive.void
setMinimumSurvivorsInPercentage
(double minimumSurvivorsInPercentage) Set the minimum percentage number of individuals to survive.boolean
Checks the configuration object for correctness.Methods inherited from class de.uka.ipd.sdq.tcfmoop.config.AbstractConfiguration
getTerminationCriterionName
-
Constructor Details
-
ParetoOptimalSetStabilityConfig
public ParetoOptimalSetStabilityConfig()
-
-
Method Details
-
validateConfiguration
public boolean validateConfiguration()Checks the configuration object for correctness. Should be called before accessing any of the data of the configuration object- Returns:
- true - The configuration is correct false - The configuration is incomplete or wrong
-
setMinimumIterationsToSurvive
public void setMinimumIterationsToSurvive(int minimumIterationsToSurvive) throws InvalidConfigException Set the minimum number of iterations the individuals have to survive.- Parameters:
minimumIterationsToSurvive
- the minimum number of iterations the individuals have to survive. Number must be greater than 1- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getMinimumIterationsToSurvive
public int getMinimumIterationsToSurvive()Get the minimum number of iterations the individuals have to survive.- Returns:
- the minimum number of iterations the individuals have to survive. Is guaranteed to be at least 2.
-
setMinimumSurvivors
Set the minimum number of individuals to survive.- Parameters:
minimumSurvivors
- the minimum number of individuals to survive. Parameter must be >= 1- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getMinimumSurvivors
public int getMinimumSurvivors()Get the minimum number of individuals to survive.- Returns:
- the minimum number of individuals to survive. Number is guaranteed to be >= 1.
-
setMinimumSurvivorsInPercentage
public void setMinimumSurvivorsInPercentage(double minimumSurvivorsInPercentage) throws InvalidConfigException Set the minimum percentage number of individuals to survive.- Parameters:
minimumSurvivors
- the minimum percentage number of individuals to survive. The parameter is a percentage value and is exacted to be in the interval [0, 1].- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getMinimumSurvivorsInPercentage
public double getMinimumSurvivorsInPercentage()Get the minimum percentage number of individuals to survive.- Returns:
- the minimum number of individuals to survive. Number is guaranteed to be in the interval [0, 1].
-
setEvaluationMode
public void setEvaluationMode(ParetoOptimalSetStabilityConfig.EvaluationMode mode) throws InvalidConfigException Set the evaluation mode that this criterion supports. If mode is set to EXACT_NUMBER, then the criterion searches every time for exactly x candidates who have survived for n iterations. If PERCENTAGE is set as evaluation mode, then the number of the survived candidates is relative to the current amount of candidates in the archive. The NOT_SET value will cause a validation error of the criterion configuration object and an InvalidConfigException if this value is supplied to the set Method of the Configuration class. This value only exists as indicator that the value has not been set.- Parameters:
mode
- EXACT_NUMBER, then the criterion searches every time for exactly x candidates who have survived for n iterations. PERCENTAGE, then the number of the survived candidates is relative to the current amount of candidates in the archive NOT_SET, will result in a InvalidConfigException.- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getEvaluationMode
Returns the mode of the evaluation.- Returns:
- the mode of the evaluation. The value is guaranteed to be EXACT_NUMBER or PERCENTAGE.
-