0

I am solving a model with GAMS/CPLEX and CPLEX claims it to be infeasible. The same behaviour shows the solver BDMLP.

I am solving the exact same model with GAMS/XPRESS and it provides the (known) optimal solution. The solvers BONMIN and CBC solve the model as well.

Any hint why this happens? Is it a question of tolerance values? But which tolerances would explain that behaviour?

I set the default integrality tolerance for CPLEX (= 1E-05) to the default value of XPRESS ( = 5E-06) but this doesn't change anything. The default optimality and feasibility tolerances for XPRESS and CPLEX have the same value (= 1E-06).

EDIT

The trouble starts when I add the following constraints Eq1, Eq2

Eq1: - sum_{i = 1}^{5} B_{i} + (50 - epsilon) \ge (- M Z )

Eq2: - sum_{i = 1}^{5} W_{i} + 2.0 \le (M (1.0 - Z))

Where,

epsilon = 0.0001

M = 1000 (BigM Value)

0 \le B_{i} \le 50.0 real variable

W_{i} binary variable

Z binary variable

What I am trying to say is:

IF sum_{i = 1}^{5} B_{i} > 50 THEN sum_{i = 1}^{5} W_{i} \ge 2

Daniel Junglas
  • 5,830
  • 1
  • 5
  • 22
Clement
  • 121
  • 4
  • The fact that multiple solvers answer infeasible and multiple solver give you a solution indicates that this is not likely to be a bug in any of the codes, rather the instance is unstable. There are quite a number of instances where both feasible and infeasible is a valid answer :-). What are the problem statistics? You can get it in the cplex interactive with `disp prob stats`. Also, if you can post the logs of the solution process both for cplex and for xpress, that might help to give you suggestions. Finally, if you can share the problem instance, that would help even more. – LaszloLadanyi Sep 24 '20 at 20:43
  • I set epsilon to a much lower value ( epsilon = 1.0E-12) and it works for CPLEX, XPRESS, CPC. The other solvers declare a solution that is not optimal, to optimal. It must be a problem of the value of epsilon or more precisely it is the problem of how to implement a 'less than' or 'greater than' constraint. . – Clement Sep 25 '20 at 07:53
  • Yes, modeling a strict inequality is always a pain. However, from your edit it looks like that W_i indicates whether B_i is 0 or not. If that is the case, then you can just forget about adding Eq1 and Eq2. If `\sum B_i > 50` then (because of the bounds on B_i) there must be at least two B's that are nonzero, so there'll be two W's that are 1. Still, you need to tie B's and W's together with `B_i <= 50 W_i` (if you don't already have those constraints). True, the LP relaxation will be weaker, but the numerics will be better. – LaszloLadanyi Sep 25 '20 at 13:20
  • Also, setting epsilon to 1e-12 may not be what you want. The reason that now you have a number 50-(1e-12), so you have an important digit that is 13 (almost 14) magnitudes smaller than the number itself. The solvers may very well "lose" that digit during the computation and your constraint will effectively be the same as if you had set epsilon to 0. – LaszloLadanyi Sep 25 '20 at 13:26

0 Answers0