The equation appears and can be modified in the Equation windows.

For normal Levels and for Auxiliaries being specially initialized, the equation is broken up into three windows. The left hand side of the equation appears in the first window, the active part of the computation appears in the second window, and the initial condition appears in the third window.
For most other variable types the equation is broken into two windows:

Here the left hand side of the equation appears in the first window and the right hand side appears in the second window. Data variables that are not computed have only a single window representing the left hand side of their equation (their name).
To the left of the equation, the assignment operator and Vensim functions used to define a particular variable type are shown, such as = INTEG(. This part of the equation is placed automatically by Vensim and shown only as a reminder of the functional form of the equation. Vensim will automatically match any open parenthesis in this part of the equation and you will get a syntax error message if you try to add one yourself.
You can edit the contents of the Equation windows directly by typing. In addition, to make modification easier, variables, subscripts, operators, and functions that can be used in the equation are displayed in different lists and buttons. These will enter values only into the Equation windows. If you are editing a different field such as the units of measure these entry mechanisms will not function.
Clicking in one of the Equation windows places the cursor where you click, just as in other editing windows in Vensim. You can also move between windows using the Tab key and the Shift+Tab keys. Once inside a window you can move the cursor using the arrow keys or the mouse. You can select text in the windows by dragging over it with the mouse or holding down the shift key and moving over it with the arrow keys.
The first Equation window (variable name) will automatically scroll horizontally if you type a very long variable name. The remaining windows will automatically wrap text horizontally and scroll vertically. The active equation window always has a vertical scroll bar to allow you to position the text.
NOTE If you want to start a new line in an equation, hold down the Ctrl key and press the Enter key.
NOTE Pressing the Enter key in the Equation Editor will activate the default control button, which is normally the OK or Close button.

The top window allows you to select the variable type, and the window below the subtype. You can also mark a variable as Supplementary to indicate that it is not intended to be used in the model. The type — subtype combinations are:
Auxiliary — Normal, Gaming to use the GAME function, with Initial to use the ACTIVE INITIAL function, with Lookup to pass the entered equation through a built-in Lookup, Simultaneous to use the SIMULTANEOUS function.
Constant — Normal, Tabbed Array to enter a tab delimited array of values.
Data — Normal (only a single window will appear), Equation to enter a := data equation.
Initial — Normal to use the INITIAL function, Reinitial to use the REINITIAL function.
Level — Normal to use the INTEG function, Sample if True to use the SAMPLE IF TRUE function, Fixed Delay to use the DELAY FIXED function, Material Delay to use the DELAY MATERIAL function, Information Delay to use the DELAY INFORMATION function, Special Integ to use the SINTEG function.
Lookup — no subtypes.
Reality Check - Constraint to enter a condition and consequence, Test Input to define a test input equation.
String — no subtypes.
Subscript — Normal to enter a normal Subscript, Equivalence to use the equivalence <-> mapping.
Time Base — no subtypes.
When you pick a type and subtype, the Equation windows will change appearance to reflect your choice. If you make a choice that decreases the number of windows, going back to your old choice will restore the content of the remaining window.
Supplementary, if checked, will prevent a Use Flag from being generated for a variable that is not used in the model. If a model uses a variable marked as supplementary, a flag will be generated informing you of this condition.
![]()
The {[()]} button matches delimiters and has no keyboard equivalent. If the cursor is on a delimiter — a curly brace {}, bracket [] or parenthesis () — clicking on this button will move the cursor to the matching delimiter. This is useful if you want to checknested function calls or long expressions. If the cursor is not on a delimiter, nothing will happen. If you click twice on the Delimiter button you will be positioned back where you started.
The Undo button undoes previous typing or variable additions in the window that has the focus. Undo only stores one level of change information. That is, you can Undo your last action or, if you have just clicked on the Undo button, Redo that action. Each Equation window keeps a separate Undo buffer. If you are typing information and not clicking on names or buttons, you can use Control-Z to get the same effect you get with the undo button.

The numeric keypad allows you to enter numbers and the common operators into the equation.
Additional operators that are not contained in the keypad are available by clicking on the "More" tab to the right (not shown here).

The Variable list is displayed by default, and can also be accessed by clicking on the Variables tab to the right of the keypad. the Variables list is used to enter variables from the model for use in the equation. By default the Variables list will show the variables that are expected to be inputs, either because arrows have been drawn in a sketch, or because an equation has previously been entered. The variables are listed in alphabetical order. The exception is for Level equations in which the first variable in the input list is always the variable for which an equation is being written.
If you are creating an equation and the Equation window contains the cursor, clicking on a name in the Variables list will enter that variable at the position of the cursor. If you select a variable has subscripts, the subscripts will also appear in the equation. Thus, clicking on the name task is done in the Variable list might put task is done[task] into the equation. The appropriate Subscripts for a given variable are determined from the equations (if any) for the variable and from other equations that use the variable.
The Choose Variable... (Choose Initial Variable…) button at the top of the list will bring up the Variable Selection dialog. This allows you to do wildcard searches on variable name. You can select any variable from this dialog by clicking on the variable name and clicking OK. The Variable Selection dialog does not limit the choice of variables to expected inputs. In Vensim PLE and PLE Plus this button is only active when working on the initial value of a level.
(Not PLE or PLE Plus)
You can also use the Variable Type selector to see variables other than the expected inputs. Click on the down arrow to the right of Inputs. A list of the different selections will appear. Select All to display every variable in the model or another selection to display variables filtered by type. Just click on the selection you want. If you use this technique to review model variables be careful not to click in the list until you have chosen which variable to add. A single click in the variable list adds the variable to the equations.
If you do include new variables as inputs to an equation, or omit old inputs, you will be informed of this and asked if you want to update the input list. If you update the input list, the sketch information will be modified accordingly. If you do not update the input list, the equation you are working on will be marked as invalid even though it might contain no errors.
NOTE Subscripts and Functions do not appear in the Variable list since these can be accessed through the Subscript and Function lists.

To access the Subscripts List, click on the Subscripts tab to the right of the number pad. This will only be available if you are working with a model that has subscripts. The list shows Subscript Ranges and Subscript Constants in the model. You can use these to replace the default subscripting supplied through the Variable list, specify new Subscripts for variables, or enter stand-alone Subscripts in an equation in the limited number of places they are allowed.

As with the Variable list, you can use the Subscript Type selector to see different things. Select Range to see all Subscript Ranges and Subranges. Click on a particular Subscript Range (such as Age) to see all of its elements. You can also click on *All Elements* to see all elements of all Subscript Ranges.


To access the Functions List, click on the Functions tab to the right of the number pad. The Function list shows a list of available functions of the class you have selected. When you click on the name of a function it will appear in the Errors line at the bottom of the dialog with its list of arguments. You can use the letters in the keyboard to move to different positions in the list. When you have found the function you want click on the Add Sel button (or press the Enter key) to enter the function into the equation. It will appear followed by parentheses ( and an argument descriptor list. The first argument descriptor in the list will be highlighted. You can double click on the arguments descriptors to highlight them and then replace them with the argument you want
(Not PLE or PLE Plus) If you have checked the No Arg List checkbox in the Sketch tab of the Global options dialog the instead of argument descriptors a series of commas , will be placed in the equation between parentheses ().
(Not PLE or PLE Plus) From the Show Class selector you can access up to nine types of functions: Common, Simple, Dynamic, Defining, Lookup, Reality Check, Macros, Data Only and User Defined. Click on the down arrow at the right of the selector to choose from the list.
· Common functions are the most commonly used functions. They are put into a relatively short list for convenience.
· All is a comprehensive list of all functions and keywords.
· Simple functions are built in functions that have no dynamics. They take 0 or more inputs and return an output that is independent of the values of the inputs at previous times.
· Dynamic functions depend on their inputs and the value of their inputs at previous times. Dynamic functions are implemented as macros to allow you to look into the dynamics of the function.
· Discrete/Delay are functions that support discrete event and entity modeling and include the DELAY… and QUEUE… functions.
· Lookup functions lists those Lookups that have been defined for the current model. Lookups are defined as a series of x,y pairs, most commonly using the Graph Lookup Editor described later in this chapter. All Lookups take only one argument.
· Reality Check functions are those associated with reality checks as described in Chapter 9 of the Modeling Guide.
· Data Only are functions and keywords that are used only in data equations. These are separated out since their behavior is very different from that of other functions. See Chapter 2 for more discussion of data equations.
· Array functions operate on Subscripted variables.
· Macros† are macros you have defined in the model. You must define these indirectly, as discussed in "Modifying Macros" later in this chapter.
· User Defined‡ functions are external functions that you have defined for use with Vensim. This menu Item is available only if you have specified an external function DLL.

To access additional input buttons click on the More tab to the right of the number pad. This tab contains relational operators and logical keywords for use with IF THEN ELSE and SAMPLE IF TRUE. It also contains the characters contained in subscript equations (including the ! for the SUM, PROD, VMIN and VMAX functions).
The curly brackets {} can be used to comment out part of an equation.
:IGNORE: is intended to aid in using Vensim's partial simulation capabilities. If you have written an equation that does not use all the inputs, but wish to keep the existing input list, click on the :IGNORE: button and the excluded variables will be added after the :IGNORE: keyword. As you change the equation the :IGNORE: button will update the list of ignored variables for the equation.
:AT LEAST ONCE: and :CROSSING: are keywords that are used in Reality Check definitions.
Ctrl + Enter will place a hard carriage return inside of an equation. The default behavior of the Equation Editor is to simply wrap equation to fit in the editing window. You can break up lines by holding down the Ctrl key and pressing Enter.
![]()
The As Graph button is located just below the Supplementary checkbox and is only visible when the equation type is Lookup or Auxiliary with Lookup. Clicking on this button will open up the Graph Lookup Editor, discussed later in this chapter.
The Help button is located just below the Supplementary checkbox. Clicking on it will open up the help system on the Vensim Manuals. This is a convenient way to check such things as function usage.