Information Technology Reference
In-Depth Information
Algorithm 4 Multi-threaded event-driven simulation engine using a
node-level/per agent/static partitioning strategy.
A
,T ) // see Algorithm 1
partition = uninformed(
futureEvents = [ 0 : StartEvent ]
now = timeOfFirstEvent(futureEvents)
while futureEvents not empty AND now ยก end do
now = timeOfFirstEvent(futureEvents)
currentEvents = futureEvents.eventsAt(now)
for all ActionEndEvent e in currentEvents do
Action x of agent A corresponding to event e is executed
successfully
Use thread t = partition( A ) for computing corresponding
state changes
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
end while
 
Search WWH ::




Custom Search