Information Technology Reference
In-Depth Information
de.rsiegfried.grams.simulator
«interface»
Simulator
+now() : TimePoint
+scheduleAction(Action action)
+scheduleEvent(Event event)
+simulate(Model model)
«interface»
Simulator
+now() : TimePoint
+scheduleAction(Action action)
+scheduleEvent(Event event)
+simulate(Model model)
singlethread
singlethread
g
EventDrivenSimulator
TimeSteppedSimulator
multithread
multithread
«interface»
Partition
+createOrUpdate(Agents agents, Threads threads)
+updateNecessary()
+getThread(Agent agent) : Thread
AgentStatic
. . .
MultiThreadedEventDrivenSimulator
Figure 9.10: Class diagram of package simulator with partitioning
support.
ActionEndEvent is triggered. Successful execution of an action implies
that this action does not conflict with any other action, therefore state
changes associated with this action are independent of all other actions.
Due to this independence, there is no need for special synchronization.
Of course, within the actual implementation concurrent access on
shared resources (e.g., a list) has to be synchronized.
Using dynamic partitioning strategies
The basic adaptations to a simulation engine for exploiting a dynamic
partitioning strategy are illustrated in Algorithm 5 (shaded area high-
light differences to single-threaded simulation engine). Firstly, the
actually used partitioning strategy s has to be specified. The ad-
ditional context information needed for computing the partitioning
(e.g., maximum affected area by an action) is not denoted expli-
Search WWH ::




Custom Search