Class DynamicElevator
java.lang.Object
org.simplesim.model.BasicModelEntity
org.simplesim.model.BasicAgent<S,E>
 
org.simplesim.model.RoutingAgent<ElevatorState,Elevator.Event>
 
org.simplesim.examples.elevator.dyn.DynamicElevator
- All Implemented Interfaces:
- Elevator,- Agent,- ModelEntity
public final class DynamicElevator
extends RoutingAgent<ElevatorState,Elevator.Event>
implements Elevator 
Part of the dynamic elevator example
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.simplesim.model.AgentAgent.UnknownEventTypeNested classes/interfaces inherited from interface org.simplesim.examples.elevator.shared.ElevatorElevator.EventNested classes/interfaces inherited from interface org.simplesim.model.ModelEntityModelEntity.PortConnectionException, ModelEntity.PortOperationException, ModelEntity.UniqueConstraintViolationException
- 
Field SummaryFields inherited from interface org.simplesim.model.ModelEntityROOT_LEVEL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCalculates new outputs from the available inputs and implements the agent's strategy.voidenqueueEvent(Elevator.Event event, Time time) getName()Returns the name of this model entityvoidvoidsendMessage(Agent recipient, Request content) Methods inherited from class org.simplesim.model.BasicAgentgetState, getTimeOfNextEvent, isSimulationRunning, pollModelChangeRequest, toggleSimulationIsRunningMethods inherited from class org.simplesim.model.BasicModelEntityaddToDomain, equals, getAddress, getFullName, getInport, getLevel, getOutport, getParent, removeFromDomain, toStringMethods inherited from class java.lang.ObjectgetClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.simplesim.model.ModelEntityaddToDomain, getAddress, getFullName, getInport, getLevel, getOutport, getParent, removeFromDomain
- 
Constructor Details- 
DynamicElevatorpublic DynamicElevator()
 
- 
- 
Method Details- 
doEventDescription copied from interface:AgentCalculates new outputs from the available inputs and implements the agent's strategy.This method is called by the simulator every time this agent is scheduled as an event in the global event queue. Outputs are basically massages that have to be put onto the outport of this agent. It should implement the general strategy of the agent and will acquire the actual simulation time from the simulator. This method is supposed to do the following steps: - read the messages from the inports
- modify the agent's state
- compute output and write messages to other entities to the outports
- add events to the internal event queue if necessary
- return the time of the next local event (=next time to call this method)
 Do not invoke from outside the simulation loop! 
- 
processMessagespublic void processMessages()- Specified by:
- processMessagesin interface- Elevator
 
- 
getNameDescription copied from interface:ModelEntityReturns the name of this model entityReturns an empty string as default, may be overridden in derived classes. - Specified by:
- getNamein interface- ModelEntity
- Overrides:
- getNamein class- BasicModelEntity
- Returns:
- the name of this model entity, may be an empty string but not null
 
 
-