|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISimulator
The (single) simulator object contains references to control and query the simulation
| Nested Class Summary | |
|---|---|
static class |
ISimulator.SimulationPhase
An enumeration of phases within the main simulation loop |
| Method Summary | |
|---|---|
void |
addAgentEventListener(AgentEvent ev,
SimulationEventListener ael)
[INTERNAL] Call this to add a listener for agent events. |
void |
addAttached(IAttached a)
[INTERNAL] |
void |
addInternalListeners()
[INTERNAL] |
void |
addModelEventListener(ModelEvent ev,
SimulationEventListener mel)
[INTERNAL] Call this to add a listener for model events. |
void |
addPassenger(IPassenger a)
[INTERNAL] |
void |
addPerson(IPerson a)
[INTERNAL] |
void |
addTransport(ITransport a)
[INTERNAL] |
void |
addVehicle(IVehicle a)
[INTERNAL] |
boolean |
agentEvent(IAgent agent,
AgentEvent event,
Object data)
[INTERNAL] Call an agent-type event, with the given agent and data |
IAttached[] |
attached()
An array of all attachments currently travelling |
boolean |
batchMode()
Returns true if the simulator is running in batch model |
void |
callPriority(Object event,
Object basePlugin,
CallOrder pri)
[INTERNAL] |
void |
clearAgents()
Destroy all people and vehicles |
void |
clearInternalListeners()
[INTERNAL] |
ISimulatorControl |
control()
The simulator control object, providing stop/start functionality, etc |
void |
finished(Object a)
[INTERNAL] |
void |
fixedTimeSignals(boolean operating)
[INTERNAL] |
Object |
internalEventListener()
|
boolean |
modelEvent(ModelEvent event,
Object data)
[INTERNAL] Call a model-type event, with the given data |
IPassenger[] |
passengers()
An array of all passengers currently travelling (not yet successfully arrived) |
IStore<IPassenger> |
passengers(boolean all)
A store object containing all current and past transport passengers, if 'all' is set, or only current passengers, if 'all' is false |
IPerson[] |
persons()
An array of all people currently travelling (not yet successfully arrived) |
IStore<IPerson> |
persons(boolean all)
A store object containing all people. |
ISimulator.SimulationPhase |
phase()
The current phase within the simulation loop |
IPluginLoader |
pluginLoader()
[INTERNAL] A handle to the object that loads and unloads plugins |
void |
postOpen()
[INTERNAL] |
void |
postRenew()
[INTERNAL] |
void |
removeSimulationEventListener(SimulationEventListener sel)
call this to remove a simulation event listener from list of agent and model event listeners |
void |
renew(String scenarioName)
[INTERNAL] Call before renewing model (re-open file) |
boolean |
running()
Returns true if the simulator is currently running (play button is pressed) |
void |
running(boolean isRunning)
Set the running state, equivalent to a press on the play/pause button |
boolean |
simulationComplete()
Returns true if the simulator has reached the end of the simulation term |
DayOfWeek |
simulationDay()
Return the day of week of this simulation model run. |
double |
simulationTime()
The current simulation time, in seconds |
void |
simulationTime(double t)
[INTERNAL] Set the current simulation time |
double |
startTime()
A convenience method to return the start of the simulation term, in seconds. |
void |
timeStep(double now,
double interval)
Set the simulation time interval |
int |
totalAgents()
Return the total number of people and vehicles currently in the model - those that have departed but not yet arrived. |
int |
totalPeople()
Return the total number of people and vehicles currently in the model - those that have departed but not yet arrived. |
int |
totalTransports()
Return the total number of transports currently in the model - those that have departed but not yet arrived. |
int |
totalVehicles()
Return the total number vehicles currently in the model - those moving between origin and destination, and those parked. |
int |
totalVehiclesParked()
Return the total number of parked vehicles the model. |
ITransport[] |
transports()
An array of all transports currently travelling (not yet successfully arrived) |
IStore<ITransport> |
transports(boolean all)
A store object containing all current and past transport vehicles, if 'all' is set, or only current transports, if 'all' is false |
IVehicle[] |
vehicles()
An array of all vehicles currently travelling (not yet successfully arrived) |
IStore<IVehicle> |
vehicles(boolean all)
A store object containing all vehicles. |
| Method Detail |
|---|
ISimulator.SimulationPhase phase()
ISimulatorControl control()
IStore<IPerson> persons(boolean all)
IStore<IVehicle> vehicles(boolean all)
IStore<ITransport> transports(boolean all)
IStore<IPassenger> passengers(boolean all)
IPerson[] persons()
IVehicle[] vehicles()
ITransport[] transports()
IPassenger[] passengers()
IAttached[] attached()
boolean batchMode()
boolean running()
boolean simulationComplete()
DayOfWeek simulationDay()
double simulationTime()
double startTime()
int totalAgents()
int totalPeople()
int totalVehicles()
int totalVehiclesParked()
int totalTransports()
void timeStep(double now,
double interval)
void running(boolean isRunning)
void clearAgents()
void addPerson(IPerson a)
void addVehicle(IVehicle a)
void addTransport(ITransport a)
void addPassenger(IPassenger a)
void addAttached(IAttached a)
void finished(Object a)
void fixedTimeSignals(boolean operating)
void simulationTime(double t)
void addModelEventListener(ModelEvent ev,
SimulationEventListener mel)
void addAgentEventListener(AgentEvent ev,
SimulationEventListener ael)
void removeSimulationEventListener(SimulationEventListener sel)
boolean modelEvent(ModelEvent event,
Object data)
boolean agentEvent(IAgent agent,
AgentEvent event,
Object data)
void clearInternalListeners()
void addInternalListeners()
void postOpen()
void postRenew()
void callPriority(Object event,
Object basePlugin,
CallOrder pri)
IPluginLoader pluginLoader()
void renew(String scenarioName)
Object internalEventListener()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||