Uncontrolled set entered as constant Topic is solved

Problems with syntax of GAMS
Post Reply
teresarb3
User
User
Posts: 6
Joined: 5 years ago

Uncontrolled set entered as constant

Post by teresarb3 »

Hello,

Could you help me with this?

For this sentence:
eq_dias15 .. Y(i,j) =G= (15 - 15*(1-X(i,j)));

I have the error 149.

I want to do this equation:
Y_ji≥15-15⋅(1-X_(ij ) ) ∀ⅈ,j

Thanks ;)
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Uncontrolled set entered as constant

Post by Renger »

Hi
You could start by reading the guidelines for this forum (under "Rules") and then search for "error 149" in this board... The search will give you 145 results. ;)
Anyway: You have defined your equation as:

Code: Select all

eq_dias15 .. Y(i,j) =G= (15 - 15*(1-X(i,j))); 
Your equation is not defined over i and j (eq_dias15). In fact, you tell Gams by defining your equation as eq_dias15 that there is only one such equation. You then write the equation over i and j, so Gams gets confused over what to do with i and j. The solution is defining your equation as eq_dias15(i,j).
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
teresarb3
User
User
Posts: 6
Joined: 5 years ago

Re: Uncontrolled set entered as constant

Post by teresarb3 »

Thanks a lot Renger !
Sorry for this
Post Reply