NetLogo banner

 Contact Us

 Modeling Commons

 User Manuals:


NetLogo User Community Models

(back to the NetLogo User Community Models)


by Robert Rohrkemper and Josh Savory (Submitted: 06/01/2004)

[screen shot]

Download DrugPropagation
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)

An Agent-based Model of Drug Propagation Using Three Populations
Bobby Rohrkemper and Josh Savory


The primary goal of the Drug Simulation is to model the
propagation of drug addiction through an infected population. The
secondary goal of this model is to determine whether making drugs
illegal or legal is more effective in preventing the spread of
drug addiction.

This model is based on a town with a population of 3,000 to 5,000
people. It observes the town over a short period of time,
approximately 5 to 10 years, and looks at the change in the
average-addiction of the town’s population in this time period.
Since the time frame of the model is so short the model assumes
that the population size doesn't significantly change. This
allows the model to focus purely on the effects of drugs and not
have to simulate the effects of population growth. The town has
the choice to make marijuana legal or illegal depending on which
they feel will best control its spread. Making drugs illegal
determines whether the town will combat the drug problem by
arresting the users or by trying to rehabilitate them. They also
have a sensitivity to the drug problem which determines how
forcefully they will come down on the drug problem.


In this model we assume their are three different agents who
affect the propagation of drug addiction. These three agents are:
Susceptibles, The-Law and Addiction-Vectors. Susceptibles are the
segment of the population who are susceptible to drug addiction.
The-Law are agents who act to reduce the rate at which addiction
spreads, i.e. cops, doctors, family members..... Addiction-Vectors
are agents meant to simulate the factors that increases drug
addiction i.e. peer pressure, physical addiction, the media...
Each of these agents have rules that define what they should do
when they are alone and when they interact other agents. The
rules determining the agent’s interactions depend on whether
marijuana is legal or illegal and the initial sensitivity of the

The Susceptibles start off with an initial addiction randomly
disturbed over a power function. The purpose of the power function
is to try and simulate a real world situation where you have a few
Susceptibles with high addiction and many Susceptibles with a low
addiction. The initial number of susceptibles is determined by the
user. The Susceptibles addiction physical represents the
probability that they will buy drugs when offered them. They start
off at a random position and from their move about the screen

The-Law like the Susceptibles starts off at random positions on
the screen and move about randomly. Their population size is
determined by the sensitivity of the overall population to the
drug problem.

Addiction-Vectors are motionless agents and just wait until they
have the chance to interact with the other agents. The number of
Addiction-Vectors is determined by the user.

When Susceptibles and The-Law encounter each other they will
interact in one of three ways. If the addiction of the
Susceptible is less then 1 minus the sensitivity of the population
The-Law will do nothing. If the addiction of the Susceptible is
greater then 1 minus the sensitivity of the population and
marijuana is illegal the Susceptible will be removed from the
simulation. This is meant to simulate the arrest of the
Susceptible. If the addiction of the Susceptible is greater then
1 minus the sensitivity of the population and marijuana is legal
the Susceptible addiction will be decreased. This is meant to
simulate the rehabilitation of the Susceptible.

When Susceptibles and Addiction-Vectors encounter each other the
addiction of the Susceptible increases.

When The-Law and Addiction-Vectors encounter each nothing happens.
This could be another avenue to investigate in another simulation.


To use this model one must first set the Sensitivity of the
population, the initial-number-of-Susceptibles, the
initial-number-of-Addiction-Vectors and the Legality to the
desired values. The Sensitivity describes how forcefully The-Law
will come down on the drug problem. The
initial-number-of-Susceptibles and the
initial-number-of-Addiction-Vectors determine the initial number
of each subset of the population. The Legality determines whether
marijuana is illegal or legal. After these values are set one
then push setup to construct the requested scenario. When the
user is read to start the simulation they must simply click on go.


Look for optimal values of average-addiction. It is this quantity
which we are trying to minimize.


Try legal and illegal scenarios, and explore how this effects the
optimal values. Graph the average-addiction as a function of the
sensitivity as well as the initial number of susceptibles.


There are many features which could be added to make the model
more realistic. We have made a number of assumptions as outlined
in our report.


We have not made use of any workarounds or special NetLogo code.


This model is related to another project by Brad Boven, which can
be found at However,
his model was one-dimensional and differential-equation-based,
whereas ours is two-dimensional and agent-based.


We would like to thank Gabor Csardi for his assistance with this
project. Also, thanks to Dr. Peter Erdi for his instruction in complex
systems theory.

(back to the NetLogo User Community Models)