Skip to content

Commit 0a57d7e

Browse files
committed
Improve column generation feasibility info
1 parent 4791302 commit 0a57d7e

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

include/columngenerationsolver/algorithms/column_generation.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ struct ColumnGenerationOutput: Output
1717
/** Value of the relaxation solution (with dummy columns). */
1818
double relaxation_solution_value = 0.0;
1919

20+
bool feasible = false;
21+
2022
/** Number of columns in the linear subproblem. */
2123
ColIdx number_of_columns_in_linear_subproblem = 0;
2224

src/algorithms/column_generation.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ const ColumnGenerationOutput columngenerationsolver::column_generation(
820820

821821
// If the final solution doesn't contain any dummy column, then stop.
822822
if (!has_dummy_column) {
823+
output.feasible = true;
823824
output.relaxation_solution = solution_builder.build();
824825
break;
825826
}

src/algorithms/greedy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const GreedyOutput columngenerationsolver::greedy(
9090
if (parameters.timer.needs_to_end())
9191
break;
9292

93-
if (!cg_output.relaxation_solution.feasible_relaxation())
93+
if (!cg_output.feasible)
9494
break;
9595

9696
// Update bound.

src/algorithms/limited_discrepancy_search.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ const LimitedDiscrepancySearchOutput columngenerationsolver::limited_discrepancy
237237
algorithm_formatter.update_bound(cg_output.bound);
238238
output.relaxation_solution = cg_output.relaxation_solution;
239239
}
240-
if (!cg_output.relaxation_solution.feasible_relaxation()) {
240+
if (!cg_output.feasible) {
241241
//std::cout << "no solution" << std::endl;
242242
continue;
243243
}

0 commit comments

Comments
 (0)