Skip to content

Commit

Permalink
Added clang-format off/on for two lines in QP solver
Browse files Browse the repository at this point in the history
  • Loading branch information
jajhall committed Oct 25, 2024
1 parent ee8e5e7 commit ef13944
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/mip/HighsLpRelaxation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,12 +1148,10 @@ HighsLpRelaxation::Status HighsLpRelaxation::run(bool resolve_on_error) {
// Status::kError as a result yielded #1962, where the root node
// is unbounded.
if (info.basis_validity == kBasisValidityInvalid) {
printf(
// highsLogUser(mipsolver.options_mip_->log_options,
// HighsLogType::kWarning,
highsLogUser(mipsolver.options_mip_->log_options,
HighsLogType::kWarning,
"HighsLpRelaxation::run LP is unbounded with no basis, "
"but not returning Status::kError\n");
// return Status::kError;
}

if (info.primal_solution_status == kSolutionStatusFeasible)
Expand Down
4 changes: 3 additions & 1 deletion src/qpsolver/dantzigpricing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class DantzigPricing : public Pricing {

public:
DantzigPricing(Runtime& rt, Basis& bas, ReducedCosts& rc)
: runtime(rt), basis(bas), redcosts(rc){};
//clang-format off
: runtime(rt), basis(bas), redcosts(rc) {};
//clang-format on

HighsInt price(const QpVector& x, const QpVector& gradient) {
HighsInt minidx = chooseconstrainttodrop(redcosts.getReducedCosts());
Expand Down
4 changes: 3 additions & 1 deletion src/qpsolver/devexpricing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class DevexPricing : public Pricing {
: runtime(rt),
basis(bas),
redcosts(rc),
weights(std::vector<double>(rt.instance.num_var, 1.0)){};
//clang-format off
weights(std::vector<double>(rt.instance.num_var, 1.0)) {};
//clang-format on

// B lambda = g
// lambda = inv(B)g
Expand Down

0 comments on commit ef13944

Please sign in to comment.