[Coin-discuss] CbcModel.isProvenInfeasible() returns true on time-outed problem

Kish Shen kish.shen at crosscoreop.com
Sun Jul 9 22:19:29 EDT 2006


On Sunday 09 July 2006 16:44, John J Forrest wrote:
> Kish,
>
> I am unable to reproduce the isProvenInfeasible problem.  BTW it is not a
> good idea to set maximum time in solver - at best it will be meaningless
> and at worst it may confuse the code.
>
I have looked at the code more closely, and it seems that only the setting of 
the maximum seconds for the Clp is in effect when the branch and bound is 
called. This is because at the start of each branch and bound, I create a new 
CbCModel, copying the problem state from the OsiClpSolver, while the old 
CbcModel is deleted. The maximum seconds setting was on this old deleted 
CbcModel.
 
By maximum time in the solver, I assume you mean the linear solver, i.e. Clp?
The reason I do it is because I don't know if a MIP or linear problem is to be 
solved -- if linear, the problem is solved directly with the OsiClpSolver, 
otherwise, the problem is copied to a CbcModel as I described. The timeout 
applies to both types of problem.

For what I am using the COIN libraries for, a problem can be modified and 
resolved. The modification include adding or removing integer constraints on 
variables, so a problem can change from alinear to MIP and vise versa. 

One way around this problem is to set the timeout for the Clp solver just 
before I solve an LP problem, and reset it afterwards (because the problem 
might be solved as a MIP problem next). I could not find a way of resetting 
the maximum seconds for ClpModel (i.e. to `no timeout'), but looking at what 
is returned by ClpModel's  maximumSeconds() when no maximum seconds is set, 
it appears to be -1 for ClpModel (and 1e100 for CbcModel) -- please let me 
know if I should not assume these values for unsetting the maximum seconds.

> As for isProvenPrimalFeasible() this would just be a cover for
> bestSolution() so why not use that.  if (model.bestSolution()) then
> solution exists.
>
I am trying to use the OsiSolver calls as much as possible, and so if  
isProvenPrimalFeasible() is provided in OsiSolver, then I don't need to drop 
to Cbc specific calls. 

I think it would be very useful to provide this functionality at the  
OsiSolver level, because to determine primal feasibility on an aborted solve 
is highly dependent on problem type and solving methods, but the information 
is probably reasonably readily available for each solver and solving method, 
and so it should not require much extra code in each OsiSolverInterface, but 
allow the user of the Osi to avoid a lot of solver specific code.

Cheers,

Kish 
 
> John Forrest
>
>
>
>              Kish Shen
>              <kish.shen at crossc
>              oreop.com>                                                 To
>              Sent by:                  coin-discuss at list.coin-or.org
>              coin-discuss-boun                                          cc
>              ces at list.coin-or.
>              org                                                   Subject
>                                        [Coin-discuss]
>                                        CbcModel.isProvenInfeasible()
>              07/08/06 02:47 AM         returns true on      time-outed
>                                        problem
>
>              Please respond to
>              Discussions about
>                 open source
>                software for
>                 Operations
>                  Research
>              <coin-discuss at lis
>               t.coin-or.org>
>
>
>
>
>
>
> Hi,
>
> I have added timeout to my code by calling setMaximumSeconds() in the
> OsiClpSolver, and in the CbcModel copied from the OsiClpSolver.
>
> For the various problems that do timeout, when the CbcModel's
> isProvenInfeasible() returns true when it is called after the (aborted)
> branchAndBound.
>
> If the branchAndBound did not finish, then neither optimality nor
> infeasibility can be proven, so isProvenInfeasible() should return false.
> In
> fact, in some of the aborted MIP search, solutions were found, and so the
> problem is proven to be feasible, rather than infeasible. [as I mentioned
> in
> a previous post, for my usage of the COIN libraries, it would be very
> useful
> to have a isProvenPrimalFeasible() call]
>
> Cheers,
>
> Kish
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
> _______________________________________________
> 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