Last time I had hacked some graphics and basic user interactivity into the discrete-event simulation framework. Before proceeding, however, I wanted to back up and make a rational plan. Architecture details matter, so let’s make some decisions and build to that.
We discussed various possibilities for generating entities and introducing them into a simulation. In order to build a simulation, however, we have to pick one, so here it is. One component will generate entities, and when the entities are first activated we’ll assign them to a specific entry component. We’ll begin by including a single entry component. In order to support multiple entry components we’ll have to include a mechanism to describe how the generated entities will be distributed across the different entry points, but first things first.
To give us a guide for building components we’ll plan to build each one with an eye toward creating the linear pipeline shown above. We’re going to
go light on graphics so we’ll just have the components show their status by updating counters, entity IDs, and so on. We won’t include any animation effects as entities move from one component to another, and we won’t graphically show entities or groups of entities residing in any particular component. We’ll also assume that all movements take place instantaneously, so we won’t have to worry about transit times, either. Once we get the basics working we can examine what kinds of analyses this makes possible, and then we can start adding in complications.
We’ll keep the user interaction model the same. The user clicks a button and the system processes another event. That way it’ll be very easy to follow the mechanism as it works. The logic for displaying the state of each component will be built into its object, but we’ll talk about how to abstract this out as we go.
Eventually, we’ll add logic that will allow us to build more complicated models with multiple paths, which will require routing logic, and any number of components. There will always be more to add but that’s the basic roadmap. Sound good so far?