File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ bool HighsMachineSchedSeparator::findSingleMachineScheduleClique(
6464
6565 HighsInt numRows = 0 ;
6666 HighsInt maxRows = std::min (1000 , 2 * mipsolver.numRow ());
67- adjacency.reserve (maxRows);
67+ adjacency.reserve (maxRows + 2 );
6868 for (HighsInt row = 0 ; row != mipsolver.numRow (); row++) {
6969 double rowLower = mipsolver.model_ ->row_lower_ [row];
7070 double rowUpper = mipsolver.model_ ->row_upper_ [row];
@@ -79,6 +79,11 @@ bool HighsMachineSchedSeparator::findSingleMachineScheduleClique(
7979 double binCoef = 0 ;
8080 for (HighsInt i = start; i != end; i++) {
8181 HighsInt col = mipsolver.mipdata_ ->ARindex_ [i];
82+ if (mipsolver.mipdata_ ->domain .col_lower_ [col] == -kHighsInf ) {
83+ // TODO: Could some jobs be modelled in reverse?
84+ machineSchedRow = false ;
85+ break ;
86+ }
8287 if (mipsolver.mipdata_ ->domain .isBinary (col)) {
8388 if (binCol != -1 ) {
8489 machineSchedRow = false ;
@@ -135,7 +140,7 @@ bool HighsMachineSchedSeparator::findSingleMachineScheduleClique(
135140 numRows++;
136141 }
137142 }
138- if (numRows > maxRows) break ;
143+ if (numRows >= maxRows) break ;
139144 }
140145
141146 // A clique of size 3 needs at least 6 arcs
You can’t perform that action at this time.
0 commit comments