Skip to main content
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
Hi, @bkoirala .

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


Hope it helps!
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.
Thank you @mateusarakawa, very useful!

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

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