How to correct the error message of "A suffix is missing".

Problems with modeling
Post Reply
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: How to correct the error message of "A suffix is missing".

Post by bussieck »

GAMS has no defining variables, so you need to write your X(i) := A(i)*e(i) as regular equality constraints. Only if you have a constant expression on the right (as for Xexp(i) := 0) you can "fix" the variable" using the .fx suffix: "Xexp.fx(i) := 0;". Here is the equation code that compiles (I also had to make the objective variable z a free variable):

Code: Select all

free variable        
        z          Total value or total performance of biofuel supply chain ;
*Since no raw material will be exported;       
Xexp.fx(i) := 0; 
value..  z =e= sum(j, (P(j)*Y(j)) - (Pexp(j)*Yexp(j) + Cimp(j)*Yimp(j) + C(j)*Y(j)))- sum(i, CR(i)*X(i) + CRimp(i)*Ximp(i) - PRexp(i)*Xexp(i));
demand(j)..     (Y(j)-Yexp(j)+Yimp(j)) =g= DB(j);
land(i)..       A(i) =l= Am(i);
capacity(j)..   Y(j) =l= CAP(j);
equation defx(i), defY(j);
defx(i).. X(i)    =e= A(i)*e(i);
defy(j).. Y(j) =e= sum (i, b(i)*(X(i) - Xexp(i)+ Ximp(i))) ;
GAMS has plenty of good documentation. I can only suggest going through the tutorial material and if you want to make an investment in learning the system reading the docs.

Good luck.
-Michael
Post Reply