Вы находитесь на странице: 1из 28

Vensim Tutorial

EMBA System Modeling


Toolbar function

Lock - sketch is locked. Pointer can select Shadow variable - adds an existing model
sketch objects and the Workbench variable to the sketch view as a shadow
Variable but cannot move sketch objects variable (without adding its causes).
Move - move, sizes and selects sketch IO Object - adds input sliders and output
objects: variables, arrows, etc graphs and tables to the sketch.
Variable - creates variables (Constants, Comment - adds comments and pictures
Auxiliaries and Data). to the sketch.
Level - Delete - deletes structure, variables in the
Arrow - creates straight or curved arrows. model, and comments in a sketch
Rate - creates Rate (or flow) construct, Equation - create and edit model
consisting of perpendicular arrows, a equations using the Equation Editor.
valve and, if necessary, sources and sinks Reference model
(clouds).
Toolbar function
Causes tree - creates a tree-type graphical representation
showing the causes of the
Uses tree - creates a tree-type graphical representation
showing the uses of the Workbench
Loops - displays a list of all feedback loops passing
through the Workbench Variable.
Document - reviews equations, definitions, units of
measure, and selected values for the
Document all -
Toolbar function
Causes strip - displays simple graphs in a strip, allowing the
user to trace causality by showing the direct causes (as shown)
of the Workbench Variable
Graph - displays behavior in a larger graph than the Strip
Graph, and contains different options for output than the Strip
Graph
Table - generates a table of values for the Workbench Variable
Table time
Runs compare - compares all lookups and constants in the first
loaded dataset to those in the second loaded dataset
Creating causal loop diagram
Population causal loop diagram

p. 138 Sterman, J. D. J. D. (2000). Business dynamics:


systems thinking and modeling for a complex world (No.
HD30. 2 S7835 2000).

This causal loop diagram described dynamics in population is result of interaction between Birth
rate and Death rate
Increase in fractional birth rate means the birth rate (people/year) will increase above what it
would have been, and a decrease in the fractional birth rate means the birth rate will fall below
what it would have been
Increase in average lifetime of the population means the death rate (people/year) will fall below
what it would have been, and a decrease in the average lifetime means the death rate will rise
above what it would have been
Creating causal loop diagram (create new file)
Start Vensim
Select the menu item File>New Model or click the New Model button
on the toolbar
Click OK to accept default values
Creating causal loop diagram (adding
variables)

Click with the mouse button on the Variable tool


Click in the middle top of the sketch and type Population in the editing box, then press
Enter.
Click again on the sketch and continue filling out the diagram with the variables shown
above.
Creating causal loop diagram (adding arrows)

Select the Arrow tool by clicking on it. Click once on Population. Be sure to let the mouse button up
without moving the mouse! Move the cursor to birth rate and click again. A straight arrow will join the
two variables.
Position the pointer on top of the handle in the middle of the straight arrow from Population to Birth rate.
Press and hold the mouse button down, then drag the mouse (and arrow) a down to make a curved arrow.
Continue joining variables with curved arrows, according to the diagram below, by either making straight
arrows and moving the handle to curve them, or by making a single intermediate click on the sketch.
Creating causal loop diagram (arrow sign)

