Problem with error 66. Topic is solved

Problems with syntax of GAMS
Post Reply
BrianLópez
User
User
Posts: 2
Joined: 3 months ago

Problem with error 66.

Post by BrianLópez » 3 months ago

Hello, mi name is Brian and I'm doing the following gams programming.

I've got only two errors, the error 66 in the solve statement and the error 256 in the display statement (I know error 256 is a consecuential error) so I hope you can help me. Thank you very much in advance. :D
Attachments
Sorgo 1.gms
(5.74 KiB) Downloaded 16 times

User avatar
Renger
Posts: 263
Joined: 2 years ago

Re: Problem with error 66.

Post by Renger » 3 months ago

Hi

Your equation AreaMax is not correct:

Code: Select all

AreaMax(i)..             AreaMax.up(i)=e=u2(i)*1.5 ;
You define the equation by setting an upper limit for the equation itself. Upper and lower limits only make sense for variables.
Note that even if AreaMax would have been a variable (and the equation had a different name), setting a upper bound for a variable is not done in the equations but before the solve:

Code: Select all

AreaMax.up(i) = u2(i) *1.5;
Note furthermore, that it doesn't make sense to write .L and .LO in equations. (e.g., not Depcost.l(l)=e=..., but Depcost(l)=e=...)
Tipp to find an error like you had: Define your model by writing the model not as model /ALL/ but list every equation starting with the objective. Then comment all the equations out with the exception of the objective equation. Run the model: no error => uncomment the next equation and run the model until you run into the error.

Code: Select all


model sorgo /         
              ACult,
	      AreaMax,
*             ConsGreat,
*             ConsLow,
*             Production1,
*             Production2,
*             DepCapacity,
*             DepLimith1
*             SorghumDist
*             BioCarbProd
*             TotalCultCt
*             DepCost   
*             TransCost 
*             Sales     
*             Profit
             / ;
Cheers
Renger

BrianLópez
User
User
Posts: 2
Joined: 3 months ago

Re: Problem with error 66.

Post by BrianLópez » 3 months ago

So much thanks to you, I felt a bit embarrassed because I don't know how to code properly since this is my first time. And I'm sorry for keeping you busy with this problem. Have a good day an take care.
-Brian.

Post Reply