Solved

measurement units

  • 7 August 2019
  • 3 replies
  • 121 views

Userlevel 1
Badge
I have following unit consistency warning for the expression below:

{i| sum((p,yr),TLin(i,p,yr)) <> 0}

Warning: The units associated with the expression (sum( ( p, yr ) , TLin(i,p,yr) ) )[m3], and with the expression (0)[] are not commensurate.

Is there a trick to get around this? I know I can define a parameter with a value 0 and unit m3, but do not want add modelling complexity for such a minor issue.

Any suggestions are welcome.

With kind regards,
Binod
icon

Best answer by mateusarakawa 7 August 2019, 14:22

View original

3 replies

Userlevel 5
Badge +2
Hi, @bkoirala .

You could write:
code:
i| sum((p,yr),TLin(i,p,yr)) <> 0 [m3]


Hope it helps!
Userlevel 5
Badge +2
Another ideas that could be useful for you in the future:
You can read about the function mapval: http://aimms.com/files/3914/5566/1567/AIMMS_func.pdf
or use some syntax like: "i | not sum((p,yr),TLin(i,p,yr))". But you should be careful using "not" beacause it considers the default of the parameters, if I recall correctly.
Userlevel 1
Badge
Thank you @mateusarakawa, very useful!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator