[Clp-tickets] [COIN-OR Linear Programming Solver] #69: Unable to handle LP without Non-GUB columns in testGub.cpp

COIN-OR Linear Programming Solver coin-trac at coin-or.org
Wed Jul 2 04:31:27 EDT 2014


#69: Unable to handle LP without Non-GUB columns in testGub.cpp
------------------------+----------------------
 Reporter:  neo_liu     |      Owner:  somebody
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  component1  |    Version:
 Keywords:              |
------------------------+----------------------
 I find that line 144-150 in testGub.cpp tries to handle LP without Non-GUB
 columns. However, it doesn't work.

 A possible fix could be recording the last GUB row we found, inserting it
 into the right place in 'which', and updating corresponding counters.
 {{{
 84a85
 >      int lastGubRow = -1;
 118a120
 >                lastGubRow = iRow;
 143,150c145,163
 <           }
 <           if (!numberNormal) {
 <                printf("Putting back one gub row to make non-empty\n");
 <                for (iColumn = gubStart[putGub]; iColumn <
 gubEnd[putGub]; iColumn++)
 <                     mark[numberNormal++] = iColumn;
 <                putGub++;
 <                numberGub--;
 <           }
 ---
 >         }
 >         if (!numberNormal) {
 >             printf("Putting back one gub row to make non-empty\n");
 >             for (iColumn = gubStart[putGub]; iColumn < gubEnd[putGub];
 iColumn++)
 >                 mark[numberNormal++] = iColumn;
 >             putGub++;
 >             numberGub--;
 >             numberNonGub++;
 >
 >             int index = putNonGub;
 >             while (index < numberRows && which[index] < lastGubRow) {
 >                 which[index - 1] = which[index];
 >                 index++;
 >             }
 >             which[index - 1] = lastGubRow;
 >             --putNonGub;
 >
 >             rowIsGub[lastGubRow] = 0;
 >         }
 }}}

--
Ticket URL: <https://projects.coin-or.org/Clp/ticket/69>
COIN-OR Linear Programming Solver <http://projects.coin-or.org/Clp>
A linear programming solver.



More information about the Clp-tickets mailing list