Information Technology Reference
In-Depth Information
Algorithm 3 Main loop of the single-threaded time-stepped simula-
tion engine
futureEvents = [ 0 : StartEvent ]
now = 0
while now ¡ end do
currentEvents = futureEvents.eventsAt(now)
for all ActionEndEvent e in currentEvents do
The action corresponding to event e could be executed success-
fully, therefore change model state accordingly
end for
for all EnvironmentalEvent e in currentEvents do
Update environment and check constraints
end for
for all AgentEvent e in currentEvents do
Relay event e to agents
end for
for all ActionStartEvent e in currentEvents do
check constraints AND handle violated constraints
end for
now = now + Δ
end while
event-driven simulation (like 'jumping' entities) which is often required
for visualizing simulations in a realistic and appealing manner.
9.3.3 Parallelization on node-level
This section presents the extension of the example implementation
with respect to parallel execution. The simulation engine described in
this section demonstrates the feasibility of the approach proposed by
this thesis: The agent-based model itself needs to be developed just
once and may be executed by various simulation engines producing
identical results, but possibly making use of parallel execution.
 
Search WWH ::




Custom Search