Units

<< Click to Display Table of Contents >>

Navigation:  Defining Entity Types > Create a New Entity Type >

Units

Previous pageReturn to chapter overviewNext page

If you enter units of measure for every variable, Ventity can check all equations for unit consistency. Units checking is fast, and the potential for finding serious problems is powerful. The clarity of thinking that comes from defining variables with careful units is valuable in itself. We strongly recommend taking advantage of the Ventity™ units checking capability.

 

Units Manager

 

Units checking is controlled by the Units Manager which is available from the View menu. The units panel will appear showing all units that have been used or defined in the model.

 

Units checking is controlled by the "check units" checkbox and is normally enabled. When this box is checked, Ventity will identify errors, as well as any variables whose units are missing. Warnings for missing units can be turned off, primarily as a convenience for display of incomplete models.

 

unitsManager01

 

Synonyms

 

The synonym field lets you define matches for units with the same meaning, but singular-plural distinctions, abbreviations, or other differences.

 

unitSynonym1

 

Compound Expressions

 

The compound expression field lets you indicate that a unit is made up of other units.

 

unitsCompound01

 

Dimensionless Constants

 

If set to ignore, this menu option will force units checking to assume that numerical values in equations that are not named variables have units appropriate to the context. Best practice indicates that all numbers with values subject to change or uncertainty should be exposed as named variables, so this option should be used with caution.

 

Time

 

The base time unit of the model is set in the Run Control:

 

unitsTime1

 

Model.Time, Initial Time, Final Time and Time Step all share the same unit.

 

Stocks & Flows

 

In an entity, flows always have units of the associated stock quantity, divided by the model time unit:

 

unitStockFlowEntity1

Stock-flow units in entities.

 

In an action, the rules are slightly different, because an action is a discrete event between time steps, and therefore time has no real meaning. A flow therefore has the same units as the stock:

 

unitsStockFlowAction1

Stock-flow units in actions.

 

Errors

 

Some common causes of unit errors include:

 

Problem

Solution

Using different names for the same unit

Define synonyms in the Units Manager.

 

Mismatch in stock-flow units

Ensure that the stock-flow rules above are applied to the entity or action containing the variables.

 

For an entity flow, be sure that the time unit in the denominator matches the time unit of the model.

 

Application of dimensionless functions to dimensioned inputs

This often occurs with Exp(x), Ln(x) and similar. The solution is to normalize the input, like Ln(GDP/reference GDP).