Example variable: Energey efficiency of Trucks: conventional Trucks units [liters/km], battery electric Trucks[kwh/km], Compressed Natural Gas Trucks [kg/km]...
Is it possible to have subscript elements that are conceptually basically the same but use different in units?
Of course I am aware that there are other potential solutions:
a) use several variables instead one for each unit or
b)convert all inputs to the same unit (.e.g. joules/km in the example above.
However, a has the disadvantage that I get more variables in a model that is too big already and b has the disadvantage, that I have to convert angain back later. Plus the units that are typically used have the advantage that they can be directly communicated. Most importantly however, I am working with models that someone else built, where the current situation is that the unit check no longer works because Vars have subscripts that quantitatively use different units, although the equation editor shows only one of them and the others are simply mentioned in the comment.
In text view however, when I define several equations, I actually see the syntax for one unit for each equation.
I have tried to enter units in text view (see attached model) but it seems the unit checker only uses the first units mentioned?
If you open the attached model in a text editor, you will see the differing units, you don't see them in the equation viewer and as soon as you save the model again in Vensim, all units but the first are lost.
If it's not possible to make this work, consider this as a feature request;-)
several units in one subscripted variable?
several units in one subscripted variable?
- Attachments
-
- test several units in one variable 3.mdl
- (3 KiB) Downloaded 120 times
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: several units in one subscripted variable?
No, you cannot have different units within a single parameter. The only option is to convert to something common and back again if you need to.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559