Loading...
Searching...
No Matches
idol::Optimizers::GLPK Class Reference

Description

Definition at line 17 of file Optimizers_GLPK.h.

Classes

class  DynamicLib

Public Methods

 GLPK (const Model &t_model, bool t_continuous_relaxation)
std::string name () const override
void set_param_time_limit (double t_time_limit) override
void set_param_best_obj_stop (double t_best_obj_stop) override
void set_param_best_bound_stop (double t_best_bound_stop) override
void set_param_presolve (bool t_value) override
void set_param_logs (bool t_value) override
int & operator[] (const Var &t_var)

Public Static Methods

static Model read_from_file (Env &t_env, const std::string &t_filename)
static bool is_available ()
static std::string get_version ()

Protected Methods

void hook_build () override
void hook_optimize () override
void hook_write (const std::string &t_name) override
int hook_add (const Var &t_var, bool t_add_column) override
int hook_add (const Ctr &t_ctr) override
int hook_add (const QCtr &t_ctr) override
int hook_add (const SOSCtr &t_ctr) override
void hook_update_objective_sense () override
void hook_update_matrix (const Ctr &t_ctr, const Var &t_var, double t_constant) override
void hook_update () override
void hook_update (const Var &t_var) override
void hook_update (const Ctr &t_ctr) override
void hook_update_objective () override
void hook_update_rhs () override
void hook_remove (const Var &t_var) override
void hook_remove (const Ctr &t_ctr) override
void hook_remove (const QCtr &t_ctr) override
void hook_remove (const SOSCtr &t_ctr) override
void set_var_attr (int t_index, int t_type, double t_lb, double t_ub, double t_obj)
void set_ctr_attr (int t_index, int t_type, double t_rhs)
void save_simplex_solution_status ()
void compute_farkas_certificate ()
void compute_unbounded_ray ()
void save_milp_solution_status ()
SolutionStatus get_status () const override
SolutionReason get_reason () const override
double get_best_obj () const override
double get_best_bound () const override
double get_var_primal (const Var &t_var) const override
double get_var_reduced_cost (const Var &t_var) const override
double get_var_ray (const Var &t_var) const override
double get_ctr_dual (const Ctr &t_ctr) const override
double get_ctr_farkas (const Ctr &t_ctr) const override
double get_relative_gap () const override
double get_absolute_gap () const override
unsigned int get_n_solutions () const override
unsigned int get_solution_index () const override
void set_solution_index (unsigned int t_index) override
void build () final
void write (const std::string &t_name) final
void add (const Var &t_var) final
void update () final
void remove (const Var &t_var) final
bool has_lazy (const Var &t_var) const
auto & lazy (const Var &t_var)
auto & lazy_vars ()
auto & lazy_ctrs ()
auto & lazy_qctrs ()
auto & lazy_sosctrs ()
void set_objective_to_be_updated ()
bool is_objective_to_be_updated () const
void set_objective_as_updated ()
void set_rhs_to_be_updated ()
bool is_rhs_to_be_updated () const
void set_rhs_as_updated ()
void update_obj_sense () override
void update_obj () override
void update_rhs () override
void update_obj_constant () override
void update_mat_coeff (const Ctr &t_ctr, const Var &t_var) override
void update_ctr_type (const Ctr &t_ctr) override
void update_ctr_rhs (const Ctr &t_ctr) override
void update_var_type (const Var &t_var) override
void update_var_lb (const Var &t_var) override
void update_var_ub (const Var &t_var) override
void update_var_obj (const Var &t_var) override

Protected Static Methods

static DynamicLibget_dynamic_lib (bool t_throw_on_fail=true)
static Model read_from_glpk (idol::Env &t_env, glp_prob *t_model)
static Model read_from_lp_file (Env &t_env, const std::string &t_filename)
static Model read_from_mps_file (Env &t_env, const std::string &t_filename)

Methods Documentation

◆ add()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::add ( const Var & t_var)
finalprotectedinherited

Definition at line 90 of file OptimizerWithLazyUpdates.h.

◆ build()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::build ( )
finalprotectedinherited

Definition at line 84 of file OptimizerWithLazyUpdates.h.

◆ has_lazy()

bool idol::OptimizerWithLazyUpdates< int, int, int, int >::has_lazy ( const Var & t_var) const
inlinenodiscardprotectedinherited

Definition at line 126 of file OptimizerWithLazyUpdates.h.

◆ hook_add()

int idol::Optimizers::GLPK::hook_add ( const Var & t_var,
bool t_add_column )
overrideprotectedvirtual

◆ hook_build()

void idol::Optimizers::GLPK::hook_build ( )
overrideprotectedvirtual

◆ hook_remove()

void idol::Optimizers::GLPK::hook_remove ( const Var & t_var)
overrideprotectedvirtual

◆ hook_update()

void idol::Optimizers::GLPK::hook_update ( )
overrideprotectedvirtual

◆ hook_update_matrix()

void idol::Optimizers::GLPK::hook_update_matrix ( const Ctr & t_ctr,
const Var & t_var,
double t_constant )
overrideprotectedvirtual

◆ hook_update_objective()

void idol::Optimizers::GLPK::hook_update_objective ( )
overrideprotectedvirtual

◆ hook_update_objective_sense()

void idol::Optimizers::GLPK::hook_update_objective_sense ( )
overrideprotectedvirtual

