Vensim-Tutorial Stepbystep v.1
Vensim-Tutorial Stepbystep v.1
VensimPLE
Highlighting
indicates that
the equation
for that
variable is
incomplete.
Exogeneous and Endogeneous
Variables
• Variables in SD models are classified as either
exogenous or endogenous:
– Exogenous variables are defined independent of other
variables of the model.
• They are functions of time (i.e., Exogenous Variable = f(t)).
• Of course the exogenous variables may be constants, in
which case they are called parameters.
– Endogenous variables are influenced by other
variables in the system
• Endogenous Variable = f(x, y, z), where x, y, z are other
variables in the model
Step 14: Define Infection Rate
Step 15: Define Population Susceptible
to COVİD
Step 16: Define Susceptible Contacts
Step 17: Define Contacts Between Infected and
Uninfected People
Step 18: Define Probability of Contact with Infected
Person
Step 19: Define Total Population
Note first that there are no inputs to this parameter, just as we specified in the
diagram, indicating that Total Population will be a constant. But what value
should that constant take? The data suggests that in the relevant portion of Italy
the Total Population was about 240500 persons, so enter that value into the
equation box. Remember to specify units of measure and provide a comment.
Step 20: Define Contact Frequency
Step 21: Define Infectivity
Following this example, complete the equations for the other two
parameters, Contact Frequency (Persons/Day) and Infectivity
(dimensionless – ie, enter Dmnl). Contact Frequency represents the
number of contacts between infected and uninfected people every day.
Infectivity represents the probability that each episode of contact results in
transmission of the infection.
Step 22: Define Population Infected
with Covid
Be careful !!!
Initial value of Infected with Covid should be 1 because of calculation of probabality of
cantact with infected person
Time Out and Run
Plotting Results
It should be
selected
Optional: Permanent Graph
Use: I/O Object or Custom Graph
Step 23: Add Variables in the Dataset
The cause of the problem is that unit of measure for Contact Frequency is incorrect.
The Contact Frequency represents the number of contacts each person makes per day,
not the total number of contacts that occurs in the susceptible population (which is
captured by the variable Susceptible Contacts).
To fix this problem, change the units of measure for contact frequency to be
Persons/Person/Day. (Vensim should equate Person/Persons/People, following
settings in the Model>Settings>Units Equiv menu.) After you do this, run the units
check again. When you are done click OK
Step 31: Units Check – A. O. K.
Step 32: Rename Case – “Base” and
Run
Step 33: Plot Cumulative Reported Cases
Step 34: Try Higher Contact Frequency
Covid
Covid
Covid =
Covid People
Covid People
Covid
Covid
Covid
Floating Point Error
• It may be a couple of things. You may have unrealistic values for some of
the parameters, e.g. infectivity. Check your time step, dt ,of the
simulation. Make sure value of probabilities are defined btw 0-1.
– E.g. setting “infectivity” to a start value of 20 (by assuming 20%), instead of 0.2