[Osi] Bug in Osi?
Horand Gassmann
Horand.Gassmann at dal.ca
Tue Apr 2 08:58:48 EDT 2013
Stefan Vigerske <stefan at math.hu-berlin.de> wrote:
> Hi,
>
> I remember having put in this assert some years ago.
> The assert makes sense to me. If the basis status is at-upper-bound,
> then the upper bound should not be infinity.
> Instead of taking it out, it would be better to nail down the actual bug.
First off, thanks to both John and Stefan to take the time to respond.
I agree with Stefan, if there is a bug that somehow sets the starting
basis to odd values (and I would consider atUpperBound paired with
upperBound == infty to be odd), then it makes sense to try to track
that down first.
I have prepared an mps file and ran that through Cbc. The postsolve()
method is entered three times, and after the first call the number of
columns changes from 35 to 55. After the second call a bunch of cuts
are created according to the log, and the basis is changed in a number
of placed. I attach the log as a separate file. Maybe you can make
more of the output than I can.
Cheers
gus
> On 04/01/2013 06:22 PM, John Forrest wrote:
>> I noticed this recently when using trunk. I took out assert in
>> Osi/trunk and could see no harm in it.
>>
>> It should not be a fatal error. I don't really have time to track it
>> down. It must be a minor bug in one of the CoinPresolve.... postsolvers.
>>
>> John Forrest
>> On 01/04/13 16:28, Horand Gassmann wrote:
>>> Hi,
>>>
>>> I am trying to solve a small aggregate planning model. (AMPL model and
>>> data files attached.) The LP relaxation works fine, but when I add an
>>> integrality constraint on the first set of variables (number_workers),
>>> I get an assert error:
>>>
>>> ../../../../Osi/src/Osi/OsiPresolve.cpp:507: virtual void
>>> OsiPresolve::postsolve(bool): Assertion `status !=
>>> CoinWarmStartBasis::atUpperBound || originalModel_->getColUpper()[i] <
>>> infty' failed.
>>>
>>> What causes the error is unclear to me. I do not provide a starting
>>> basis, so I wouldn't expect the presolver to even go there. Is this a
>>> bug? Does the presolver require finite upper bounds? Any ideas?
>>>
>>> Thanks
>>>
>>> gus
>>> -------------------------------------------------------
>>>
>>> Horand I. Gassmann, Professor
>>>
>>> Kenneth C. Rowe School of Business, Dalhousie University
>>> 6100 University Avenue, PO Box 15000
>>> Halifax, Nova Scotia, Canada, B3H 4R2
>>> ph. (902) 494-1844
>>> fax (902) 494-1107
>>>
>>> http://myweb.dal.ca/gassmann/
>>>
>>>
>>> ----- End forwarded message -----
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Horand I. Gassmann, Professor
>>>
>>> Kenneth C. Rowe School of Business, Dalhousie University
>>> 6100 University Avenue, PO Box 15000
>>> Halifax, Nova Scotia, Canada, B3H 4R2
>>> ph. (902) 494-1844
>>> fax (902) 494-1107
>>>
>>> http://myweb.dal.ca/gassmann/
>>>
>>>
>>> _______________________________________________
>>> Osi mailing list
>>> Osi at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/osi
>>
>>
>>
>>
>> _______________________________________________
>> Osi mailing list
>> Osi at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/osi
>>
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/osi
>
>
-------------------------------------------------------
Horand I. Gassmann, Professor
Kenneth C. Rowe School of Business, Dalhousie University
6100 University Avenue, PO Box 15000
Halifax, Nova Scotia, Canada, B3H 4R2
ph. (902) 494-1844
fax (902) 494-1107
http://myweb.dal.ca/gassmann/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aggplan.mps
Type: application/octet-stream
Size: 6158 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/osi/attachments/20130402/e042e8f7/attachment-0001.obj>
-------------- next part --------------
(gdb) run test.mps
Starting program: /home/gus/research/OS/trunk-work/vpath-debug/bin/cbc test.mps
[Thread debugging using libthread_db enabled]
Welcome to the CBC MILP Solver
Version: Trunk (unstable)
Build Date: Jan 6 2013
Revision Number: 1797
command line - /home/gus/research/OS/trunk-work/vpath-debug/bin/cbc test.mps (default strategy 1)
At line 1 NAME test
At line 2 ROWS
At line 38 COLUMNS
At line 209 RHS
At line 223 BOUNDS
At line 247 ENDATA
"Problem test has 34 rows, 58 columns and 110 elements"
Coin0008I test read with 0 errors
Continuous objective value is 2.25312e+06 - 0.00 seconds
"Cgl0004I processed model has 33 rows, 55 columns (11 integer) and 108 elements"
Cbc0012I Integer solution of 2257500 found by DiveCoefficient after 0 iterations and 0 nodes (0.00 seconds)
"Cbc0038I Full problem 33 rows 55 columns, reduced to 19 rows 35 columns"
status[0] = 3
status[1] = 3
status[2] = 3
status[3] = 3
status[4] = 3
status[5] = 1
status[6] = 1
status[7] = 1
status[8] = 1
status[9] = 1
status[10] = 1
status[11] = 3
status[12] = 3
status[13] = 3
status[14] = 3
status[15] = 3
status[16] = 3
status[17] = 3
status[18] = 3
status[19] = 3
status[20] = 3
status[21] = 3
status[22] = 1
status[23] = 3
status[24] = 1
status[25] = 1
status[26] = 1
status[27] = 3
status[28] = 3
status[29] = 3
status[30] = 1
status[31] = 1
status[32] = 1
status[33] = 1
status[34] = 3
"Breakpoint 1, OsiPresolve::postsolve (this=0xedb830, updateStatus=true)"
at ../../../../Osi/src/Osi/OsiPresolve.cpp:501
501 for (int i = 0 ; i < ncols0 ; i++) {
(gdb) cont
Continuing.
status[0] = 3
status[1] = 3
status[2] = 3
status[3] = 3
status[4] = 3
status[5] = 1
status[6] = 1
status[7] = 1
status[8] = 1
status[9] = 3
status[10] = 3
status[11] = 3
status[12] = 3
status[13] = 3
status[14] = 1
status[15] = 1
status[16] = 3
status[17] = 3
status[18] = 3
status[19] = 3
status[20] = 3
status[21] = 3
status[22] = 3
status[23] = 3
status[24] = 3
status[25] = 3
status[26] = 3
status[27] = 3
status[28] = 3
status[29] = 3
status[30] = 3
status[31] = 1
status[32] = 3
status[33] = 3
status[34] = 1
status[35] = 1
status[36] = 1
status[37] = 1
status[38] = 1
status[39] = 1
status[40] = 3
status[41] = 3
status[42] = 3
status[43] = 1
status[44] = 3
status[45] = 3
status[46] = 2
status[47] = 3
status[48] = 1
status[49] = 1
status[50] = 1
status[51] = 1
status[52] = 3
status[53] = 3
status[54] = 3
"Breakpoint 1, OsiPresolve::postsolve (this=0xeb1450, updateStatus=true)"
at ../../../../Osi/src/Osi/OsiPresolve.cpp:501
501 for (int i = 0 ; i < ncols0 ; i++) {
(gdb)
Continuing.
Cbc0012I Integer solution of 2253250 found by RINS after 0 iterations and 0 nodes (0.02 seconds)
Cbc0031I 1 added rows had average density of 2
"Cbc0013I At root node, 17 cuts changed objective from 2253125 to 2253250 in 1 passes"
"Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements, 20 column cuts (20 active) in 0.000 seconds - new frequency is 1"
"Cbc0014I Cut generator 1 (Gomory) - 4 row cuts average 8.2 elements, 0 column cuts (4 active) in 0.000 seconds - new frequency is 1"
"Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.000 seconds - new frequency is -100"
"Cbc0014I Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.000 seconds - new frequency is -100"
"Cbc0014I Cut generator 4 (MixedIntegerRounding2) - 2 row cuts average 2.0 elements, 0 column cuts (2 active) in 0.000 seconds - new frequency is 1"
"Cbc0014I Cut generator 5 (FlowCover) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.000 seconds - new frequency is -100"
"Cbc0014I Cut generator 6 (TwoMirCuts) - 11 row cuts average 4.1 elements, 0 column cuts (11 active) in 0.000 seconds - new frequency is -100"
"Cbc0001I Search completed - best objective 2253250, took 1 iterations and 0 nodes (0.02 seconds)"
"Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost"
Cuts at root node changed objective from 2.25312e+06 to 2.25325e+06
Probing was tried 1 times and created 20 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 1 times and created 4 cuts of which 4 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 1 times and created 2 cuts of which 2 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 1 times and created 11 cuts of which 11 were active after adding rounds of cuts (0.000 seconds)
Current Previous Diff
status[0] = 3 status[0] = 3
status[1] = 3 status[1] = 3
status[2] = 3 status[2] = 3
status[3] = 3 status[3] = 3
status[4] = 3 status[4] = 3
status[5] = 1 status[5] = 1
status[6] = 1 status[6] = 1
status[7] = 1 status[7] = 1
status[8] = 1 status[8] = 1
status[9] = 3 status[9] = 3
status[10] = 3 status[10] = 3
status[11] = 3 status[11] = 3
status[12] = 3 status[12] = 3
status[13] = 3 status[13] = 3
status[14] = 1 status[14] = 1
status[15] = 2 status[15] = 1 ***
status[16] = 3 status[16] = 3
status[17] = 3 status[17] = 3
status[18] = 3 status[18] = 3
status[19] = 3 status[19] = 3
status[20] = 3 status[20] = 3
status[21] = 3 status[21] = 3
status[22] = 3 status[22] = 3
status[23] = 3 status[23] = 3
status[24] = 3 status[24] = 3
status[25] = 3 status[25] = 3
status[26] = 3 status[26] = 3
status[27] = 3 status[27] = 3
status[28] = 3 status[28] = 3
status[29] = 3 status[29] = 3
status[30] = 3 status[30] = 3
status[31] = 1 status[31] = 1
status[32] = 3 status[32] = 3
status[33] = 3 status[33] = 3
status[34] = 1 status[34] = 1
status[35] = 1 status[35] = 1
status[36] = 1 status[36] = 1
status[37] = 1 status[37] = 1
status[38] = 1 status[38] = 1
status[39] = 1 status[39] = 1
status[40] = 3 status[40] = 3
status[41] = 3 status[41] = 3
status[42] = 3 status[42] = 3
status[43] = 1 status[43] = 1
status[44] = 3 status[44] = 3
status[45] = 1 status[45] = 3 ***
status[46] = 1 status[46] = 2 ***
status[47] = 1 status[47] = 3 ***
status[48] = 1 status[48] = 1
status[49] = 3 status[49] = 1 ***
status[50] = 1 status[50] = 1
status[51] = 1 status[51] = 1
status[52] = 1 status[52] = 3 ***
status[53] = 1 status[53] = 3 ***
status[54] = 1 status[54] = 3 ***
"Breakpoint 1, OsiPresolve::postsolve (this=0xe66270, updateStatus=true)"
at ../../../../Osi/src/Osi/OsiPresolve.cpp:501
501 for (int i = 0 ; i < ncols0 ; i++) {
(gdb)
Continuing.
cbc: ../../../../Osi/src/Osi/OsiPresolve.cpp:514: virtual void OsiPresolve::postsolve(bool): Assertion `status != CoinWarmStartBasis::atUpperBound || originalModel_->getColUpper()[i] < infty' failed.
More information about the Osi
mailing list