Package repast.simphony.parameter.bsf
Class ScriptRunner
- java.lang.Object
-
- repast.simphony.parameter.bsf.ScriptRunner
-
- All Implemented Interfaces:
SweeperProducer
public class ScriptRunner extends Object implements SweeperProducer
Runs a bsf script to set up a parameter sweep. This puts a ParameterSweepBuilder with the variable name 'builder' into the script's execution space.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description ScriptRunner(File file)
Creates a ScriptRunner to run the specified file.ScriptRunner(RunResultProducer producer, File file)
Creates a ScriptRunner to run the specified file using the specified RunResultProducer to optimize the parameters.ScriptRunner(RunResultProducer producer, AdvancementChooser chooser, File file)
Creates a ScriptRunner to run the specified file using the specified RunResultProducer, and AdvancementChooser to optimize the parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parameters
getParameters()
Gets the Parameters created by the script via the ParameterSweeperBuilder.ParameterTreeSweeper
getParameterSweeper()
Gets the ParameterTreeSweeper reated by the script via the ParameterSweeperBuilder.void
init(ControllerRegistry registry, Object masterContextId)
Initializes the producer with the controller registry and master context id.
-
-
-
Constructor Detail
-
ScriptRunner
public ScriptRunner(RunResultProducer producer, File file)
Creates a ScriptRunner to run the specified file using the specified RunResultProducer to optimize the parameters.- Parameters:
producer
- the producer to usefile
- the file to run
-
ScriptRunner
public ScriptRunner(RunResultProducer producer, AdvancementChooser chooser, File file)
Creates a ScriptRunner to run the specified file using the specified RunResultProducer, and AdvancementChooser to optimize the parameters.- Parameters:
producer
- the producer to usechooser
- the chooser to usefile
- the file to run
-
ScriptRunner
public ScriptRunner(File file)
Creates a ScriptRunner to run the specified file.- Parameters:
file
- the file to run
-
-
Method Detail
-
init
public void init(ControllerRegistry registry, Object masterContextId)
Initializes the producer with the controller registry and master context id.- Specified by:
init
in interfaceSweeperProducer
- Parameters:
registry
-masterContextId
-
-
getParameters
public Parameters getParameters() throws IOException
Gets the Parameters created by the script via the ParameterSweeperBuilder.- Specified by:
getParameters
in interfaceSweeperProducer
- Returns:
- the Parameters created by the script via the ParameterSweeperBuilder.
- Throws:
IOException
-
getParameterSweeper
public ParameterTreeSweeper getParameterSweeper() throws IOException
Gets the ParameterTreeSweeper reated by the script via the ParameterSweeperBuilder.- Specified by:
getParameterSweeper
in interfaceSweeperProducer
- Returns:
- the ParameterTreeSweeper reated by the script via the ParameterSweeperBuilder.
- Throws:
IOException
-
-