Geoscience Reference
In-Depth Information
partitions on a link level, as in DEQSim, a periodic synchronization for the whole
partition is performed periodically after a fixed interval ı. This means that all
messages generated during this interval, which need to be added to the scheduler
queue of an adjacent network partition, are buffered and then added at once using
synchronized access. The maximum allowed ı between two threads is determined
by the link with the shortest travel time, which resides at the border of the two
network partitions. As a larger ı is better for simulation performance, possible
adaptations to the network portioning algorithm are discussed further in the future
work section.
9.3.3
Parallel Event Handling
During the development of JDEQSim and its parallelization, it was observed that
event handling is executed on the same thread as the micro-simulation itself. But
as the event-handling process is independent of the micro-simulation and can be
further split into multiple event-handling tasks, it is ideal for parallelization. Such
a parallelization allows us not only to run the micro-simulation faster but it also
improves the performance of extensions of MATSim, which use the event-handling
interface.
Currently, five default event handlers are present in MATSim. Figure 9.3 shows
the relative time proportions of these five handlers to each other. Two of these
event handlers are needed for gathering and communicating information between
the micro-simulation and other MATSim modules: EventsToScore for accumulation
of the utility score components and TravelTimeCalculator for estimating the travel
time. Two additional event handlers generate statistics and graphs of the simulation
( LegHistogram and CalcLegTimes ). The most time-consuming event handler is
EventWriterTXT which writes all events produced by the micro-simulation to a file,
allowing later post processing and analysis of simulation results.
LegHistogram
CalcLegTimes
EventsToScore
TravelTimeCalculator
EventWriterTXT
0
1
2
3
4
5
6
7
8
9
10 11 12
Fig. 9.3 The execution time
of default event handlers
Relative Event Processing Time
 
Search WWH ::




Custom Search