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

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

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.

Last edited by bellzito 4 days ago, edited 1 time in total.

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

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

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

Hi,

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

This creates the following output.

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

I hope this helps!

Fred

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

Code: Select all

```
[...]
$onEcho > cplex.opt
iis 1
$offEcho
farm_planning.optfile = 1;
solve farm_planning using lp maximizing f;
```

Code: Select all

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

Code: Select all

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

Fred