Skip to content

Commit

Permalink
[ModelBuilder] big update on the code; remove hash table, use c++ can…
Browse files Browse the repository at this point in the history
…onicalization of linear expressions; remove code duplication
  • Loading branch information
lperron committed Jul 27, 2023
1 parent 6d8495f commit 5b8cdcd
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 322 deletions.
6 changes: 0 additions & 6 deletions ortools/linear_solver/proto_solver/scip_proto_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ absl::StatusOr<double> ScipInfClamp(SCIP* scip, const double d) {
return absl::InvalidArgumentError("Cannot clamp a NaN.");
}
const double kScipInf = SCIPinfinity(scip);
if (d > -kScipInf && d < kScipInf) {
return d;
}
const double clamped = std::clamp(d, -kScipInf, kScipInf);
LOG_EVERY_N_SEC(WARNING, 5) << "A bound was clamped to SCIP's 'infinite' "
"value for safety; this may affect results. "
<< "Was: " << d << ", is now: " << clamped;
return clamped;
}

Expand Down
Loading

0 comments on commit 5b8cdcd

Please sign in to comment.