So, let us take a look at another interactive[?] model to, kind of, get some familiarization with the way agent-based modeling works.
So, get and open NetLogo. We are going to go to the Files menu and then the Models Library, and we are going to Social Sciences, in this case, and under Social Sciences we find Traffic Basic, and that is the model we are going to look at in this talk.
So, in Traffic Basic the idea of this model, which actually was originally proposed by a school child, was to try and understand what causes traffic jams. Right?
And so, if we hit the setup button we can see the, kind of, way the world is existing in this particular space.
It is essentially, imagine, a big loop with cars coming off from the left hand side, driving along the world, going off the right hand side and then coming back on the left hand side.
Sometimes referred to as the Pac-Man world where you go off to the right and come back on the left, or just a loop or 1-dimensional looped world. Right?
In this particular case we see a couple of things we have not looked at before. We saw the manuals before when we were looking at some of the results in the fire model.
But now you also can see a graph show up as well, it is going to graph some data for us.
In addition you notice that there is one car that has been highlighted a little bit.
That is [?] to feature in NetLogo that allows you to illustrate more in particular agents and what their actions are.
So, again, we hit setup already so no we are going to let the model run.
And, you know, originally the idea was to build a simple model of just traffic moving without any kind of hindrances or obstacles.
But in this particular case what you will see, is that the results were not as expected.
So, let us it[?] run, and see what happens.
So, as you can see, right, clearly, quickly, right of the bat, a traffic jam forms.
And, in fact, this traffic jam will persist throughout the course of the model unless, and it is robust to a wide variety of the parameters of the model.
Now, there are ways to set up the model such that the traffic jam does not form. For instance you can really reduce the number of cars.
But, you know, if I hit the model setup a couple of times, you see that it keeps doing that. Right?
And, by the way, you know. One of the nice things with modeling and simulation is that for curious about something like the stay model[?] I just made, for instance, the number of cars drew[?] dramatically influences the pattern of behavior.
Than we can, in fact, just stop the model, lower the number of cars, let the model run.
And see, that in fact, in a world with a lot fewer cars, we get a free flow state, or state in which the agents are moving at their maximum speed that they can.
In fact, there is a speed limit in this model [one?]. And they are basically moving right at it. Right?
But let us go back to the case where there is a traffic jam really quickly. Right?
So, in this case we set up the model, let it run. Right?
And one of the things I want to point out is: if you were to describe this model from, kind of, a traditional statistics viewpoint. Right? You may, for instance, characterize the minimum speed, the maximum speed, and maybe the mean speed.
And a lot of times people have fallen in to characterizing using mean as a characteristic description of a system.
But what I want to point out is that if you look at the model, there is no one - the mean speed would be right in the middle of this max and min, right; it looks like it is around 0.227 in this particular case, right? -. But there is no car that is actually moving at that speed for any length of the time.
What happens is: the cars go to almost zero, they go to zero speed when they hit the traffic jam, right? And than they accelerate, accelerate almost [linear uply. Right?] linearly up in terms of their speed. And then they go back down to zero again.
And so, the amount of time when the car is actually at that mean speed, is almost instantaneously zero. Right? It is very close to being nothing. Right?
Which means that the mean speed of the cars is not a good characterization of the cars.
And that is what is illustrated by the red car which happens to behave mainly in the same way as the rest of them.
So, sometimes it is very important, especially when we are dealing with a dynamical system that an agent-based model produces to look at the actual dynamics of the model and not just characterize overall averages and things along those lines.
And one of the powers of agent-based modeling is, because of the fact that we reafy[?] the entities within the model as agents we can then quickly build visualizations of them that allow us to, kind of, understand and come to grips[?] with those patterns of behaviour.