Units tips or laws

Use this forum to post Vensim related questions.
Post Reply
Nub_User
Member
Posts: 39
Joined: Mon Aug 16, 2021 11:55 pm
Vensim version: PLE+

Units tips or laws

Post 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:
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Units tips or laws

Post 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?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Units tips or laws

Post 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.
Nub_User
Member
Posts: 39
Joined: Mon Aug 16, 2021 11:55 pm
Vensim version: PLE+

Re: Units tips or laws

Post 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.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Units tips or laws

Post by Administrator »

Can you upload the model?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Nub_User
Member
Posts: 39
Joined: Mon Aug 16, 2021 11:55 pm
Vensim version: PLE+

Re: Units tips or laws

Post by Nub_User »

Uploaded.
Thank you
Attachments
error_units.mdl
(1.77 KiB) Downloaded 52 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Units tips or laws

Post by tomfid »

Your flows are dimensioned dmnl/hour, but your time unit in Model>Settings is Mes.
Nub_User
Member
Posts: 39
Joined: Mon Aug 16, 2021 11:55 pm
Vensim version: PLE+

Re: Units tips or laws

Post by Nub_User »

Thank you very much. :)
Post Reply