11 #include "../types/AlternativesPerformance.h"
12 #include "ortools/linear_solver/linear_solver.h"
13 #include "spdlog/spdlog.h"
46 float delta = 0.000001, std::string solver =
"GLOP");
67 std::vector<std::vector<std::vector<bool>>> y_matrix);
78 std::pair<float, std::vector<float>>
79 solve(std::vector<std::vector<std::vector<bool>>> x_matrix,
80 std::vector<std::vector<std::vector<bool>>> y_matrix);
101 std::vector<operations_research::MPVariable *>
getWeights()
const;
108 std::vector<operations_research::MPVariable *>
getXa()
const;
115 std::vector<operations_research::MPVariable *>
getXap()
const;
122 std::vector<operations_research::MPVariable *>
getYa()
const;
129 std::vector<operations_research::MPVariable *>
getYap()
const;
140 operations_research::MPSolver *solver;
141 std::string solver_name;
148 std::vector<operations_research::MPVariable *> x_a;
149 std::vector<operations_research::MPVariable *> x_ap;
150 std::vector<operations_research::MPVariable *> y_a;
151 std::vector<operations_research::MPVariable *> y_ap;
152 std::vector<operations_research::MPVariable *> weights;
153 operations_research::MPVariable *lambda;
156 std::vector<operations_research::MPConstraint *> x_constraints;
157 std::vector<operations_research::MPConstraint *> y_constraints;
158 std::vector<operations_research::MPConstraint *> weights_constraint;
External linear solver wrapper.
Definition: LinearSolver.h:35
void updateConstraints(std::vector< std::vector< std::vector< bool >>> x_matrix, std::vector< std::vector< std::vector< bool >>> y_matrix)
std::pair< float, std::vector< float > > solve(std::vector< std::vector< std::vector< bool >>> x_matrix, std::vector< std::vector< std::vector< bool >>> y_matrix)
std::vector< operations_research::MPVariable * > getXa() const
LinearSolver(AlternativesPerformance &ap, Config &conf, float delta=0.000001, std::string solver="GLOP")
operations_research::MPSolver * getSolver() const
std::vector< operations_research::MPVariable * > getXap() const
std::vector< operations_research::MPVariable * > getYa() const
AlternativesPerformance & getAlternativesPerformance() const
std::vector< operations_research::MPVariable * > getWeights() const
std::vector< operations_research::MPVariable * > getYap() const
High level configuration of the app.
Definition: config.h:20