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 variables (stocks, flows, dynamic variables, variables, parameters) and functions (functions, table functions, schedules, actioncharts).
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|
|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|
|persons per year|
|fuel tank||gallons||refueling||fuel consumption||gallons per month|
set units of measurement for a model element
Some elements may be dimensionless - usually they define factors. To declare element as dimensionless, just select the checkbox but leave the field blank.
When you have finished defining units for all elements of your model, you can check their consistency.
check units in the model