Class OptimizedParameterSweeper.DefaultAdvanceChooser
- java.lang.Object
-
- repast.simphony.parameter.optimizer.OptimizedParameterSweeper.DefaultAdvanceChooser
-
- All Implemented Interfaces:
AdvancementChooser
- Enclosing class:
- OptimizedParameterSweeper
public static class OptimizedParameterSweeper.DefaultAdvanceChooser extends Object implements AdvancementChooser
This just goes FORWARD through the parameter space. This will traverse the space along its edges until it reaches the farthest corner from the initial coordinates.
-
-
Constructor Summary
Constructors Constructor Description DefaultAdvanceChooser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdvanceType
advanceParameter(double runResult)
AdvanceType
chooseAdvancement(ParameterSetter init, AdvanceType lastType, double runResult)
Chooses which action the parameter sweeper should apply to the given setter.boolean
shouldRevert(double runResult)
If the sweeper should revert to the parameters used before the last ones.
-
-
-
Method Detail
-
advanceParameter
public AdvanceType advanceParameter(double runResult)
-
shouldRevert
public boolean shouldRevert(double runResult)
Description copied from interface:AdvancementChooser
If the sweeper should revert to the parameters used before the last ones. For instance, if we executed 2 runs, first at (0, 0) and second at (1, 0) and the value of those runs were 100 and 50 respectively, it would most likely tell it to revert and go back to the (0, 0) parameters (because the value was "better").- Specified by:
shouldRevert
in interfaceAdvancementChooser
- Parameters:
runResult
- the result of the previous run- Returns:
- if the sweeper should revert or not
-
chooseAdvancement
public AdvanceType chooseAdvancement(ParameterSetter init, AdvanceType lastType, double runResult)
Description copied from interface:AdvancementChooser
Chooses which action the parameter sweeper should apply to the given setter.- Specified by:
chooseAdvancement
in interfaceAdvancementChooser
- Parameters:
init
- the setter that will be executedlastType
- the last executed advancement (might not be what thisAdvancementChooser
last saidrunResult
- the result of the last run (probably produced by aRunResultProducer
- Returns:
- which action the parameter sweeper should next apply
-
-