I am super new on Gams. It will be so nice for me if you can help me!
I used alias i and j to show people. And I defined the x(i) as a binary variable. and of course I have another binary which is x(j) but however I could not use this x(j) on any constraints.
The error says '‘a suffix is missing’'error 141 also error 143.
further, this constraint is not the best way to model since it contains multiplication of two binary variables.
You can use big-M formulation to linearize this.
In your previous code, you defined w as a variable. In this code, you are defining it as a parameter (I think it should be a variable). This will be enough to get rid of your error.
I see that you have -w(i) in the objective which makes me rethink my constraints. If you are maximizing your objective, then the current constraints should work.
However, if you are minimizing, we need to do more.
Hey there! Greetings!
So, is it possible to do so? I’m encounter the same problem where my previous part was equation and then i want to use some of the variable from the previous part to next part(parameter). If yes, how should i correct my equations? Actually i need the model to help me find the Frij and MFij, then the rest of the equation should use parameter section to calculate. But yeah, i encounter the error code “A suffix is missing…”, many thanks!
Equation
Eq1 Total MF of supply must equal or less than supply to demand
Eq2a Sending C and N simultaneously from supply to demand side
Eq2b Sending C and N simultaneously from supply to demand side
Eq2c Sending C and N simultaneously from supply to demand side
Eq2d Sending H from supply to demand side
Eq2e Sending O from supply to demand side
Eq2f Sending other components from supply to demand side
Eq3 Total fraction used for each supply must less than 1
Eq4a Sum of demand MF must equal to sum of supply and external supply
Eq4b Sum of demand C must equal to sum of supply and external supply
Eq4c Sum of demand N must equal to sum of supply and external supply
;
Parameter
Cmole Carbon mole received by each demand
Hmole Hydrogen mole received by each demand
Omole Oxygen mole received by each demand
Nmole Nitrogen mole received by each demand
;