[Cbc] Unbounded MIP problem returned as infeasible by CBCSolver

Kish Shen kisshen at cisco.com
Sun Mar 9 11:37:45 EDT 2014


John,

Thanks again for your help. I have modified the code as you suggested, 
and ran it successfully against our tests, and also the specific 
problems I had, so I have detected no new problems.

Cheers,

Kish

On 09/03/2014 09:36, John Forrest wrote:
> Kish,
>
> Thanks for finding all these outlier problems.
>
> I did not notice secondaryStatus_==1 case (infeasible on LP solve), so
> if changing CbcModel::isProvenInfeasible() to
>
>    if (!status_ && (bestObjective_ >= 1.0e30
>             && (secondaryStatus_==0||secondaryStatus_==1)))
>
> fixes then I will commit change.
>
> John
>
> On 08/03/14 21:35, Kish Shen wrote:
>> John,
>>
>> Thanks for the fix. I am unfortunately running into a new problem:
>>
>> One of our unit tests for our CBC interface code is now aborting with
>> the new CBC 2.8 that I downloaded, and I suspect it is related to the
>> fix for the unbounded problem -- for the following problem:
>>
>> Minimize
>> obj: x0
>> Subject To
>> cons0:  x0 + x1 >= 3
>> cons1:  x0 - x1 = 0
>> cons2:  x0 + x1 <= 3.5
>> Bounds
>>   x0 Free
>>   x1 Free
>> Integers
>> x0
>>
>> which is infeasible, but my code now report this as aborted, because
>> isProvenInfeasible() now returns false for this problem:
>>
>> >> if (model->isInitialSolveProvenOptimal()) {
>> >>     if (model->isProvenInfeasible()) {
>> >>         } // else assume MIP aborted
>> >> //<1>
>>
>> I assume it previously returned true, and the change is related to the
>> previous fix?
>>
>> Cheers,
>>
>> Kish
>>
>> On 06/03/2014 20:18, John Forrest wrote:
>>> 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
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Cbc mailing list
>>> Cbc at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>>
>>
>



More information about the Cbc mailing list