public abstract class AbstractSimulationRun extends Object implements SimulationRun, SimulationDebugger
Modifier and Type | Field and Description |
---|---|
protected Map<String,SimulationEventHandler> |
eventHandlerMap
Map for eventType -> event handlers to execute events on simulation engine
|
protected String |
id |
protected ProcessEngine |
processEngine |
Constructor and Description |
---|
AbstractSimulationRun(Map<String,SimulationEventHandler> eventHandlers) |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
close simulation run
|
void |
execute(VariableScope execution)
executes simulation run according to configuration already set
|
protected void |
executeEvent(SimulationEvent event) |
void |
init(VariableScope execution)
initialize simulation run
|
protected void |
initHandlers() |
protected abstract void |
initSimulationRunContext(VariableScope execution) |
protected SimulationEvent |
removeSimulationEvent() |
void |
runContinue()
continue in the simulation run
|
void |
runTo(long simulationTime)
execute simulation run till simulationTime
|
void |
runTo(String simulationEventType)
execute simulation run till simulation event of the specific type
|
protected abstract boolean |
simulationEnd(SimulationEvent event) |
void |
step()
step one simulation event forward
|
protected String id
protected Map<String,SimulationEventHandler> eventHandlerMap
protected ProcessEngine processEngine
public AbstractSimulationRun(Map<String,SimulationEventHandler> eventHandlers)
public void execute(VariableScope execution) throws Exception
SimulationRun
execute
in interface SimulationRun
execution
- execution is variable scope used to transfer input/output variable from and to simulation run.Exception
protected SimulationEvent removeSimulationEvent()
public void init(VariableScope execution)
SimulationDebugger
init
in interface SimulationDebugger
execution
- - variable scope to transfer variables from and to simulation runpublic void step()
SimulationDebugger
step
in interface SimulationDebugger
public void runContinue()
SimulationDebugger
runContinue
in interface SimulationDebugger
public void runTo(long simulationTime)
SimulationDebugger
runTo
in interface SimulationDebugger
public void runTo(String simulationEventType)
SimulationDebugger
runTo
in interface SimulationDebugger
public abstract void close()
close
in interface SimulationDebugger
protected abstract void initSimulationRunContext(VariableScope execution)
protected void initHandlers()
protected abstract boolean simulationEnd(SimulationEvent event)
protected void executeEvent(SimulationEvent event)
Copyright © 2016 Alfresco. All rights reserved.