unit consistency bug

Use this forum to post Vensim related questions.
Post Reply
alvinpoon
Member
Posts: 32
Joined: Sun Mar 01, 2020 6:23 am
Vensim version: PRO

unit consistency bug

Post by alvinpoon »

Hi
again I found the ver 10 has problem with the "Check unit" which is supposed to report those variables with no specified unit or inconsistent unit.
However, when I used the Check unit function to check my model (see attached), it prompted the variables even with the specified units, whereas it did not prompt the variables with inconsistent unit e.g. the traffic volume, trip per day, please take a look to find out.

Thanks
Attachments
p180 Congestion.mdl
(3.93 KiB) Downloaded 54 times
unit check.jpg
unit check.jpg (178.91 KiB) Viewed 1924 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: unit consistency bug

Post by Administrator »

Attractiveness of driving does not have any unit, so that is reported correctly.

The others are either correct warnings, or Vensim cannot check as there is no equation to check against.
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: unit consistency bug

Post by tomfid »

The others are either correct warnings, or Vensim cannot check as there is no equation to check against.
Not so. "miles per trip" is a constant =20 and has unit mile/trip, but it's still reported as an error (no units).

I suspect that the parsed model is so incomplete that Vensim fails to check anything, and this creates some spurious errors.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: unit consistency bug

Post by tomfid »

Actually, the problem with "miles per trip" is that the equation is constant, but the diagram includes a link from "attractiveness of driving" so the equation is invalid (inconsistent with diagram).

We should probably upgrade the warnings to distinguish missing equations from missing units, but either way there is a real problem with that variable.
alvinpoon
Member
Posts: 32
Joined: Sun Mar 01, 2020 6:23 am
Vensim version: PRO

Re: unit consistency bug

Post by alvinpoon »

Thanks Tom
I also did not notice the mile per trip is constant, but still interesting how can this happen if there is a link between two variables. It should automatically make constant become AUX.

Another thing I also just noticed is the number of NO UNIT is not consistent.
For example, after I changed the unit for the variable of [Trip per day] from "trip/cars/day" to "trip/day", then the number of variables with NO UNIT reduced from 10 to 9. Probably as Tom said, the checking and message has mixed up (1) no specified unit, (2) no equation, and (3) EVEN inconsistent Unit together, but it just simply shows NO UNIT.

But. After I change this unit to be the old (wrong) one ie. trip/cars/day. it still counts 9 instead of 10. seems not consistent.
Furthermore, i closed and reopened the file, it showed 11 NO UNIT. something wrong behind.

Unit consistent check function is quite important for new user and good practice to keep checking during the model building process. if this can be enhanced to provide clearer type and explanatory message to the users , that would help much and to me and SD-learners.

Taking this chance, I think of another need from the users view. I wonder if in near future, Vensim can visualize the Loops in the sketch, for example, there is a table summary of listing up all the loops in the view (Loop1 (R), Loop2 (B) etc., when we choose one of them, the sketch can show the loop in a more obvious manner. e.g. using thicker arrows or blinking. it would help learning and analyzing directly from the sketch view in a bigger and more complex model.

thank you
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: unit consistency bug

Post by tomfid »

alvinpoon wrote: Sat Aug 19, 2023 4:56 am Thanks Tom
I also did not notice the mile per trip is constant, but still interesting how can this happen if there is a link between two variables. It should automatically make constant become AUX.
I'm not sure we should do this, because the extra arrow could be a mistake. In the language, constant and aux are actually the same in terms of syntax (both use the = operator), so detection of a constant is made by checking the RHS to see if it's numeric.
Post Reply