46 #ifndef GLPK_SOLVER_HPP 47 #define GLPK_SOLVER_HPP 54 #include "config_HAVE_GLPK.hpp" 56 #include "config_HAVE_GLPK_NESTED.hpp" 58 #include <glpk/glpk.h> 101 void print(std::ostream& os)
override;
106 void make(
int nvars)
override;
107 int solve()
override;
109 void add_row(std::map<int, double>& i_coeffs,
double i_rhs,
ilp_sign i_sign,
const std::string& name)
override;
116 void set_col_name(
int var,
const std::string& name)
override;
int solve() override
Solve the linear problem.
void set_all_bounds() override
Set the lower and upper of the variables using lower_bounds and upper_bounds.
glp_iocp * iocp
integer solver control parameter
void objective_add(std::map< int, double > &i_coeffs, ilp_dir dir) override
Set the objective function.
int solve_ilp() override
Solve the integer linear problem.
int add_empty_column() override
Add an empty column ???
void set_col_name(int var, const std::string &name) override
Set name of a variable (column)
void set_all_bounds_new()
Set the lower and upper of the variables using lower_bounds and upper_bounds.
redefinition of map to manage ordered/unordered structures
bool mip_solution
it is true when solve_ilp() has been executed, false otherwise
void print(std::ostream &os) override
Print the problem.
void print_to_file(const std::string &file_name) override
Print the problem.
ilp_dir
Type of objective function.
void set_int(int i) override
Set a variable to have only integer values.
glp_bfcp * bfcp
basis factorization control parameters
int get_number_constraints() const override
Return the number of constraints.
void make(int nvars) override
???
glp_smcp * scp
simplex_control_params
Base class providing several methods to encapsulate the interface to several ilp solver.
std::string get_col_name(int var) override
Get name of a variable (column)
void get_vars_solution(std::map< int, double > &vars) const override
Return the solution of the problem.
ilp_sign
Possible operator in constraints.
int get_number_variables() const override
Return the number of variables.
void add_row(std::map< int, double > &i_coeffs, double i_rhs, ilp_sign i_sign, const std::string &name) override
Add a constraint to the ilp formulation.
This class provide an interface to different solvers.