amplneos-server

Need to remodel to avoid infeasiblity


I'm conducting an optimization in the forestry industry where a set of companies, C, may deduct some lumber from a some assortment set A from a harvest area set I. The param x[I,J,V,T,C,A] variables represents the flow from harvest area I to sawmill J using vehicle V at time T for company C with the assortment A.

The trouble I have is that each sawmill must comply a minumum need, d_minus. This is done in:

# The total flow into a node at time period t must exceed the minimum demand.
subject to Constraint2 {j in J, t in T, p in T, c in C, a in A: p <> t}:
    sum{v in V, i in I} x[i,j,v,p,c,a] >= d_minus[j,t,c,a];

The trouble is that the vehicles V have a specific capacity, modelled in:

# The flow must not exceed the total capacity for each vehicle and time period  
subject to Constraint6 {v in V, t in T}:
   sum{i in I, j in J, c in C, a in A} x[i,j,v,t,c,a] <= capacity[v];

This causes the compiler however to complain over impossible bounds at constraint2. For example

presolve: constraint Constraint2[1,1,6,1,3] cannot hold:
body >= 1000 cannot be <= 273; difference = 727

Im using 4 vehicles and the capacity 40 for each vehicle (I tried using 400 and 1000 as well, but the error remained). The d_minus parameter is between 500 and 1000.

Im thinking that the params shouldn't be too narrow. Using a capacity of 1000, they should comply the need with a vehicle fleet of 3 I'd pressume. I'm inclined that the "for all" constraints is what restricting the solution, causing an error. I've tried using "for all t in T, j in J" for Constraint2, but then it can't find those subscripts for d_minus. Anyone has any clue?

Regards


Solution

  • I suggest using the solexpand command to display the constraint Constraint2[1,1,6,1,3] after presolve:

    solexpand Constraint2[1,1,6,1,3];
    

    This might give some insights on what exactly is causing infeasibility. Since the problem is with a single constraint, it shouldn't be too difficult unless you have a very large constraint expression in which case I recommend reducing your dataset to the smallest possible that still causes infeasibility.