1

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

Cenderze
  • 1,202
  • 5
  • 33
  • 56

1 Answers1

1

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.

vitaut
  • 49,672
  • 25
  • 199
  • 336
  • Thanks for your reply! I'm using NEOS server, and adding that command in the .run file did not print anything. Been trying to google how to use solexpand with NEOS, but I haven't found anything. Do you know of any way to track error using NEOS? – Cenderze Nov 03 '14 at 18:55
  • It worked using solexpand now! Thanks for that, did not know about that. Thanks for your reply! I've tried using solexpand which gave me the output edited in my original post. I've modified the d_minus constraint to become 1 for all combinations. It gave me the solution that all x variables should be 0. Do you know how that might be? – Cenderze Nov 03 '14 at 19:04
  • 1
    I've solved this issue now thanks to your input. Accepted and upvoted your answer of course. Thanks again! – Cenderze Nov 03 '14 at 21:14
  • @GustavDanell I'm glad that you've managed to solve the issue. – vitaut Nov 03 '14 at 21:50