Go to the documentation of this file. 1 #ifndef HOPS_LINEARPROGRAMGUROBIIMPL_HPP
2 #define HOPS_LINEARPROGRAMGUROBIIMPL_HPP
7 #ifdef HOPS_GUROBI_FOUND
9 #include <gurobi_c++.h>
13 class LinearProgramGurobiImpl :
public LinearProgram {
21 [[nodiscard]] LinearProgramSolution
solve(
const Eigen::VectorXd &objective)
const override;
29 std::tuple<Eigen::MatrixXd, Eigen::VectorXd>
33 std::unique_ptr<GRBModel> model;
34 std::vector<GRBVar> variables;
38 #else //HOPS_GUROBI_FOUND
44 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
48 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
52 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
56 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
60 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
63 std::tuple<Eigen::MatrixXd, Eigen::VectorXd>
65 throw std::runtime_error(
"HOPS did not find gurobi during compilation.");
70 #endif //HOPS_GUROBI_FOUND
71 #endif //HOPS_LINEARPROGRAMGUROBIIMPL_HPP
std::tuple< Eigen::MatrixXd, Eigen::VectorXd > addBoxConstraintsToUnconstrainedDimensions(double, double) override
Adds box constraints to unconstrained dimensions and returns system matrices. Changes to the system m...
Definition: LinearProgramGurobiImpl.hpp:64
Definition: LinearProgram.hpp:9
Eigen::VectorXd b
Definition: LinearProgram.hpp:54
Definition: LinearProgramSolution.hpp:9
LinearProgramSolution solve(const Eigen::VectorXd &) const override
Definition: LinearProgramGurobiImpl.hpp:47
std::vector< long > computeUnconstrainedDimensions() const override
Definition: LinearProgramGurobiImpl.hpp:59
LinearProgramGurobiImpl(const Eigen::MatrixXd &A, const Eigen::VectorXd &b)
Definition: LinearProgramGurobiImpl.hpp:43
LinearProgramSolution computeChebyshevCenter() const override
Definition: LinearProgramGurobiImpl.hpp:55
std::tuple< Eigen::MatrixXd, Eigen::VectorXd > removeRedundantConstraints(double) override
Removes redundant constraints and returns system matrices. Changes to the system matrices are reflect...
Definition: LinearProgramGurobiImpl.hpp:51
Eigen::MatrixXd A
Definition: LinearProgram.hpp:53
Definition: CsvReader.hpp:8
Definition: LinearProgramGurobiImpl.hpp:41