[Cbc] Unbounded MIP problem returned as infeasible by CBCSolver

John Forrest john.forrest at fastercoin.com
Thu Mar 6 15:18:28 EST 2014


Kish,

Have changed so (model->isInitialSolveProvenOptimal()) returns false (as 
it should).

Checked in to 2.8.  Hope that fixes it.

John

On 06/03/14 19:32, Kish Shen wrote:
> Hi John,
>
> Thank you very much for your reply.
>
> > However when I try model->isContinuousUnbounded() it returns true
>
> I reran my program and you are correct -- isContinuousUnbounded() does 
> return true for the problem. I am not sure what happened previously, 
> sorry for the misreporting.
>
> >    (model->isProvenInfeasible()) returning true is a bug - the fix is
> > modifying code in that function to
> >
> >   if (!status_ && (bestObjective_ >= 1.0e30 && !secondaryStatus_))
> >
>
> I made the above change in CbcModel.cpp, and isProvenInfeasible() 
> returns false as expected. Thanks! Will this change be put into the 
> Cbc 2.8 branch?
>
> However, my result status checking code now reports the problem slove 
> as aborted, because in my code:
>
>
> if (model->isInitialSolveProvenOptimal()) {
>     if (model->isProvenInfeasible()) {
>         } // else assume MIP aborted
> //<1>
> ...
> }
> ...
> if (model->isContinuousUnbounded()) {
> // problem is infeasible or unbounded
> ....
> }
>
> so if isProvenInfeasible() is false, the problem is assumed to have 
> aborted, and isContinousUnbounded() is only called if 
> isInitialSolveProvenOptimal() is false.
>
> Should the isContinousUnbounded() test be moved into <1> above, or 
> should the test be performed at both places (i.e. at <1> and where it 
> is now)?
>
> Thanks and cheers,
>
> Kish
>
>
>
>
> On 06/03/2014 10:08, John Forrest wrote:
>> Kish,
>>
>>    (model->isProvenInfeasible()) returning true is a bug - the fix is
>> modifying code in that function to
>>
>>   if (!status_ && (bestObjective_ >= 1.0e30 && !secondaryStatus_))
>>
>> However when I try model->isContinuousUnbounded() it returns true
>>
>> If I have
>>
>> printf("status %d secondary %d infeasible %s unbounded %s\n",
>> model.status(),model.secondaryStatus(),model.isProvenInfeasible()
>>       ? "true" : "false",model.isContinuousUnbounded() ? "true" : 
>> "false");
>>
>> in my code I get
>>
>> status 0 secondary 7 infeasible false unbounded true
>>
>> with above fix and
>>
>> status 0 secondary 7 infeasible true unbounded true
>>
>> without fix.
>>
>> Can you check isContinuousUnbounded() and if it fails send me some code
>> to reproduce?
>>
>> John Forrest
>>
>>
>> On 06/03/14 01:17, Kish Shen wrote:
>>> Hi,
>>>
>>> For the following (very simple) problem:
>>>
>>> Minimize
>>> obj: x0
>>> Subject To
>>> cons0:  x0 + x1 <= 3
>>> cons1:  X0 = X1  = 0
>>> Bounds
>>>  x0 Free
>>>  x1 Free
>>> Integers
>>> x0
>>> End
>>>
>>> which is unbounded, but when we use CBCSolver to solve this problem,
>>> we get the result that the problem is infeasible, specifically,
>>>
>>> CbcModel* model;
>>> .....
>>> model->isProvenInfeasible() returns 1 (true)
>>>
>>> Here is the relevant code we use to determine the status of a problem
>>> after calling CbcSolver (via CbcMain0 and CbcMain1) to solve the 
>>> problem:
>>>
>>>
>>> if (model->isInitialSolveProvenOptimal()) {
>>>    if (model->isProvenInfeasible()) {
>>>        ....
>>>
>>> For the above problem, the above if .. succeeds, which I think should
>>> only be the case if the problem is proven infeasible at the root node,
>>> but the root node solve should be unbounded (and in fact if I solve
>>> the linear problem with CLP, the result is indeed unbounded), but the
>>> test
>>>
>>> We actually have code to test if the root node solve is unbounded (in
>>> which case we classify the solve result as "Unknown", i.e. either
>>> infeasible or unbounded, which was the result I expected for the above
>>> problem), but
>>>
>>> model->isContinuousUnbounded() returns 0 for the above problem, rather
>>> than 1 as I expected.
>>>
>>> Is there something I am doing wrong, or is there a problem?
>>>
>>> I am using Cbc 2.8, which was downloaded last month (14 Feb).
>>>
>>> Thanks in advance for any help.
>>>
>>> Cheers,
>>>
>>> Kish
>>>
>>>
>>> _______________________________________________
>>> Cbc mailing list
>>> Cbc at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/cbc
>>>
>>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cbc
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
>



More information about the Cbc mailing list