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 Details

    • 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 use
      file - 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 use
      chooser - the chooser to use
      file - the file to run
    • ScriptRunner

      public ScriptRunner(File file)
      Creates a ScriptRunner to run the specified file.
      Parameters:
      file - the file to run
  • Method Details

    • init

      public void init(ControllerRegistry registry, Object masterContextId)
      Initializes the producer with the controller registry and master context id.
      Specified by:
      init in interface SweeperProducer
      Parameters:
      registry -
      masterContextId -
    • getParameters

      public Parameters getParameters() throws IOException
      Gets the Parameters created by the script via the ParameterSweeperBuilder.
      Specified by:
      getParameters in interface SweeperProducer
      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 interface SweeperProducer
      Returns:
      the ParameterTreeSweeper reated by the script via the ParameterSweeperBuilder.
      Throws:
      IOException