A problem with parentheses

Problems with syntax of GAMS
Post Reply
Essouaied Aziz
User
User
Posts: 13
Joined: 4 years ago

A problem with parentheses

Post by Essouaied Aziz »

Hello GAMS users;

I'am running a GAMS code with this command:

W.lo(i, j)$[(D(i, j)/55) ≤ (FV0(i, j) ∗ P(i) ∗ 55)] = FV0(i, j)/55;

Yet, I always get "Error 8: ')' expected", I've tried my best to count the parentheses and correct the command, but i didn't succeed.

Any help with this please?

Thnaks!
vistro
User
User
Posts: 7
Joined: 4 years ago

Re: A problem with parentheses

Post by vistro »

Try this: W.lo(i, j)$(D(i, j)/55 <= (FV0(i, j)* P(i) * 55) ) = FV0(i, j)/55;
User avatar
bussieck
Moderator
Moderator
Posts: 1043
Joined: 7 years ago

Re: A problem with parentheses

Post by bussieck »

Not sure what editor you used, but GAMS does not like your "≤" nor the "∗". These are unicode characters not part of the GAMS language, hence the compiler gets confused. Just use the regular ASCII characters/character sequence "<=" and "*".

-Michael
Essouaied Aziz
User
User
Posts: 13
Joined: 4 years ago

Re: A problem with parentheses

Post by Essouaied Aziz »

@vistro and @bussieck
Thnak you both of you for the help!
Post Reply