[Coin-discuss] Bugs in OsiGlpk

Francisco Ortega francisco.ortega at n-side.be
Wed Apr 2 08:43:39 EST 2003


Hi Coin, I worked with GLPK some time ago and I had the same problem.
I looked at the code in OsiGlpkSolverInterface.cpp and found that the 
routine
getColSolution is calling only  lpx_get_col_info that gives the solution 
for LP problems,
not for mip problems.  When the class problem is LPX_MIP the routine to 
be called is
lpx_get_mip_col. The same happens with getObjValue and getRowActivity.  
In  all cases
I include  the following code :

if( lpx_get_class( model )  == LPX_LP )
{
    same code than before
}
else
{
    code using the mip query routines:
       lpx_get_mip_row(model,i+1); // getRowActivity
       lpx_get_mip_col(model,j+1);  // getColSolution
       lpx_get_mip_obj(model); // getObjValue
}
I set dual vars to zero because they don't have a meaning for MIP's.

best, Francisco.

Tim Hultberg wrote:

>
> When using OsiGlpk, only a. works.
>
> 2.
> When using OsiGlpk for MIP, the solution which is reported is the 
> solution of the LP-relaxation (although the correct problem is being 
> solved!).
>

-- 

Francisco Ortega
R&D

n-Side s.a.
Rue de la Longue Haie 17/001
1348 Louvain-la-Neuve

e-mail: francisco.ortega at n-side.be
Tel. : +32 (0) 10 45 87 55
Fax. : +32 (0) 10 45 87 24
www.n-side.be





More information about the Coin-discuss mailing list