1 #ifndef LPINTERFACE_LPINTERFACE_SOPLEX_H
2 #define LPINTERFACE_LPINTERFACE_SOPLEX_H
6 #include <unordered_map>
10 #include "lpinterface/badge.hpp"
11 #include "lpinterface/common.hpp"
12 #include "lpinterface/data_objects.hpp"
13 #include "lpinterface/errors.hpp"
15 #include "lpinterface/lpinterface.hpp"
16 #include "lpinterface/soplex/lphandle_soplex.hpp"
42 static Status translate_status(
const soplex::SPxSolver::Status status);
45 std::shared_ptr<soplex::SoPlex> soplex_;
51 static const std::unordered_map<Param, int> param_dict_;
53 static const std::unordered_map<soplex::SPxSolver::Status, Status>
57 inline Status SoplexSolver::translate_status(
58 const soplex::SPxSolver::Status status) {
59 if (status == soplex::SPxSolver::Status::ERROR) {
62 return status_dict_.count(status) ? status_dict_.at(status)
63 :
throw UnknownStatusException(status);
69 #endif // LPINTERFACE_LPINTERFACE_SOPLEX_H
void set_parameter(const Param param, const int value) override
Set an integer-valued parameter in the internal LP solver. This method will fail with LpError::Unsupp...
OptimizationType
Objective sense for an LP.
Definition: lp.hpp:17
Interface representing linear program formulation. This interface represents linear programs of the f...
Definition: lp.hpp:53
Status solution_status() const override
Query the LP solver for the solution status.
Definition: lpinterface_soplex.hpp:20
Definition: lphandle_soplex.hpp:19
bool parameter_supported(const Param param) const override
Check whether the solver backend supports the given parameter.
const Solution< double > & get_solution() const override
Get the solution of the linear program. This method will fail with LpError::ModelNotsolvedError if th...
Internal error occured in SoPlex.
Definition: errors.hpp:117
const ILinearProgramHandle & linear_program() const override
Get immutable access to the underlying Linear Program object.
Param
Enum class representing linear solver parameters. The linear solvers this library interfaces with hav...
Definition: parameter_type.hpp:12
Status
Enum class representing LP solution status.
Definition: errors.hpp:129
Status solve() override
Solve the linear program.
Interface to internal linear program solver. This interface is the most important interface within lp...
Definition: lpinterface.hpp:22