repast.simphony.scenario
Class Scenario

java.lang.Object
  extended by repast.simphony.scenario.Scenario
Direct Known Subclasses:
BatchScenario

public class Scenario
extends Object

Encapsulates a repast simphony scenario.

Author:
Nick Collier

Field Summary
protected  ContextData context
           
static ControllerAction DEFAULT_MASTER_PARENT
           
protected  File file
           
protected  List<ControllerAction> masterActions
           
protected  UserPathData modelData
           
protected  String modelInitName
           
protected  File modelPluginPath
           
protected  List<ParameterSetter> paramSweepers
           
protected  ControllerRegistry registry
           
static String SCENARIO_FILE_NAME
           
 
Constructor Summary
Scenario(File file, ContextData context, UserPathData modelData)
           
 
Method Summary
 void addMasterControllerAction(ControllerAction action)
          Adds the specified ControllerAction to the master context.
 void addParameterSetter(ParameterSetter paramInit)
           
 ContextData getContext()
           
 ControllerRegistry getControllerRegistry()
           
 Collection<ControllerAction> getMasterControllerActions()
          Gets all the user added master controller actions.
 UserPathData getModelData()
           
 ModelInitializer getModelInitializer()
          Instantiates and returns the first ModelInitializer found in the user's model classpath.
 String getModelInitName()
           
 File getModelPluginPath()
           
 Collection<ParameterSetter> getParameterSetters()
           
 File getScenarioDirectory()
          Gets the scenario directory.
 void removeMasterControllerAction(ControllerAction action)
          Removes the specified ControllerAction to the master context.
 void removeParameterSetter(ParameterSetter paramSetter)
           
 void setControllerRegistry(ControllerRegistry registry)
           
 void setModelInitName(String modelInitName)
           
 void setModelPluginPath(File modelPluginPath)
           
 void setScenarioDirectory(File dir)
          Sets the scenario directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MASTER_PARENT

public static final ControllerAction DEFAULT_MASTER_PARENT

SCENARIO_FILE_NAME

public static final String SCENARIO_FILE_NAME
See Also:
Constant Field Values

file

protected File file

context

protected ContextData context

modelData

protected UserPathData modelData

paramSweepers

protected List<ParameterSetter> paramSweepers

masterActions

protected List<ControllerAction> masterActions

registry

protected ControllerRegistry registry

modelInitName

protected String modelInitName

modelPluginPath

protected File modelPluginPath
Constructor Detail

Scenario

public Scenario(File file,
                ContextData context,
                UserPathData modelData)
Method Detail

getContext

public ContextData getContext()

getModelData

public UserPathData getModelData()

getModelInitializer

public ModelInitializer getModelInitializer()
                                     throws IOException,
                                            ClassNotFoundException,
                                            IllegalAccessException,
                                            InstantiationException
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)