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
SimulationRunexecute in interface SimulationRunexecution - execution is variable scope used to transfer input/output variable from and to simulation run.Exceptionprotected SimulationEvent removeSimulationEvent()
public void init(VariableScope execution)
SimulationDebuggerinit in interface SimulationDebuggerexecution - - variable scope to transfer variables from and to simulation runpublic void step()
SimulationDebuggerstep in interface SimulationDebuggerpublic void runContinue()
SimulationDebuggerrunContinue in interface SimulationDebuggerpublic void runTo(long simulationTime)
SimulationDebuggerrunTo in interface SimulationDebuggerpublic void runTo(String simulationEventType)
SimulationDebuggerrunTo in interface SimulationDebuggerpublic abstract void close()
close in interface SimulationDebuggerprotected 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.