Package repast.simphony.batch
Class BatchRunner
java.lang.Object
repast.simphony.batch.BatchRunner
- All Implemented Interfaces:
RunListener
Runs a simulation in batch mode.
- Author:
- Nick Collier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Controllerprotected Objectprotected booleanprotected SweeperProducer -
Constructor Summary
ConstructorsConstructorDescriptionBatchRunner(boolean interactive) BatchRunner(boolean interactive, int runNumber) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateScenario(BatchScenarioCreator creator) protected booleanvoidloadScenario(File scenarioDir) protected voidvoidpaused()Invoked when the current run has been paused.protected voidprintMemoryStats(String header) voidInvoked when the current run has been restarted after a pause.protected voidrun()voidRun a pre-built scenario.voidrun(BatchScenarioCreator creator) Run a scenario created from the specified BatchScenarioCreator.voidsetSweeperProducer(SweeperProducer producer) voidstarted()Invoked when the current run has been started.voidstopped()Invoked when the current run has been stopped.protected void
-
Field Details
-
controller
-
pause
protected boolean pause -
monitor
-
producer
-
-
Constructor Details
-
BatchRunner
public BatchRunner(boolean interactive) -
BatchRunner
public BatchRunner(boolean interactive, int runNumber) -
BatchRunner
public BatchRunner()
-
-
Method Details
-
getSweeperProducer
-
setSweeperProducer
-
run
Run a pre-built scenario.- Parameters:
scenarioDir-- Throws:
org.java.plugin.PluginLifecycleExceptionsaf.core.runtime.PluginDefinitionExceptionIOExceptionParserConfigurationExceptionSAXExceptionClassNotFoundExceptionIllegalAccessExceptionInstantiationExceptionIntrospectionExceptionParameterFormatExceptionScenarioLoadException
-
loadScenario
- Throws:
ScenarioLoadException
-
run
Run a scenario created from the specified BatchScenarioCreator.- Parameters:
creator- the creator- Throws:
ClassNotFoundExceptionIOException
-
createScenario
- Throws:
ClassNotFoundExceptionIOException
-
keepRunning
protected boolean keepRunning() -
run
protected void run() -
printMemoryStats
-
waitForRun
protected void waitForRun() -
notifyMonitor
protected void notifyMonitor() -
paused
public void paused()Invoked when the current run has been paused.- Specified by:
pausedin interfaceRunListener
-
restarted
public void restarted()Invoked when the current run has been restarted after a pause.- Specified by:
restartedin interfaceRunListener
-
started
public void started()Invoked when the current run has been started.- Specified by:
startedin interfaceRunListener
-
stopped
public void stopped()Invoked when the current run has been stopped. This will stop this thread from waiting for the current run to finish.- Specified by:
stoppedin interfaceRunListener
-