Page 1 of 1

Units tips or laws

Posted: Wed Jan 31, 2024 1:08 pm
by Nub_User
Hi, one general query.

Is there any compilation of laws or best practices for assigning or using units? I mean, which units should be used for each type of variable according to the functions assigned to them, especially when functions are complex or nested.

For examples:

- Use these units and format for flow variables.
- Use these units format for stock variables.
- For auxiliary variables employing functions like DELAY, INTEGER, IF THEN ELSE, PULSE TRAIN, etc., it is recommended to use these units or type of unit.
- Tips for ensuring coherence between equations, etc.

When one is a novice or intermediate and has to develop large models, inconsistencies in units, even when being meticulous and studying their assignment, are often numerous. :roll:

Thank you very much. :mrgreen:

Re: Units tips or laws

Posted: Wed Jan 31, 2024 1:13 pm
by Administrator
Units should be (and are) easy. If you have a level and you have cars in it, the unit should be "cars". If you have people in a population variable, the unit should be "people". If you have a rate such as birth rate, it should be people/year (or per month etc).
- For auxiliary variables employing functions like DELAY, INTEGER, IF THEN ELSE, PULSE TRAIN, etc., it is recommended to use these units or type of unit.
A delay should have the same units as what you are delaying, so if it's a birth rate (people/year), the delay of this should also be people/year.

When you put something on a sketch, think about what it is calculating, and that's the correct unit to use.

Are you struggling with something?

Re: Units tips or laws

Posted: Wed Jan 31, 2024 3:57 pm
by tomfid
There are at least two rules:

- a flow has the same units as the stock it connects to, divided by the time unit
- EXP, LN, and a number of other functions require dimensionless units

beyond that, if you have

y = a / b

the units follow

y units = a units/b units

One consequence of this is that you can't add dissimilar units.

Re: Units tips or laws

Posted: Wed Jan 31, 2024 6:22 pm
by Nub_User
Thank you!
For example:
I have one stock variable with dmnl units.
For Inflow and Outflow I understand that the units should be dmnl/time (dmnl/hour or dmnl/day, etc.)
But when I postulate this in VENSIM, and I apply the units verification tool, VENSIM indicate to me that the units in left and right did not match.

Re: Units tips or laws

Posted: Thu Feb 01, 2024 8:58 am
by Administrator
Can you upload the model?

Re: Units tips or laws

Posted: Thu Feb 01, 2024 3:18 pm
by Nub_User
Uploaded.
Thank you

Re: Units tips or laws

Posted: Thu Feb 01, 2024 3:45 pm
by tomfid
Your flows are dimensioned dmnl/hour, but your time unit in Model>Settings is Mes.

Re: Units tips or laws

Posted: Fri Feb 02, 2024 11:21 am
by Nub_User
Thank you very much. :)