Class OptimizedParameterSweeper
java.lang.Object
repast.simphony.parameter.ParameterTreeSweeper
repast.simphony.parameter.optimizer.OptimizedParameterSweeper
- All Implemented Interfaces:
ParameterSetter
,ParameterSweeper
A
ParameterSweeper
that attempts to traverse the space in an
optimized manner. This does not necessarily traverse the entire parameter space, but will be lead
through it's traversal by a traversal algorithm (a
AdvancementChooser
) which relies on a
RunResultProducer
to produce a single value for a run. This value
is the value that is optimized through the search.- Author:
- Jerry Vos
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This just goes FORWARD through the parameter space. -
Field Summary
Modifier and TypeFieldDescriptionprotected AdvancementChooser
protected boolean
protected boolean
protected ParameterSetter[]
protected int
protected AdvanceType
protected int
protected ParameterSetter
protected double
protected boolean
protected RunResultProducer
protected double
Fields inherited from class repast.simphony.parameter.ParameterTreeSweeper
firstTime, lastAddedSetter, paramTree, rootSetter, runSetter, traverser
-
Constructor Summary
ConstructorDescriptionOptimizedParameterSweeper
(ControllerRegistry registry, Object masterContextId) OptimizedParameterSweeper
(ControllerRegistry registry, Object masterContextId, OptimizedParameterSweeper.DefaultAdvanceChooser chooser) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addResultProducerAction
(ControllerRegistry registry, Object masterContextId) boolean
atEnd()
Returns true if all theParameterSetter
s have finished.protected Parameters
firstParameters
(Parameters params) protected void
boolean
protected Parameters
nextParameters
(Parameters params) void
reset
(Parameters params) Resets all the parameter initializersprotected void
void
setAdvancementChooser
(AdvancementChooser chooser) void
setFirstStepRandom
(boolean firstStepRandom) void
setResultProducer
(RunResultProducer resultProducer) Methods inherited from class repast.simphony.parameter.ParameterTreeSweeper
add, add, addDoubleRange, addIntRange, addToRoot, childrenFinished, getChildren, getRootParameterSetter, getRunCount, next, nextParameters, nextSelf, remove, resetChildren, setRunCount, toString, toStringChildren
-
Field Details
-
resultProducer
-
advancementChooser
-
firstStepRandom
protected boolean firstStepRandom -
index
protected int index -
flatTree
-
runValue
protected double runValue -
lastAdvancement
-
finished
protected boolean finished -
lastSetter
-
previousRunValue
protected double previousRunValue -
lastIndex
protected int lastIndex -
resetIndex
protected boolean resetIndex
-
-
Constructor Details
-
OptimizedParameterSweeper
-
OptimizedParameterSweeper
public OptimizedParameterSweeper(ControllerRegistry registry, Object masterContextId, OptimizedParameterSweeper.DefaultAdvanceChooser chooser)
-
-
Method Details
-
addResultProducerAction
-
flattenTree
protected void flattenTree() -
atEnd
public boolean atEnd()Description copied from class:ParameterTreeSweeper
Returns true if all theParameterSetter
s have finished.- Specified by:
atEnd
in interfaceParameterSetter
- Overrides:
atEnd
in classParameterTreeSweeper
- Returns:
- (not) all
ParameterSetter
s have finished
-
nextParameters
- Overrides:
nextParameters
in classParameterTreeSweeper
-
firstParameters
- Overrides:
firstParameters
in classParameterTreeSweeper
-
resetValues
protected void resetValues() -
reset
Description copied from class:ParameterTreeSweeper
Resets all the parameter initializers- Specified by:
reset
in interfaceParameterSetter
- Overrides:
reset
in classParameterTreeSweeper
-
getAdvancementChooser
-
setAdvancementChooser
-
isFirstStepRandom
public boolean isFirstStepRandom() -
setFirstStepRandom
public void setFirstStepRandom(boolean firstStepRandom) -
getResultProducer
-
setResultProducer
-