Question: In a discrete event simulation, a physical system, such as a galaxy or solar system, is modeled as it changes over time based on simulated
In a discrete event simulation, a physical system, such as a galaxy or solar system, is modeled as it changes over time based on simulated forces. The objects being modeled define events that are scheduled to occur in the future. Each event, e, is associated with a time, te, in the future. To move the simulation forward, the event, e, that has smallest time, te, in the future needs to be processed. To process such an event, e is removed from the set of pending events, and a set of physical forces are calculated for this event, which can optionally create a constant number of new events for the future, each with its own event time. Describe a way to support event processing in a discrete event simulation in O(log n) time, where n is the number of events in the system.
Use psuedocde too.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
