A Simple Discrete-Event Simulation: Part 7

Today we’ll do some more streamlining.

We’ll start by adding a new function to the futureEventsQueue object.

Then, instead of having to specify the “absolute” (vs. “advance”) flag in the initialization of a new entity object, we know we’ll be inserting it into the future events queue at a specific time (which might, in fact, be the current time, but that is a different discussion). Look for the streamlined and specific newItem call in place of the more general insertItem call.

Again the output is unchanged so we’re still pretty sure we haven’t broken anything.

This entry was posted in Simulation and tagged , . Bookmark the permalink.

Leave a Reply