Tag Archives: JavaScript

A Simple Discrete-Event Simulation: Part 26

Having sorted out the internal reference issues in JavaScript I could go ahead and post the next update to the model framework. In this iteration the entities are completely passive, which means that the newly created entities are generated using … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 25

The solution is that there is no solution. The simplest thing to do is to ensure that the values are updated by hand whenever they need to be drawn. I’ve included a method called assignDisplayValues to the arrivals component. It … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 24

While making the changes I described yesterday I ran into a problem where a long chain of (what I expected to be) references didn’t return the results I was expecting. Somewhere in the chain of references something appears to be … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 22

I found it necessary to go back and automate the definition and display of blocks of values associated with different elements in a simulation. I’ve based it on a global canvas and will rewrite everything else accordingly. This will make … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 20

After defining things more clearly yesterday I offer this version of an arrivals component. Here’s how it’s supposed to work. The component is created using an external call. The graphic properties are initialized using a separate call to this.basicDefine. Most … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 17

Today I added an animation to the simulation. There are a lot of things that could be said about this, and I’ll go into just a few of them today. At this point I wanted to get some kind of … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 16

So far I’ve been discussing ways of generating arrivals according to a specific schedule. There’s another way to do it, based on the Poisson distribution. From Wikipedia: The Poisson distribution is an appropriate model if the following assumptions are true. … Continue reading

Posted in Simulation | Tagged , , , | Leave a comment

A Simple Discrete-Event Simulation: Part 15

Today I wanted to describe a few additional methods for generating arrivals over a given time span. Last week we divided the arrivals evenly over the span without placing any at the beginning or end. The next possibility is generating … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 14

Today I modified the entry component so it creates new entities according to a supplied schedule. This can be made as complex as we’d like but let’s keep it simple for now: the input parameters are the duration of each … Continue reading

Posted in Simulation | Tagged , | Leave a comment

A Simple Discrete-Event Simulation: Part 13

Today I wanted to streamline the code in the activate method for the entities that apply the advance command. I started by breaking the code in the series of if statements out into separate methods, which at least makes things … Continue reading

Posted in Simulation | Tagged , | Leave a comment