I need help! I don't know why my model is giving infeasibility!

trabalhopo2.0.gms (4.6 KB)
So, i have been coding a Farm Planning Model which is due as a school project. The model comes from “Model Building in Mathematical Programming” and i have the answers, however, i can’t seem to achieve them.
I have tried a lot of things but my code’s response is always infeasibility.
I don’t know why that is and i really would appreciate help in this regard.

The model im supposed to code is 12.8 which extends to 13.8 and 14.8

Hi,

You can ask solvers such as e.g. cplex to compute the Irreducably Inconsistent Set (aka IIS), e.g. as follows

[...]
$onEcho > cplex.opt
iis 1
$offEcho
farm_planning.optfile = 1;

solve farm_planning using lp maximizing f;

This creates the following output.

Number of equations in conflict: 2
fixed: Cont3(j12,t1) = 0
fixed: Vfixa2(j12) = 9.8

These two equations result in the following constraints in the generated model instance (see equationListing)

Cont3(j12,t1)..  - 0.98*q(j12,t1) =E= 0 ; (LHS = 0)
Vfixa2(j12)..  q(j12,t1) =E= 9.8

I hope this helps!

Fred