repast.simphony.scenario
Class Scenario
java.lang.Object
repast.simphony.scenario.Scenario
- Direct Known Subclasses:
- BatchScenario
public class Scenario
- extends Object
Encapsulates a repast simphony scenario.
- Author:
- Nick Collier
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Scenario
public Scenario(File file,
ContextData context,
UserPathData modelData)
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)