[Coin-discuss] Construct a MIP problem
Spencer Fung
sklfung at cse.cuhk.edu.hk
Fri Mar 18 14:54:36 EST 2005
I see. Thanks for your response.
BTW, I just want to use the CGL to generate cuts, instead of solving the
problem. Does it affect the cuts generation if the problem cannot be
specified to be MIP?
Spencer
-----Original Message-----
From: coin-discuss-bounces at list.coin-or.org
[mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of Ted Ralphs
Sent: Saturday, March 19, 2005 2:04 AM
To: Discussions about open source software for Operations Research
Subject: Re: [Coin-discuss] Construct a MIP problem
Spencer,
It is not a bug. The way the CPLEX solver works is not actually very
compatible with the way the current version of OSI works. As long as
CPLEX thinks the problem type is an LP, it will not keep track of the
integrality status of the variables. One possible solution would be to
set the problem type to MIP whenever the user asks for the integrality
type of the variables to be changed, so that CPLEX will accept it.
However, once this switch is made, the problem can no longer be solved
as an LP. If one then tries to switch the problem type back to LP, CPLEX
will "forget" the integrality information again. And even nastier things
can happen---if one tries to solve the problem as an LP and then
switches the problem type to MIP, CPLEX "forgets" the LP solution
information. This is a big problem when using OsiCpx in a branch and cut
implementation where one wants to solve LP relaxations and retain both
the LP solution information and the integrality status of the variables
at the same time. This is basically impossible with a straightforward
interface to CPLEX. The best solution seems to be to simply cache the
information for the user and load it only when it is really needed,
i.e., when the branchAndBound() method is actually called. The
unfortunate side effect is that CPLEX always thinks it has an LP on its
hands and writeMps() will not work properly, as you have discovered.
There is no perfect solution to this until we redesign Osi, which is
currently in the works. Hope this helps explain things.
Ted
--
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss
More information about the Coin-discuss
mailing list