I'm getting an error with a unit check and was wondering what the best method is to remedy this. I have two variables multiplied togther (capacity data [GW] and number of hours of operation [h]) to get the resulting generation figure [GWh]. When I run the unit check I get an unit mismatch saying that h*GW = GWh. What is the best way to make Vensim understand that this is perfectly ok.
Thanks for any help.
Dave
Units Check - GWh
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
This is on a list of things to do. I have thought about it a bit. I think it would need to be restricted to a single compound expression along with as many single names as desired. So that
GW*hour,GWh
GW,GigaWatt,GigaWatts
h,hour,hours
Could be a set of equivalences. I am trying to figure out if it would ever be desirable to have more than one compound expression. That is much trickier since, among other things, two might contradict one another. If anyone an thing of examples where you would want more than 1 compound entry that would be interesting.
GW*hour,GWh
GW,GigaWatt,GigaWatts
h,hour,hours
Could be a set of equivalences. I am trying to figure out if it would ever be desirable to have more than one compound expression. That is much trickier since, among other things, two might contradict one another. If anyone an thing of examples where you would want more than 1 compound entry that would be interesting.
units equivalence
I do not understand how one can put on the same line, two compound expressions, unless their meaning is the same, and then there is no need to give two definitions that are equivalent.
It seems to me, that one compound expression is enough, as one can easily build from it any other expressions one wants.
It may be too practical in some circumstances to build the equivalence between a meter and a feet, or between a feet and a yard.
3*feet,yard
Other examples,
Newton * meter, joule
joule / second ,watt
1000000000 * watt, GW
GW * s, GWS
But it is rather easy to use in the same models, for instance meter and meters, indifferently.
But if one uses simultaneously, yards and feet, it can generate easily mistakes that will not be found by the unit checks, as one expression at the right of an equation, may be expressed in feet and on the right expressed in yards, the two units having the same dimension there will be no error detected. But I think that in this case it is easier to keep only yards or feet. So I am not sure that making equivalent units via a coefficient is a good idea, like 1000000000 * watt, GW.
But the idea of making a simple compound expression of strictly units and no coefficient may be useful, but I do not see the interest of having two expressions on the same line.
Regards.
JJ
It seems to me, that one compound expression is enough, as one can easily build from it any other expressions one wants.
It may be too practical in some circumstances to build the equivalence between a meter and a feet, or between a feet and a yard.
3*feet,yard
Other examples,
Newton * meter, joule
joule / second ,watt
1000000000 * watt, GW
GW * s, GWS
But it is rather easy to use in the same models, for instance meter and meters, indifferently.
But if one uses simultaneously, yards and feet, it can generate easily mistakes that will not be found by the unit checks, as one expression at the right of an equation, may be expressed in feet and on the right expressed in yards, the two units having the same dimension there will be no error detected. But I think that in this case it is easier to keep only yards or feet. So I am not sure that making equivalent units via a coefficient is a good idea, like 1000000000 * watt, GW.
But the idea of making a simple compound expression of strictly units and no coefficient may be useful, but I do not see the interest of having two expressions on the same line.
Regards.
JJ
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi JJ,
Synonyms are not intended to implement unit conversions, just indicate that the same name is used for more than one thing. Thus numbers would not be allowed, since only 1 would make sense anyway. If, for example, something measured in Watts needs to be used to compute a value in KiloWatts that division by 1000 will need to be in the equations explicitly. For example
electricity consumption = INTEG(device wattage * fraction time turned on/ KiloWattPerWatt,0) ~ KWH
KiloWattPerWatt = 1000 ~ KW/Watt
in this example there would need to be a units equivalence between
KW*Hour,KWH
for units checking to report no error.
Synonyms are not intended to implement unit conversions, just indicate that the same name is used for more than one thing. Thus numbers would not be allowed, since only 1 would make sense anyway. If, for example, something measured in Watts needs to be used to compute a value in KiloWatts that division by 1000 will need to be in the equations explicitly. For example
electricity consumption = INTEG(device wattage * fraction time turned on/ KiloWattPerWatt,0) ~ KWH
KiloWattPerWatt = 1000 ~ KW/Watt
in this example there would need to be a units equivalence between
KW*Hour,KWH
for units checking to report no error.