Class Scenario

java.lang.Object
repast.simphony.scenario.Scenario
All Implemented Interfaces:
ScenarioChangedListener
Direct Known Subclasses:
BatchScenario

public class Scenario extends Object implements ScenarioChangedListener
Encapsulates a repast simphony scenario.
Author:
Nick Collier
  • Field Details

  • Constructor Details

  • Method Details

    • getContext

      public ContextData getContext()
    • getModelData

      public UserPathData getModelData()
    • getModelInitializer

      Instantiates and returns the first ModelInitializer found in the user's model classpath. If a ModelInitializer is not found, this will return an empty one.
      Returns:
      the first ModelInitializer found in the user's model classpath. If a ModelInitializer is not found, this will return an empty one.
      Throws:
      IOException - on file errors
      ClassNotFoundException - if there some error when creating the classes.
      IllegalAccessException
      InstantiationException
    • getScenarioDirectory

      public File getScenarioDirectory()
      Gets the scenario directory.
      Returns:
      the scenario directory.
    • setScenarioDirectory

      public void setScenarioDirectory(File dir)
      Sets the scenario directory.
    • addParameterSetter

      public void addParameterSetter(ParameterSetter paramInit)
    • removeParameterSetter

      public void removeParameterSetter(ParameterSetter paramSetter)
    • getParameterSetters

      public Collection<ParameterSetter> getParameterSetters()
    • addMasterControllerAction

      public void addMasterControllerAction(ControllerAction action)
      Adds the specified ControllerAction to the master context.
      Parameters:
      action - the action to add
    • removeMasterControllerAction

      public void removeMasterControllerAction(ControllerAction action)
      Removes the specified ControllerAction to the master context.
      Parameters:
      action - the action to remove
    • getMasterControllerActions

      public Collection<ControllerAction> getMasterControllerActions()
      Gets all the user added master controller actions.
      Returns:
      all the user added master controller actions.
    • setControllerRegistry

      public void setControllerRegistry(ControllerRegistry registry)
    • getControllerRegistry

      public ControllerRegistry getControllerRegistry()
    • getModelInitName

      public String getModelInitName()
    • setModelInitName

      public void setModelInitName(String modelInitName)
    • getModelPluginPath

      public File getModelPluginPath()
    • setModelPluginPath

      public void setModelPluginPath(File modelPluginPath)
    • isDirty

      public boolean isDirty()
      Gets whether or not this scenario is dirty, i.e. its current state is not saved.
      Returns:
      true if this scenario is dirty, otherwise false.
    • setDirty

      public void setDirty(boolean dirty)
      Set the dirty flag on this scenario.
    • scenarioChanged

      public void scenarioChanged(ScenarioChangedEvent evt)
      Description copied from interface: ScenarioChangedListener
      Called whenever the Scenario has changed.
      Specified by:
      scenarioChanged in interface ScenarioChangedListener