Dynamic Model and Error 149

Problems with syntax of GAMS
Post Reply
Sherko
User
User
Posts: 2
Joined: 6 years ago

Dynamic Model and Error 149

Post by Sherko »

I have attached my file.
I want to build an Oil Field model which:
Production at time t depend on Pressure at time t (Which initial pressure is given)
Pressure at time t+1 is a function of Cumulative production.
Production at time t+1 is a function of P at time t+1.

I have written the model as attached and defined Production and Pressure a variable but when I run the model, I will face Error 149.
Please help me what is the problem?
Thanks
Attachments
RESERVOIR.gms
(3.1 KiB) Downloaded 324 times
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Dynamic Model and Error 149

Post by Renger »

Hi Sherko

Search for the error 149 in the list (a common mistake).
In short: you defined an equation

Code: Select all

 ProductionWell .. q_well(t)=e=...
 
ProductionWell is not defined over t, but your equation is, so Gams complains with error 149 (Uncontrolled set entered as constant).
The equation should be:

Code: Select all

ProductionWell(t) .. q_well(t)=e=...
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Sherko
User
User
Posts: 2
Joined: 6 years ago

Re: Dynamic Model and Error 149

Post by Sherko »

Thank you for your helpful comment.
Post Reply