It is common practice to define units of measurement for elements of system dynamics models.
AnyLogic enables defining units for all elements of stock and flow diagrams and moreover for all types of (stocks, flows, dynamic variables, variables, parameters) and functions (functions, table functions, schedules).
Defining units is optional, commonly this may help you to check whether the formulas are defined correctly in your model and moreover this may help other users to understand the logic of the model. However, if you are sure that the structure of your stock and flow diagram and formulas are defined correctly, you may omit defining units of measurements for model elements.
In the table below we give some examples of units for fundamental elements of stock and flow diagram — stocks and flows. Stocks are usually quantities of something, while flows are measured in the same units per time.
Stock | Possible units of stock | Inflows | Outflows | Possible units of flow |
---|---|---|---|---|
bank balance | euros |
deposits interest |
withdrawals | euros per month |
housing stock | dollars | housing investment | housing depreciation | dollars per year |
CO2 in atmosphere | tons | tons emitted | tons sequestered | tons per day |
population | people |
births immigration |
deaths emigration |
people per year |
fuel tank | gallons | refueling | fuel consumption | gallons per month |
To set units of measurement for a model element
- Select the element by clicking it in the graphical editor or in the Projects view.
- In the Advanced section of the Properties view, select the System dynamics units check box.
- Specify the unit of measurement in the field aside.
When you have finished defining units for all elements of your model, you can check their consistency.
To check units in the model
- Select any element of the model and choose Tools > Check System Dynamics Units from the main menu.
- You will see dialog box informing you about the check results. In case there are any problems found, you can find detailed information in the Problems view.
-
How can we improve this article?
-