Please enable JavaScript to view this site.

Vensim Help

Before you can have multiple equations for a variable, you first need to set the subscript families. Click here for details on how to do this.

 

When a variable has subscript families defined, the editor will look slightly different. The image below shows the "plus" button for adding equations, and a tab that shows the subscript definition for the equation. Click the "plus" button, and a new tab will be added to allow a different equation.

equation_editor_basic_settings_withSubscripts

 

When you have added multiple equations, it is important to make sure that you do not define an equation for a subscript combination multiple times. This is easier explained using an example.

 

For this example, we have a model that has the "scenario" subscript range. It is defined as follows.

scenario : Normal Climate, Warming Climate, NDC Climate

 

The equation for GDP is shown below. There is a single equation to calculate all elements in the scenario range.

equation_editor_gdp

 

Clicking the plus button allows a 2nd equation to be defined. For this variable, we are going to have one equation for all subscript elements except "NDC Climate". The dialog below shows the result of clicking "+", and then the "Subscripts" button. Here an exception has been added (NDC Climate).

equation_editor_with_exceptions

 

We now select the new equation, and click the subscripts button again. This time we select "NDC Climate" for this equation.

equation_editor_NDC_climate

 

Clicking OK give us this.

 

equation_editor_multiple_eqns

 

 

You can see we now have two equations. The first one is used to calculate all elements except "NDC Climate", the 2nd equation computes "NDC Climate".

 

The equation tabs can also be dragged/docked in different positions. This makes it possible to show multiple equations at the same time.

equation_editor_multiple_eqns_same_time