A Simple Discrete-Event Simulation: Part 31

Today I made a few basic changes.

Instead of placing all elements (components and entities) that contain discrete-event simulation features into the setOfEntities array I created a setOfComponents array and placed the components in there, instead. This allows me to loop through lists of like elements to perform certain operations on them, like asking them to draw themselves or (possibly) asking them to de-link themselves at the end of a simulation so they can be garbage collected.

I added a function to remove entities from the setOfEntities array when they finish getting processed at an ExitComponent.

Finally, I moved the definition of the detail parameters of the DataDisplay objects so they can be defined outside of each component.

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

Leave a Reply