Skip to content

Commit

Permalink
[issue1076] switch off simplifier and fix solution extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPommerening committed Jul 18, 2023
1 parent 87bbc6f commit 2725797
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/search/lp/soplex_solver_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static LPColSetReal variables_to_col_set(const named_vector::NamedVector<LPVaria

SoPlexSolverInterface::SoPlexSolverInterface() : SolverInterface() {
soplex.setIntParam(SoPlex::VERBOSITY, SoPlex::VERBOSITY_ERROR);
soplex.setIntParam(SoPlex::SIMPLIFIER, SoPlex::SIMPLIFIER_OFF);
}

void SoPlexSolverInterface::load_problem(const LinearProgram &lp) {
Expand Down Expand Up @@ -123,7 +124,7 @@ void SoPlexSolverInterface::set_mip_gap(double /*gap*/) {
}

void SoPlexSolverInterface::solve() {
soplex.solve();
soplex.optimize();
}

void SoPlexSolverInterface::write_lp(const string &filename) const {
Expand Down Expand Up @@ -206,9 +207,9 @@ double SoPlexSolverInterface::get_objective_value() const {
}

vector<double> SoPlexSolverInterface::extract_solution() const {
VectorBase<double> obj(get_num_variables());
soplex.getObjReal(obj);
return obj.vec();
VectorBase<double> sol(get_num_variables());
soplex.getPrimal(sol);
return sol.vec();
}

int SoPlexSolverInterface::get_num_variables() const {
Expand Down

0 comments on commit 2725797

Please sign in to comment.