[Coin-discuss] Row bounds in OsiGLPK and MIP hot starts

Brady Hunsaker hunsaker at engr.pitt.edu
Tue May 4 15:03:22 EDT 2004


On Tue, 2004-05-04 at 14:34, Eduardo wrote:
> Dear COIN Team,
> 
>  
> 
> I am using CPLEX and GLPK(4-3) solvers  under OSI.  In my algorithm, I need
> to solve several slight different MIP problems many times.  I still have
> some problems (probably in my code) but one of them is caused when I modify
> the bounds using OsiGlpk.  For example, the method
> OsiGlpkSolverInterface::setRowUpper should set a row upper bound.  However,
> it is actually setting the lower bound.  This is happening because this
> method is just a copy of OsiGlpkSolverInterface::setRowLower.   
> 

Well, that's an embarrassing "bug"!  I will correct OsiGlpk this evening
and post an email when I've committed the change.  Eduardo, if you know
of any other specific problems, please let me know.

> 
> Another thing I want to do is start the MIP solvers (via OSI) from a
> heuristic integer solution I have.  Could you tell me the better way to do
> that?
> 

At present OSI is really oriented towards LP solvers.  I do not believe
there is a way to specify feasible integer solutions (or even objective
values) through OSI.  I've heard that the next generation of OSI will be
more useful with MIP solvers, however.  Could someone with more
knowledge say whether this feature is expected to be present?  I'd also
appreciate an estimate of when the new OSI will be rolled out.  (It will
help me decide how much effort to invest in improving OsiGlpk in the
meantime.)

In the meantime, Eduardo, you have at least two choices:

1. Investigate COIN/SBB (Simple Branch-and-Bound), which may have the
features you are looking for and can be run with CLP or DyLP (I think)
as underlying LP solver.

2. Use calls directly to the MIP solver's callable library for that part
of your code.  This obviously loses the flexibility of OSI, but only for
a small part of the code.  To do this, you need to access a
solver-specific pointer to the model (CPLEX also has an environment
pointer), which is present in OsiGlpk as getModelPtr and in OsiCpx as
getLpPtr and getEnvironmentPtr.  These are not present in the base class
OsiSolverInterface, however, so if you work with OsiSolverInterface (as
you should), then you'll have to do a cast to class
OsiXxxSolverInterface in order to call those methods.  Once you have the
pointers, you can use the usual callable libraries.  If you need help
sorting the details out, feel free to ask.

Brady

-- 
Brady Hunsaker
Assistant Professor
Industrial Engineering
University of Pittsburgh
http://www.engr.pitt.edu/hunsaker/





More information about the Coin-discuss mailing list