public interface SimulationServiceSlice
extends jade.core.Service.Slice
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVICE_DISPLAY_AGENT_NOTIFICATION |
static java.lang.String |
SERVICE_DISPLAY_AGENT_SET_ENVIRONMENT_MODEL
The Constant SERVICE_DISPLAY_AGENT_NOTIFY.
|
static java.lang.String |
SERVICE_DISPLAY_CONTAINER_UN_REGISTRATION |
static java.lang.String |
SERVICE_SET_AGENT_MIGRATION
The Constant SERVICE_SET_AGENT_MIGRATION.
|
static java.lang.String |
SERVICE_STOP_SIMULATION_AGENTS
The Constant SERVICE_STOP_SIMULATION_AGENTS.
|
static java.lang.String |
SERVICE_SYNCH_GET_REMOTE_TIME
The Constant SERVICE_SYNCH_GET_REMOTE_TIME.
|
static java.lang.String |
SERVICE_SYNCH_SET_TIME_DIFF
The Constant SERVICE_SYNCH_SET_TIME_DIFF.
|
static java.lang.String |
SIM_GET_ENVIRONMENT_MODEL_FROM_SETUP
The Constant SIM_SET_ENVIRONMENT_MODEL_FROM_SETUP.
|
static java.lang.String |
SIM_GET_ENVIRONMENT_NEXT_PARTS
The Constant SIM_GET_ENVIRONMENT_NEXT_PARTS.
|
static java.lang.String |
SIM_NOTIFY_AGENT
The Constant SIM_NOTIFY_AGENT.
|
static java.lang.String |
SIM_NOTIFY_MANAGER
The Constant SIM_NOTIFY_MANAGER.
|
static java.lang.String |
SIM_NOTIFY_MANAGER_PUT_AGENT_ANSWERS
The Constant SIM_NOTIFY_MANAGER_PUT_AGENT_ANSWERS.
|
static java.lang.String |
SIM_PAUSE_SIMULATION
The Constant SIM_PAUSE_SIMULATION.
|
static java.lang.String |
SIM_RESET_ENVIRONMENT_NEXT_PARTS
The Constant SIM_RESET_ENVIRONMENT_NEXT_PARTS.
|
static java.lang.String |
SIM_SET_ANSWERS_EXPECTED
The Constant SIM_SET_ANSWERS_EXPECTED.
|
static java.lang.String |
SIM_SET_ENVIRONMENT_MODEL
The Constant SIM_SET_ENVIRONMENT_MODEL.
|
static java.lang.String |
SIM_SET_ENVIRONMENT_NEXT_PART
The Constant SIM_SET_ENVIRONMENT_NEXT_PART.
|
static java.lang.String |
SIM_SET_MANAGER_AGENT
The Constant SIM_SET_MANAGER_AGENT.
|
static java.lang.String |
SIM_STEP_SIMULATION
The Constant SIM_STEP_SIMULATION.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayAgentNotification(EnvironmentNotification notification)
Notifies all registered DisplayAgents.
|
void |
displayAgentSetEnvironmentModel(EnvironmentModel envModel)
Notifies all registered DisplayAgents about a new EnvironmentModel.
|
void |
doDisplayAgentContainerUnRegister(java.lang.String containerName,
boolean isRegisterContainer)
Does the (un-)registration for a display agent in a container .
|
java.util.Hashtable<jade.core.AID,java.lang.Object> |
getEnvironmentInstanceNextParts()
This method returns the complete environment-model-changes from the Main-Container.
|
EnvironmentModel |
getEnvironmentModelFromSetup()
Returns the
EnvironmentModel from the setup within the end user application. |
long |
getRemoteTime()
Returns the remote time as long.
|
boolean |
notifyAgent(jade.core.AID agentAID,
EnvironmentNotification notification)
Notifies a specified sensor agent by using an EnvironmentNotification.
|
boolean |
notifyManager(EnvironmentNotification notification)
Notifies a SimulationManager by using an EnvironmentNotification.
|
void |
notifyManagerPutAgentAnswers(java.util.Hashtable<jade.core.AID,java.lang.Object> allAgentAnswers)
Sends the current set of agent answers to the manager agent of the environment.
|
void |
resetEnvironmentInstanceNextParts()
This method resets the hash with the single environment-model-changes.
|
void |
setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents)
Sets the new locations to the agents.
|
void |
setAnswersExpected(int answersExpected)
Sets the number of changes/answers expected from the simulation cycle.
|
void |
setEnvironmentInstanceNextPart(java.util.Hashtable<jade.core.AID,java.lang.Object> nextPartsLocal)
Sends the local next parts of the environment-model to the Main-Container.
|
void |
setEnvironmentModel(EnvironmentModel envModel,
boolean notifySensorAgents)
Can be used in order to set and distribute an
EnvironmentModel without
a direct notification to the involved agents. |
void |
setManagerAgent(EnvironmentManagerDescription envManager)
Sets the
EnvironmentManagerDescription of the manager agent. |
void |
setPauseSimulation(boolean pauseSimulation)
Sets to pause the simulation.
|
void |
setRemoteTimeDiff(long timeDifference)
Sets the remote time difference in milliseconds for synchronised time.
|
void |
stepSimulation(EnvironmentModel envModel,
boolean aSynchron)
Steps a simulation by using the current
EnvironmentModel and the number of expected changes / answers. |
void |
stopSimulationAgents()
Stops the simulation agents.
|
static final java.lang.String SERVICE_SYNCH_GET_REMOTE_TIME
static final java.lang.String SERVICE_SYNCH_SET_TIME_DIFF
static final java.lang.String SIM_SET_MANAGER_AGENT
static final java.lang.String SIM_GET_ENVIRONMENT_MODEL_FROM_SETUP
static final java.lang.String SIM_SET_ENVIRONMENT_MODEL
static final java.lang.String SIM_STEP_SIMULATION
static final java.lang.String SIM_SET_ANSWERS_EXPECTED
static final java.lang.String SIM_NOTIFY_AGENT
static final java.lang.String SIM_NOTIFY_MANAGER
static final java.lang.String SIM_NOTIFY_MANAGER_PUT_AGENT_ANSWERS
static final java.lang.String SIM_SET_ENVIRONMENT_NEXT_PART
static final java.lang.String SIM_GET_ENVIRONMENT_NEXT_PARTS
static final java.lang.String SIM_RESET_ENVIRONMENT_NEXT_PARTS
static final java.lang.String SERVICE_STOP_SIMULATION_AGENTS
static final java.lang.String SIM_PAUSE_SIMULATION
static final java.lang.String SERVICE_SET_AGENT_MIGRATION
static final java.lang.String SERVICE_DISPLAY_AGENT_SET_ENVIRONMENT_MODEL
static final java.lang.String SERVICE_DISPLAY_AGENT_NOTIFICATION
static final java.lang.String SERVICE_DISPLAY_CONTAINER_UN_REGISTRATION
long getRemoteTime()
throws jade.core.IMTPException
jade.core.IMTPException - the IMTPExceptionvoid setRemoteTimeDiff(long timeDifference)
throws jade.core.IMTPException
timeDifference - the new remote time diffjade.core.IMTPException - the IMTPExceptionvoid setManagerAgent(EnvironmentManagerDescription envManager) throws jade.core.IMTPException
EnvironmentManagerDescription of the manager agent.envManager - the new manager agentjade.core.IMTPException - the IMTPExceptionEnvironmentManagerDescriptionEnvironmentModel getEnvironmentModelFromSetup() throws jade.core.IMTPException
EnvironmentModel from the setup within the end user application.jade.core.IMTPException - the IMTP exceptionvoid setEnvironmentModel(EnvironmentModel envModel, boolean notifySensorAgents) throws jade.core.IMTPException
EnvironmentModel without
a direct notification to the involved agents.envModel - the current or new EnvironmentModel instancenotifySensorAgents - true, if the sensor agents should be also notifiedjade.core.IMTPException - the IMTPExceptionEnvironmentModelvoid stepSimulation(EnvironmentModel envModel, boolean aSynchron) throws jade.core.IMTPException
EnvironmentModel and the number of expected changes / answers.envModel - the current or new EnvironmentModelaSynchron - true, if the notification has to be done asynchronouslyjade.core.IMTPException - the iMTP exceptionEnvironmentModelvoid setAnswersExpected(int answersExpected)
throws jade.core.IMTPException
answersExpected - the number of answers expectedjade.core.IMTPException - the IMTPExceptionboolean notifyAgent(jade.core.AID agentAID,
EnvironmentNotification notification)
throws jade.core.IMTPException
agentAID - the agent AIDnotification - the notificationjade.core.IMTPException - the IMTPExceptionServiceSensor,
ServiceActuator,
SimulationAgent,
EnvironmentNotificationboolean notifyManager(EnvironmentNotification notification) throws jade.core.IMTPException
notification - the notificationjade.core.IMTPException - the IMTPExceptionSimulationManagerAgent,
EnvironmentNotificationvoid notifyManagerPutAgentAnswers(java.util.Hashtable<jade.core.AID,java.lang.Object> allAgentAnswers)
throws jade.core.IMTPException
allAgentAnswers - the Hashtable of all agent answersjade.core.IMTPException - the IMTPExceptionvoid setEnvironmentInstanceNextPart(java.util.Hashtable<jade.core.AID,java.lang.Object> nextPartsLocal)
throws jade.core.IMTPException
nextPartsLocal - the Hashtable of local environment changes, coming from different agentsjade.core.IMTPException - the IMTPExceptionjava.util.Hashtable<jade.core.AID,java.lang.Object> getEnvironmentInstanceNextParts()
throws jade.core.IMTPException
jade.core.IMTPException - the IMTPExceptionvoid resetEnvironmentInstanceNextParts()
throws jade.core.IMTPException
jade.core.IMTPException - the IMTPExceptionvoid stopSimulationAgents()
throws jade.core.IMTPException
jade.core.IMTPException - the IMTPExceptionvoid setPauseSimulation(boolean pauseSimulation)
throws jade.core.IMTPException
pauseSimulation - the new pause simulationjade.core.IMTPException - the IMTPExceptionvoid setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents) throws jade.core.IMTPException
transferAgents - the agents to migratejade.core.IMTPException - the IMTPExceptionLoadAgentMap.AID_Containervoid displayAgentSetEnvironmentModel(EnvironmentModel envModel) throws jade.core.IMTPException
envModel - the EnvironmentModeljade.core.IMTPException - the iMTP exceptionvoid displayAgentNotification(EnvironmentNotification notification) throws jade.core.IMTPException
notification - the notificationjade.core.IMTPException - the iMTP exceptionvoid doDisplayAgentContainerUnRegister(java.lang.String containerName,
boolean isRegisterContainer)
throws jade.core.IMTPException
containerName - the container nameisRegisterContainer - the is register containerjade.core.IMTPException - the IMTP exception