No, I'm not suggesting that ! Your code is totally correct. Your problem is just your conceptual understanding. This is a little hard to explain not in person... A retry: There are no "variable definitions" in optimization problems, just constraints involving variables.So you suggest that I should not define variables in equations but rather define them immediately? So instead of having for example

This is a peculiarity of CPLEX on GAMS. Some solvers return infeasible solutions.If the problem is infeasible (according to the solver) I do not see any constraint value because the results are not created.

Like I told you before, it all depends on the "right hand side" of the constraints (the part that doesn't depend on variables).When there is a solution the result file is created by GAMS and there you most often find values greater than one for the =e= equations.

ie

Code: Select all

`someEq.. x + y =e= 2`

Code: Select all

`someEq.. x =e= y`

is equal to

Code: Select all

`someEq.. x - y =e= 0`

Please ask away, now I want to help you until you get it !

Best

Claudio