From the Demo Main Menu, the button Vensim Development Environment accesses a work environment where you can quickly and effectively create, refine and debug your models. Vensim uses a Workbench-Toolbox metaphor to help you work with models. The main Vensim window can be thought of as a workbench. The three basic window groups are: (i) Build (for creating models in graphic or text format), (ii) Control (Control Panel and Subscript Control) and (iii) Output (for output from analysis tools). If the build window is selected (active), the other windows are usually hidden behind it (and are inactive). If the Control Panel window is active, or an output window has been generated, the sketch window will usually be shown behind (but is inactive). You can activate a visible window by clicking on it and you can switch between window groups using Ctrl+Shift+Tab or by clicking on the name of the window group at the bottom of the screen.
The workbench contains a model (as shown in the title), and the model is always positioned at a variable — called the workbench variable (also shown in the title bar). The workbench menu provides access to a lot of controls such as editing, simulation, output, and others. Analysis tools are lined up on the left side of the workbench. When the Sketch window is open, sketch tool buttons line up on the top for graphically sketching models. To use the Text Editor, select from the menu View>As Text. Three buttons on the Main Toolbar at the top of the workbench allow switching among window groups (Build, Output, and Control). A View button on the Status Bar (at the bottom of the workbench) allows you to switch among different views of a model.
The Workbench Variable
This is any variable in your model that you are interested in. Analysis tools act on the Workbench Variable. You can change the Workbench Variable by double clicking on a different variable name appearing in any Vensim window — sketch (or text editor) window, or output window (of trees, graphs, tables and so on). There is also a variable selection box accessible from the Control>Variable Select menu item. You can do wildcard pattern matching, or select variables by type from this window.
Sketch (Build) Window
The Sketch window is used to graphically display and modify your models. The sketch window is active by default. You can switch between the Sketch Window and the Text Editor by selecting the View>As Sketch or View>As Text commands. Once the Sketch window is activated you can use it to create and modify cause and effect diagrams. Sketch tools appear in a bar on the top of the sketch window, and operate similarly to tools found in draw programs. A tool is selected by a single click with the cursor; the cursor changes shape to show the selected tool, then the cursor is single clicked on the sketch to add the item. The rate tool and arrow tools need two clicks, one at the starting point and one at the ending point (the arrow tools can take intermediate points on the sketch as well).
Tools are described from left to right:
· | Pointer — moves and selects Sketch objects, variables, etc. |
· | Variable — creates variables (i.e., Constants, Auxiliaries, etc.). |
· | Level — create variables with a box shape (used for Levels or Stocks). |
· | Arrow — creates straight or curved arrows. |
· | Rate — creates Rate (or flow) constructs, consisting of perpendicular arrows, a valve and, if necessary, sources and sinks (clouds). |
· | Model Variable — adds an existing model variable and its causes (causal variables) to the sketch view. |
· | Shadow Variable — adds an existing model variable to the sketch view as a shadow variable (without adding its causes). |
· | Merge — merges two variables into a single variable, merges Levels onto existing clouds, merges Arrows onto a variable to split an Arrow, and performs other operations. |
· | Sketch Comment — adds comments and pictures to the sketch. |
· | Magic Wand — hides and unhides variables in a sketch view. |
· | Delete — deletes structure, deletes variables in the model, and deletes comments in a sketch. |
· | Equations — creates and edits model equations using the Equation Editor. |
Creating Equations
Vensim is designed so that models can be entered both visually in the Sketch window or algebraically in the Text Editor. You can sketch a causal loop model, but to simulate it, you will need to create equations. You can enter (or modify) the model equations one at a time using the Equations tool in the Sketch Window. Variables will appear black until their equations are correctly entered. Vensim will make sure the sketch is kept correct if you make structural changes using the Equation Editor by prompting you for automatic modification of the structure. Often, the message you will see is "Update the input list? Yes/No." Answering "Yes" will modify the structure of the model to reflect the equation you entered. You can also enter model equations using the Text Editor window. To use the Text Editor, select the View>As Text command from the sketch. You can create equations in any order. Vensim will order them automatically and tell if you if there are problems before it simulates the model. Any sketch diagram you create is not updated if you work in the Text Editor.
NOTE: To create a Level or State variable in the Equation Editor in Vensim, either create a Level variable in the sketch then open the Equation Editor on this variable (this will cause Vensim to select the variable as a Level) or select the variable type Level while in the Equation Editor for variables that are not Boxes in the sketch.
NOTE: To create a Level or State variable in the Text Editor in Vensim, use the INTEG function, e.g.,:
Water Level = INTEG(inflow - outflow, INITIAL WATER LEVEL)
The Control Panel and Menu Items
The Control Panel encompasses all Vensim control dialog boxes. These include Variable Selection, Time Axis, Datasets, and others. The Control Panel can get "lost" behind sketch or output windows; click on the Control Panel button on the Main Toolbar or use the menu item Windows>Control Panel to find it.
Datasets
Simulation results are called datasets. You can load up to 8 datasets at one time to compare the behavior of variables. The datasets do not have to come from the same model. The Control Panel contains a tab called Datasets which allows you to load and unload datasets. When you do a simulation, the corresponding dataset is automatically loaded.
Simulations
To start a simulation, simply click the Simulate button on the Main Toolbar. For temporary experiments (changing Constants and Lookups), click the Set Up a Simulation button then click on Constants or Lookups in the sketch to change their values. The Simulation Control button on the Main Toolbar brings up the Simulation Control (for more advanced simulations, such as sensitivity simulations). For simple simulations you will probably just want to name the simulation then run the simulation. If you ask to run a simulation with the name of an existing dataset, you will be asked if you want to overwrite the old dataset.
Output Windows
Output windows are generated from use of the Analysis tools. These tools are lined up vertically on the left of the Workbench. When you click on a tool, the tool is applied to the Workbench variable and generates an output (part of the output window class). For example, clicking on the Causes Tree tool will create a tree showing the causes of the Workbench variable. A Toolset — accessible using the Tools>Analysis Toolset>Modify command — allows you to add or remove tools from the Workbench toolset. Clicking with the right mouse button on a tool (or control-clicking) allows you to modify the output of that tool. Tools are described from left to right here (top to bottom in your demo):
Causes Tree — creates a tree-type graphical representation showing the causes of the Workbench Variable.
Uses Tree — create a tree-type graphical representation showing the uses of the Workbench Variable.
Loops — displays a list of all feedback loops passing through the Workbench Variable.
Document — reviews equations, definitions, and units of measure for the Workbench Variable.
Causes Strip Graph — displays simple graphs in a strip, allowing you to trace causality by showing the direct causes of the Workbench Variable.
Graph — displays behavior for the Workbench Variable in a larger graph.
Table — generates a table of values for the Workbench Variable.
Runs Compare — compares all Lookups and Constants in the first loaded dataset to those in the second loaded dataset.
Controlling Output
Some controls in the Control Panel allow you to change the amount and appearance of output. Most important are the controls Time Axis and Scaling. The Time Axis control allows you to change the period of time over which simulation results are displayed.
Using the Development Environment
Developing and using models
The Vensim Demo is shipped with a number of models. Four of these models are put in separate sub-directories, and a number are included in the main VENSIM directory. You can load the different models using the menu File>Open Model command or click the Open Model button. To look at the behavior of these models, you need to create datasets for them. Name a dataset in the Runname editing box on the Main Toolbar, then click the Simulate button to create a dataset. Next, use the analysis tools to examine model behavior. Section 4 takes you step-by-step through the simulation and analysis of an existing model. Section 5 takes you step-by-step through the development and use of a very simple population model and a more interesting sales diffusion model. This process is intended to give you a chance to work hands on with the Vensim development environment.
Printing
If you want to work by example, and this is highly recommended, than you may find it useful to print one or more of the models included with the demo. You can print equations from the Text Editor and diagrams from the Sketch window. Because this is a demonstration version of Vensim, printed output will be marked "demonstration version."
Other Features
There is not sufficient space here to go into all of the features of Vensim, and, because of space limitations, the complete on-line help capabilities are not available in the demonstration version. You are, of course, welcome to experiment. If you have specific questions about the capabilities of Vensim, please contact us.