1

I've a simple problem that I passed to lp_solve via the IDE (5.5.2.0)

/* Objective function */
max: +r1 +r2;

/* Constraints */
R1: +r1 +r2 <= 4;
R2: +r1 -2 b1 = 0;
R3: +r2 -3 b2 = 0;

/* Variable bounds */
b1 <= 1;
b2 <= 1;

/* Integer definitions */
int b1,b2;

The obvious solution to this problem is 3. SCIP as well as CBC give 3 as answer but not lp_solve. Here I get 2. Is there a major bug in the solver?

Thank's in advance.

Ram Narasimhan
  • 22,341
  • 5
  • 49
  • 55
Michael Hecht
  • 2,093
  • 6
  • 25
  • 37

2 Answers2

1

I had contact to the developer group that cares about lpsolve software. The error will be fixed in the next version of lpsolve.

Michael Hecht
  • 2,093
  • 6
  • 25
  • 37
0

When I tried it, I am getting 3 as the optimal value for the Obj function.

Model name:  'LPSolver' - run #1
Objective:   Maximize(R0)

SUBMITTED
Model size:        3 constraints,       4 variables,            6 non-zeros.
Sets:                                   0 GUB,                  0 SOS.

Using DUAL simplex for phase 1 and PRIMAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.

Relaxed solution                   4 after          4 iter is B&B base.

Feasible solution                  2 after          6 iter,         3 nodes (gap 40.0%)

Optimal solution                   2 after          7 iter,         4 nodes (gap 40.0%).
Excellent numeric accuracy ||*|| = 0

MEMO: lp_solve version 5.5.2.0 for 32 bit OS, with 64 bit REAL variables.
In the total iteration count 7, 1 (14.3%) were bound flips.
There were 2 refactorizations, 0 triggered by time and 0 by density.
... on average 3.0 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 8 NZ entries, 1.0x largest basis.
The maximum B&B level was 3, 0.8x MIP order, 3 at the optimal solution.
The constraint matrix inf-norm is 3, with a dynamic range of 3.
Time to load data was 0.001 seconds, presolve used 0.017 seconds,
... 0.007 seconds in simplex solver, in total 0.025 seconds.
Ram Narasimhan
  • 22,341
  • 5
  • 49
  • 55
  • Did you use the windows IDE? – Michael Hecht Apr 30 '16 at 18:00
  • Yes, I did.LPSOLVE IDE v5.5.2.0 – Ram Narasimhan Apr 30 '16 at 18:18
  • Hmmm ... ok I see. What is displayed in the IDE under "Result" is 2 as solution. So it is a plroblem of the IDE, isn't it? – Michael Hecht Apr 30 '16 at 21:48
  • Oh no ... there is written "optimal solution 2 after 7 iter" so the result is wrong! – Michael Hecht Apr 30 '16 at 21:56
  • Changing the scale mode to quadratic, results in the right solution ... so there is definitely an error in lp_solve! – Michael Hecht Apr 30 '16 at 22:00
  • Maybe one can see the error easier if the numbers are slightly changed, i.e 2 to 2.3 and 3 to 3.4, because 3 is also a part of the problem description. Then you get "Optimal solution 2.3 after 7 iter ...". Hmmm ... today (after restarting the IDE) I don't get the right solution even with the "Quadratic" option. There is really something wrong with lp_solve. – Michael Hecht May 01 '16 at 08:21