◆ hook_update_rhs()

void idol::Optimizers::GLPK::hook_update_rhs ( )
overrideprotectedvirtual

◆ hook_write()

void idol::Optimizers::GLPK::hook_write ( const std::string & t_name)
overrideprotectedvirtual

◆ is_objective_to_be_updated()

bool idol::OptimizerWithLazyUpdates< int, int, int, int >::is_objective_to_be_updated ( ) const
inlinenodiscardprotectedinherited

Definition at line 166 of file OptimizerWithLazyUpdates.h.

◆ is_rhs_to_be_updated()

bool idol::OptimizerWithLazyUpdates< int, int, int, int >::is_rhs_to_be_updated ( ) const
inlinenodiscardprotectedinherited

Definition at line 170 of file OptimizerWithLazyUpdates.h.

◆ lazy()

auto & idol::OptimizerWithLazyUpdates< int, int, int, int >::lazy ( const Var & t_var)
inlineprotectedinherited

Definition at line 141 of file OptimizerWithLazyUpdates.h.

◆ lazy_ctrs()

auto & idol::OptimizerWithLazyUpdates< int, int, int, int >::lazy_ctrs ( )
inlineprotectedinherited

Definition at line 156 of file OptimizerWithLazyUpdates.h.

◆ lazy_qctrs()

auto & idol::OptimizerWithLazyUpdates< int, int, int, int >::lazy_qctrs ( )
inlineprotectedinherited

Definition at line 159 of file OptimizerWithLazyUpdates.h.

◆ lazy_sosctrs()

auto & idol::OptimizerWithLazyUpdates< int, int, int, int >::lazy_sosctrs ( )
inlineprotectedinherited

Definition at line 162 of file OptimizerWithLazyUpdates.h.

◆ lazy_vars()

auto & idol::OptimizerWithLazyUpdates< int, int, int, int >::lazy_vars ( )
inlineprotectedinherited

Definition at line 153 of file OptimizerWithLazyUpdates.h.

◆ name()

std::string idol::Optimizers::GLPK::name ( ) const
inlinenodiscardoverride

Definition at line 87 of file Optimizers_GLPK.h.

◆ operator[]()

int & idol::OptimizerWithLazyUpdates< int, int, int, int >::operator[] ( const Var & t_var)
inlineinherited

Definition at line 185 of file OptimizerWithLazyUpdates.h.

◆ remove()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::remove ( const Var & t_var)
finalprotectedinherited

Definition at line 114 of file OptimizerWithLazyUpdates.h.

◆ set_objective_as_updated()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::set_objective_as_updated ( )
inlineprotectedinherited

Definition at line 167 of file OptimizerWithLazyUpdates.h.

◆ set_objective_to_be_updated()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::set_objective_to_be_updated ( )
inlineprotectedinherited

Definition at line 165 of file OptimizerWithLazyUpdates.h.

◆ set_rhs_as_updated()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::set_rhs_as_updated ( )
inlineprotectedinherited

Definition at line 171 of file OptimizerWithLazyUpdates.h.

◆ set_rhs_to_be_updated()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::set_rhs_to_be_updated ( )
inlineprotectedinherited

Definition at line 169 of file OptimizerWithLazyUpdates.h.

◆ update()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update ( )
finalprotectedinherited

Definition at line 105 of file OptimizerWithLazyUpdates.h.

◆ update_ctr_rhs()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_ctr_rhs ( const Ctr & t_ctr)
overrideprotectedinherited

Definition at line 179 of file OptimizerWithLazyUpdates.h.

◆ update_ctr_type()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_ctr_type ( const Ctr & t_ctr)
overrideprotectedinherited

Definition at line 178 of file OptimizerWithLazyUpdates.h.

◆ update_mat_coeff()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_mat_coeff ( const Ctr & t_ctr,
const Var & t_var )
overrideprotectedinherited

Definition at line 177 of file OptimizerWithLazyUpdates.h.

◆ update_obj()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_obj ( )
overrideprotectedinherited

Definition at line 174 of file OptimizerWithLazyUpdates.h.

◆ update_obj_constant()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_obj_constant ( )
overrideprotectedinherited

Definition at line 176 of file OptimizerWithLazyUpdates.h.

◆ update_obj_sense()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_obj_sense ( )
overrideprotectedinherited

Definition at line 173 of file OptimizerWithLazyUpdates.h.

◆ update_rhs()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_rhs ( )
overrideprotectedinherited

Definition at line 175 of file OptimizerWithLazyUpdates.h.

◆ update_var_lb()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_var_lb ( const Var & t_var)
overrideprotectedinherited

Definition at line 181 of file OptimizerWithLazyUpdates.h.

◆ update_var_obj()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_var_obj ( const Var & t_var)
overrideprotectedinherited

Definition at line 183 of file OptimizerWithLazyUpdates.h.

◆ update_var_type()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_var_type ( const Var & t_var)
overrideprotectedinherited

Definition at line 180 of file OptimizerWithLazyUpdates.h.

◆ update_var_ub()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::update_var_ub ( const Var & t_var)
overrideprotectedinherited

Definition at line 182 of file OptimizerWithLazyUpdates.h.

◆ write()

void idol::OptimizerWithLazyUpdates< int, int, int, int >::write ( const std::string & t_name)
finalprotectedinherited

Definition at line 87 of file OptimizerWithLazyUpdates.h.