Class ScenarioCreator

java.lang.Object
repast.simphony.scenario.ScenarioCreator

public class ScenarioCreator extends Object
Creates a scenario.xml file.
Version:
$Revision$ $Date$
Author:
Nick Collier
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScenarioCreator(File modelPath, File scenarioPath)
    Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path.
    ScenarioCreator(File modelPath, File scenarioPath, boolean useModelPlugin)
    Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
    ScenarioCreator(File modelPath, File scenarioPath, String modelInitializerClass)
    Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
    ScenarioCreator(File modelPath, File scenarioPath, String modelInitializerClass, boolean useModelPlugin)
    Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the specified ScenarioCreatorPlugin that will be run during scenario creation.
    void
    Create the scenario.
    static void
    Statically register a strategy.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScenarioCreator

      public ScenarioCreator(File modelPath, File scenarioPath)
      Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path.
      Parameters:
      modelPath -
      scenarioPath -
    • ScenarioCreator

      public ScenarioCreator(File modelPath, File scenarioPath, String modelInitializerClass)
      Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
      Parameters:
      modelPath -
      scenarioPath -
      modelInitializerClass -
    • ScenarioCreator

      public ScenarioCreator(File modelPath, File scenarioPath, boolean useModelPlugin)
      Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
      Parameters:
      modelPath -
      scenarioPath -
      useModelPlugin - if true, a model plugin entry is added to the scenario.xml file.
    • ScenarioCreator

      public ScenarioCreator(File modelPath, File scenarioPath, String modelInitializerClass, boolean useModelPlugin)
      Creates a ScenarioCreator that will create a scenario.xml in the specified scenario path, copying a model.score file from the model path and using the specified modelInitializer.
      Parameters:
      modelPath -
      scenarioPath -
      modelInitializerClass -
      useModelPlugin - if true, a model plugin entry is added to the scenario.xml file.
  • Method Details

    • registerExtension

      public static void registerExtension(ScenarioCreatorExtension extension)
      Statically register a strategy. The strategy will be added to any instance of a ScenarioCreator when it is created.
      Parameters:
      extension - the strategy to register.
    • addExtension

      public void addExtension(ScenarioCreatorExtension extension)
      Adds the specified ScenarioCreatorPlugin that will be run during scenario creation.
      Parameters:
      extension -
    • createScenario

      public void createScenario() throws Exception, org.apache.velocity.exception.ParseErrorException
      Create the scenario.
      Throws:
      Exception
      org.apache.velocity.exception.ParseErrorException