DRUNKEN RANDOM WALK MODEL

 

A moderately complicated system dynamics model.

 

This model, from Hannon & Ruth, shows the motion of an intoxicated person attempting to walk along a straight line in a northerly direction. Each step introduces a
random degree of deviation. The model contains two stocks, x and y, which represent position. The terms chosen_angle and step_size determine motion;
consequently, there is a flow into x labeled Moving_x using the formula step_size*cos(chosen_angle) and a flow into y labeled Moving_y using the formula
step_size*sin(chosen_angle). The chosen angle and step size both employ a Gaussian random variable with the same standard deviation (10*intoxication index),
and, respectively, mean = ‘desired angle’ and 1. The ‘desired angle’ is the one that returns the walk along the desired northward path. Some useful features of this
model include an interesting first look at changes in x and y, which will be useful for movement functions in later agent-based models.

 

*From “Intoxication Model” (Fig. 5.3) Dynamic Modeling by Bruce Hannon & Matthias Ruth.

THE MODEL

Below, we observe the Drunken Walk model and its moving parts. 

Our newest Component is the Spinner, located at  “Displays & Controls >> Spinner.”   A Spinner is a visual control that allows you to change the value of a

parameter in your model using the mouse. Unlike a Slider, which is similar but limited to changing values along a linear scale, a Spinner has the ability to also change

values using Scientific Notation.  The Spinner in this particular model is shown here:

 

When you add a Spinner, two objects will appear – an icon for the Spinner on the model canvas, and the Spinner control on the dashboard. These two visual elements

represent the same Spinner – changing the properties of one changes the properties of the other. You can have multiple Spinners on a model, as long as each one is

given a unique name. You don’t need to manually connect Spinners to other objects to use them in expressions. Similar to Sliders, Spinners “broadcast” their value

wirelessly to all objects in the model. 

AGAIN, THE MODEL

MODEL LAUNCH