A Simple Discrete-Event Simulation: Part 77

Today I created a combined Queue-Process component I called a Combined component. You can see it in today’s version of the model as component 50, labeled C21, having replaced queue 21 and process 21. I suspect that this will become the default Process component once I have it cleaned up and a bit more bulletproof. I started with a Queue component and then added features until I had the behaviors I wanted. The main change is that the hand-off between the queue and process parts is handled internally and instantaneously. The mechanism for pulling from the previous component had to be adjust as well, as did the code to draw the 2D and 3D graphic displays.

Here’s the code for the new component:

I see numerous opportunities for compressing and streamlining things as I continue to work with this code. One of the insights is that any Queue or Process with a finite capacity is effectively exclusive, so I can probably automate the setting of that value for each component. That will be one of the things I work on tomorrow. I’m also thinking of modifying the way the entities are drawn in the various components. The current code works but is a bit twisty and opaque, so it could stand some clarification and regularizing.

I also fixed the 3D display mechanisms for the entities in the Bag and Combined components.

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

Leave a Reply