Information Technology Reference
In-Depth Information
de.rsiegfried.grams.model.environment
«interface»
Environment
+isValidCoordinate(Coordinate coord) : boolean
+putEntity(Entity e, Coordinate coord)
+findEntity(Entity e) : Coordinate
«interface»
Coordinate
«interface»
Coordinate
«interface»
Location
+setProperty(String property, Object value)
+getProperty(String property) : Object
«interface»
Location
+setProperty(String property, Object value)
+getProperty(String property) : Object
Coordinate2D
+x() : int
+y() : int
Figure 9.4: Class diagram of package environment .
The integration of environmental update functions is not explicitly
depicted in Figure 9.4. Currently, environmental update functions are
treated very much the same way as actions of agents: Each update
function is triggered by an event and has a specific duration during
which it changes affected locations.
9.2.3 Events
Figure 9.5 illustrates the representation of events within the example
implementation. As all events occur at a specific point in time, all event
typeshavetoimplementtheinterface Event . On the implementation-
side only two different types of events are distinguished on the highest
level:
EnvironmentalEvent represents events occuring in the model en-
vironment and affecting either the environment or some entities
embedded in it. This type of events corresponds to the event
categories numbered (1) and (2) in Figure 6.5.
Search WWH ::




Custom Search