How to extract the MIP gap from lpsolve result ?

Hi, I am trying to solve an LP using mxlpsolve for matlab. I would like to extract the value of the gap (see in bold below). How can i achieve it ? Any help will be really appreciated !
>> mxlpsolve('solve', lp)
Model name: '' - run #1 Objective: Minimize(R0)
SUBMITTED Model size: 5 constraints, 11 variables, 30 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 0.404166666667 after 6 iter is B&B base.
Feasible solution 0.42 after 7 iter, 1 nodes (gap 1.1%)
Optimal solution 0.42 after 8 iter, 2 nodes (gap 1.1%).
Excellent numeric accuracy * = 0
MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit REAL variables.
In the total iteration count 8, 0 (0.0%) were bound flips.
There were 1 refactorizations, 0 triggered by time and 0 by density.
... on average 8.0 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 15 NZ entries, 1.0x largest basis.
The maximum B&B level was 2, 0.1x MIP order, 2 at the optimal solution.
The constraint matrix inf-norm is 140, with a dynamic range of 2800.
Time to load data was 18.152 seconds, presolve used 0.001 seconds,
... 0.001 seconds in simplex solver, in total 18.154 seconds.
ans =
0
>> mxlpsolve('get_variables', lp)
ans =
0.4200
0
0
1.0000
0
1.0000
0
0
0
1.0000
0
>> mxlpsolve('get_col_name', lp)'
ans =
'Temp'
'x_1_1'
'x_1_2'
'x_1_3'
'x_1_4'
'x_2_1'
'x_2_2'
'x_2_3'
'x_3_1'
'x_3_2'
'x_3_3'
>> mxlpsolve('get_mip_gap', lp, 1)
ans =
1.0000e-11 *---> Isnt it supposed to give me value of 1.1% ??*
Regards, Nikhil

Réponses (0)

Catégories

En savoir plus sur Linear Programming and Mixed-Integer Linear Programming dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by