Skip to content

Commit dcad349

Browse files
committed
Fix small bugs in column generation
1 parent 5569716 commit dcad349

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/algorithms/column_generation.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,7 @@ const ColumnGenerationOutput columngenerationsolver::column_generation(
356356
// included in a currently fixed column.
357357
if (model.rows[element.row].coefficient_lower_bound >= 0
358358
&& column->type == VariableType::Integer
359-
&& row_values[element.row] + element.coefficient
360-
> model.rows[element.row].upper_bound) {
359+
&& row_values[element.row] >= model.rows[element.row].upper_bound) {
361360
ok = false;
362361
break;
363362
}
@@ -859,13 +858,15 @@ const ColumnGenerationOutput columngenerationsolver::column_generation(
859858

860859
// Check time.
861860
if (parameters.timer.needs_to_end()) {
861+
output.relaxation_solution = solution_builder.build();
862862
algorithm_formatter.end();
863863
return output;
864864
}
865865
// Check iteration limit.
866866
if (parameters.maximum_number_of_iterations != -1
867867
&& output.number_of_column_generation_iterations
868868
> parameters.maximum_number_of_iterations) {
869+
output.relaxation_solution = solution_builder.build();
869870
algorithm_formatter.end();
870871
return output;
871872
}

0 commit comments

Comments
 (0)