Click with the right mouse button on the arrowhead of the arrow from
Population to Birth rate, an options dialog box will open
Select + (under Polarity) and Outside (of the arrow's curve) then click OK
Continue changing the polarity of arrows according to the figure above,
selecting Outside of the arrow's curve for each arrow
Creating causal loop diagram (add comments
and graphics)

Select the Sketch Comment tool. Click at the top of your sketch to add a title; the
Comment dialog box will open
Click on the sketch in the center of the left hand loop. Click on the dropdown
arrow in the Graphics field Image box and choose the positive sign ( + ), then from
the Shape field choose Loop Clkwse (clockwise)
Creating Stock and Flow Diagram
Stock and Flow Diagram
This section features model of rabbit population. The model process
starts with sketching model, then writing equation and specifying
numerical quantities.
Stock and Flow Diagram (sketching)
3. Select the Level Variable tool and click
somewhere in the middle of the
sketch. Type the name Population,
and press the Enter key
4. Select the Rate tool. Click once (single
click and release of the mouse button)
to the left of the Level Population,
then move the cursor on top of
Population and click once again. Type
the name births, and press Enter.
Repeat the procedure to add deaths
1. Select the menu item File>New Model or 5. Select the Variable tool. Click on the
click the New Model button on the sketch below births, type birth rate
toolbar and press Enter. Click on the sketch
below deaths, type average lifetime
2. In the Model Settings dialog (Time Bounds and press Enter
tab) type 30 for FINAL TIME, type (or
select from the drop down box) 0.125 for 6. Select the Arrow tool, click once on
birth rate then once on births. Click
TIME STEP. Click on the dropdown box for once on average lifetime, then once
Units for Time, and select Year. Click on on deaths
OK (or press Enter)
Stock and Flow Simulation
Stock and Flow Simulation
To simulate, the model needs a set of equation that describe each
relationship
We will fill units of measurement for each equation we enter. Units
allow us to check for dimensional consistency among all the
equations
Stock and Flow Simulation (Writing Equation)
1. Click on the Equation tool
2. Type of variable Auxiliary
3. Complete the equation for birth by Click
on the variable Population in the
Variables list (in the middle of the
Equation Editor), then type the * symbol
(or click on it in the Equation click on
birth rate Editor keypad), then in the
Variables list
4. Type in the units of measurement
rabbit/Year in the Units: box. This
indicates that we measure the rate of
births in rabbit per Year. Click on OK or
press Enter
Stock and Flow Simulation (Writing Equation)
Click on Population
Type in the units of rabbit in the
units box. Click on OK or press
Enter
Stock and Flow Simulation (Writing Equation)
Click on birth rate. Type in the
numbers 0.125 in the editing box.
Type in the units fraction/Year (if
you prefer, enter instead 1/Year),
this means that the fractional birth
rate is measured in fraction (of
rabbits) per year. Another way of
saying this is (rabbits born / rabbit
population) / Year
(rabbit/rabbit)/Year = fraction/Year
(rabbit cancels out). Click OK or
press Enter
Stock and Flow Simulation (Writing Equation)
Complete the remaining two equations as they are shown in the
Equations listing below :
1. average lifetime = 8
Units: Year
2. birth rate = 0.125
Units: fraction/Year
3. Births = Population*birth rate
Units: rabbit/Year
4. Deaths = Population/average lifetime
Units: rabbit/Year
5. Population= INTEG ( births-deaths, 1000)
Units: rabbit
Stock and Flow Simulation (checking for
model syntax and unit errors)
Select Model>Check Model from the menu (or press Ctrl + T); you
should get an information box saying "Model is OK.
Select Model>Units Check from the menu (or press Ctrl + U); you
should get an information box saying "Units are OK."
Stock and Flow Simulation (simulating model)
Double click on the Runname editing box on the Toolbar and type
equilib for the first run name.
Click on the Simulate button (or just press Enter when the cursor is in
the Runname box)
Stock and Flow (model analysis)
Double click on the Level Population in the sketch.
Click on the Graph tool. A graph of Population is generated
Click on Table tool
Stock and Flow (comparing simulations)
Click on the Set Up a Simulation button
Click on the Runname editing box and replace equilib with the name
growth.
Click on the variable birth rate (appearing blue/yellow in the sketch)
and in the editing box type the value 0.2. Press the Enter key. This is a
temporary change for this run only and does not permanently alter
the value in your model.
Click the Simulate button and the model will simulate.
Stock and Flow (comparing simulations)
Click on the Graph tool
Now click on the Causes Strip tool
Stock and Flow (comparing simulations)
To discover the differences between the first and second runs, we will
use a tool that compares all Constant (and Lookup) differences. This
tool acts on the first two loaded runs (check in the Datasets Control).
Click on the Runs Compare tool. The text report below shows the differences
in the Constant birth rate for runs equilib and growth
Thank You

Вам также может понравиться