Skip to content

Commit

Permalink
fix 2 more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Dec 19, 2024
1 parent 56ed3f9 commit 2563173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ortools/sat/cp_model_presolve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13707,6 +13707,7 @@ namespace {
void UpdateHintInProto(PresolveContext* context) {
CpModelProto* proto = context->working_model;
if (!proto->has_solution_hint()) return;
if (context->ModelIsUnsat()) return;

// Extract the new hint information from the context.
auto* mutable_hint = proto->mutable_solution_hint();
Expand Down
1 change: 1 addition & 0 deletions ortools/sat/scheduling_cuts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ CutGenerator CreateCumulativeTimeTableCutGenerator(
TopNCuts top_n_cuts(5);
std::vector<TimeTableEvent> events;
const auto& lp_values = manager->LpValues();
if (lp_values.empty()) return true; // No linear relaxation.
const double capacity_lp = capacity.LpValue(lp_values);

// Iterate through the intervals. If start_max < end_min, the demand
Expand Down

0 comments on commit 2563173

Please sign in to comment.