idol
A C++ Framework for Optimization
|
Public Member Functions | |
CRTP & | with_logs (bool t_value) |
CRTP & | with_time_limit (double t_time_limit) |
CRTP & | with_thread_limit (unsigned int t_max_n_threads) |
CRTP & | with_iteration_limit (unsigned int t_iteration_count_limit) |
CRTP & | with_best_bound_stop (double t_best_bound_stop) |
CRTP & | with_best_obj_stop (double t_user_best_obj) |
CRTP & | with_relative_gap_tolerance (double t_relative_gap_tolerance) |
CRTP & | with_absolute_gap_tolerance (double t_absolute_gap_tolerance) |
CRTP & | with_presolve (bool t_value) |
CRTP & | with_infeasible_or_unbounded_info (bool t_value) |
CRTP & | conditional (bool t_conditional_value, const std::function< void(CRTP &)> &t_if) |
CRTP & | conditional (bool t_conditional_value, const std::function< void(CRTP &)> &t_if, const std::function< void(CRTP &)> &t_else) |
virtual Optimizer * | operator() (const Model &t_model) const =0 |
virtual OptimizerFactory * | clone () const =0 |
template<class T > | |
T & | as () |
template<class T > | |
const T & | as () const |
template<class T > | |
bool | is () const |
Protected Member Functions | |
CRTP & | crtp () |
const CRTP & | crtp () const |
void | handle_default_parameters (Optimizer *t_optimizer) const |
Definition at line 66 of file OptimizerFactory.h.
|
inlineinherited |
Definition at line 44 of file OptimizerFactory.h.
|
inlineinherited |
Definition at line 52 of file OptimizerFactory.h.
|
pure virtualinherited |
Creates and return a copy of the optimizer factory. This is used for polymorphism.
Implemented in idol::Bilevel::BranchAndCut, idol::Bilevel::KKT, idol::Bilevel::MinMax::Dualize, idol::Bilevel::PessimisticAsOptimistic, idol::Bilevel::StrongDuality, idol::Bilevel::MibS, idol::BranchAndBound< NodeT >, idol::DantzigWolfeDecomposition, idol::PADM, idol::PenaltyMethod, idol::Cplex, idol::GLPK, idol::Gurobi, idol::HiGHS, idol::JuMP, idol::Mosek, idol::Osi, idol::Robust::AffineDecisionRule, idol::Robust::Benders, idol::Robust::ColumnAndConstraintGeneration, idol::Robust::Deterministic, and idol::Robust::ScenarioBasedKAdaptabilityProblemSolver.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::conditional | ( | bool | t_conditional_value, |
const std::function< void(CRTP &)> & | t_if | ||
) |
Executes the lambda function given as second parameter if and only if its first argument is true. This function can be used to build different optimizer factories depending on some external variable.
Example:
t_conditional_value | if true, the t_if lambda function is executed, if false, nothing happens. |
t_if | lambda function to execute in case t_conditional_value is true |
Definition at line 273 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::conditional | ( | bool | t_conditional_value, |
const std::function< void(CRTP &)> & | t_if, | ||
const std::function< void(CRTP &)> & | t_else | ||
) |
Executes the lambda function given as second parameter if and only if its first argument is true. This function can be used to build different optimizer factories depending on some external variable.
Example:
t_conditional_value | if true, the t_if lambda function is executed, if false, the t_else lambda function is. |
t_if | lambda function to execute in case t_conditional_value is true |
t_else | lambda function to execute in case t_conditional_value is false |
Definition at line 266 of file OptimizerFactory.h.
|
inlineprotected |
Definition at line 78 of file OptimizerFactory.h.
|
inlineprotected |
Definition at line 79 of file OptimizerFactory.h.
|
protected |
Definition at line 398 of file OptimizerFactory.h.
|
inlineinherited |
Definition at line 60 of file OptimizerFactory.h.
|
pure virtualinherited |
Creates and returns a new optimizer to solve the model given as parameter.
t_model | The model which the optimizer will solve |
Implemented in idol::Bilevel::BranchAndCut, idol::Bilevel::KKT, idol::Bilevel::MinMax::Dualize, idol::Bilevel::PessimisticAsOptimistic, idol::Bilevel::StrongDuality, idol::Bilevel::MibS, idol::BranchAndBound< NodeT >, idol::DantzigWolfeDecomposition, idol::PADM, idol::PenaltyMethod, idol::Cplex, idol::GLPK, idol::Gurobi, idol::HiGHS, idol::JuMP, idol::Mosek, idol::Osi, idol::Robust::AffineDecisionRule, idol::Robust::Benders, idol::Robust::ColumnAndConstraintGeneration, idol::Robust::Deterministic, and idol::Robust::ScenarioBasedKAdaptabilityProblemSolver.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_absolute_gap_tolerance | ( | double | t_absolute_gap_tolerance | ) |
Sets the absolute gap tolerance for the optimizer. When the optimizer proves that the absolute optimality gap is less than this threshold, the optimizer stops.
Example:
t_absolute_gap_tolerance | the absolute gap tolerance |
Definition at line 302 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_best_bound_stop | ( | double | t_best_bound_stop | ) |
Sets a threshold on the best bound for stopping the optimizer. When the optimizer have found a best bound which is greater than this threshold, the optimizer stops.
Example:
t_best_bound_stop | the threshold |
Definition at line 338 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_best_obj_stop | ( | double | t_user_best_obj | ) |
Sets a threshold on the best objective value for stopping the optimizer. When the optimizer have found a best objective value which is less than this threshold, the optimizer stops.
Example:
t_user_best_obj | the threshold |
Definition at line 326 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_infeasible_or_unbounded_info | ( | bool | t_value | ) |
Sets the behaviour of the optimizer when a model is shown to be infeasible or unbounded. When set to true, the optimizer is forced to prove feasibility or unboundedness by providing a certificate.
Example:
t_value | the activation level |
Definition at line 278 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_iteration_limit | ( | unsigned int | t_iteration_count_limit | ) |
Sets the maximum number of iterations which the optimizer go through
Example:
t_iteration_count_limit | the maximum number of iterations |
Definition at line 350 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_logs | ( | bool | t_value | ) |
Sets the log_master level and color for the optimizer
Example:
t_log_level | the log_master level |
t_log_color | the output color |
Definition at line 386 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_presolve | ( | bool | t_value | ) |
Sets the get_param_presolve activation for the optimizer.
Example:
t_value | the activation level for the optimizer's get_param_presolve (0 for disabling, 1 for enabling) |
Definition at line 290 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_relative_gap_tolerance | ( | double | t_relative_gap_tolerance | ) |
Sets the relative gap tolerance for the optimizer. When the optimizer proves that the relative optimality gap is less than this threshold, the optimizer stops.
Example:
t_relative_gap_tolerance | the relative gap tolerance |
Definition at line 314 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_thread_limit | ( | unsigned int | t_max_n_threads | ) |
Sets the maximum number of threads which the optimizer can use
Example:
t_max_n_threads | the number of threads which can be used |
Definition at line 362 of file OptimizerFactory.h.
CRTP & idol::OptimizerFactoryWithDefaultParameters< CRTP >::with_time_limit | ( | double | t_time_limit | ) |
Sets the time limit for the optimizer
Example:
t_time_limit | the time limit (in seconds) |
Definition at line 374 of file OptimizerFactory.h.