public interface SimFacade
Modifier and Type | Method and Description |
---|---|
void |
addSubscription(java.lang.String topic,
Subscriber subscriber)
Adds a client subscription to the message broker
|
void |
createAgent(AgentState agent)
Creates an agent in the simulation.
|
void |
createEnvObject(EnvObjectState envObject)
Creates an environment object in the simulation
|
void |
createEvent(EnvEvent event)
Creates an event in the simulation
|
void |
destroyAgent(AgentState agentState)
Removes the given agent state
|
void |
destroyEnvObject(EnvObjectState envObjState)
Removes the given environment object state
|
void |
loadEnvironmentXML(java.io.File file)
Load a new environment to the simulation
|
void |
loadSimulationSnapshot(java.io.File file)
Load a simulation snapshot
|
void |
mergeCell(CellID cellID)
Merges a cell with its neigboring cell
|
void |
notifySimPropertiesChange()
Notifies the simulation configuration settings change
|
void |
pauseSimulation()
Pauses the simulation
|
void |
saveEnvironment(java.io.File file)
Saves the current simulation environment only
|
void |
saveSimulationSnapshot(java.io.File file)
Save a simulation snapshot
|
void |
sendRuntimeAgentCommand(int agentID,
RuntimeAgentCommandMsg.RuntimeAgentCommand command,
java.lang.Object arg)
Sends a runtime agent command to the simulation.
|
void |
sendStateUpdate(VirtualState state)
Updates the state of an agent or environment object
|
void |
setReorganizationStrategy(ReorganizationStrategy str)
Changes the reorganization strategy to be used in the simulation
|
void |
setupPublications()
Adds publication topics to the message broker
|
void |
splitCell(CellID cellID)
Splits a cell
|
void |
startSimulation()
Starts the simulation
|
void sendRuntimeAgentCommand(int agentID, RuntimeAgentCommandMsg.RuntimeAgentCommand command, java.lang.Object arg)
agentID
- the id of the agent to which the command is to be appliedcommand
- the command typearg
- any argument or data to be passed along with the command, depending on the command typevoid createAgent(AgentState agent)
agent
- the agent state of the agent to be createdvoid createEnvObject(EnvObjectState envObject)
envObject
- the environment object state of the environment object to be createdvoid createEvent(EnvEvent event)
event
- the event to be createdvoid sendStateUpdate(VirtualState state)
state
- the state to be updatedvoid startSimulation()
void pauseSimulation()
void addSubscription(java.lang.String topic, Subscriber subscriber)
topic
- the topic to be registered forsubscriber
- the subscriber handlervoid setupPublications()
void setReorganizationStrategy(ReorganizationStrategy str)
str
- the reorganization strategyvoid splitCell(CellID cellID)
cellID
- the id of the cellvoid mergeCell(CellID cellID)
cellID
- the id of the cellvoid notifySimPropertiesChange()
void saveSimulationSnapshot(java.io.File file)
file
- The file the simulation snapshot will be saved to.void loadSimulationSnapshot(java.io.File file)
file
- The file the simulation snapshot will be loaded from.void loadEnvironmentXML(java.io.File file)
file
- The environment filevoid saveEnvironment(java.io.File file)
file
- The XML file that contains complete information about environment objectsvoid destroyAgent(AgentState agentState)
agentState
- The agent state to to be destroyed.void destroyEnvObject(EnvObjectState envObjState)
envObjState
- The environment object state to to be destroyed.