A C++ Framework for Optimization
Start solving optimization problems now.
Get started now To installation guidelinesWhat is idol?¶
idol is a C++ framework for mathematical optimization and complex decision-making problems. It is designed to help you build new algorithms for solving complex optimization problems. The main philosophy behind idol is interoperability and ease of use. Hence, any algorithm can be seamlessly combined with any other algorithm to create a new one. For instance, you can combine a Branch-and-Bound algorithm with a Column Generation algorithm to create a Branch-and-Price algorithm.
const auto branch_and_price = branch_and_bound + column_generation;
model.use(branch_and_price);
model.optimize();
idol offers a variety of tools to tackle many different kinds of optimization problems:
Interface with solvers like Gurobi, Mosek, HiGHS and many others or implement your own branch-and-bound algorithm.
Branch-and-Price
Exploit your problem structure using branch-and-price and column generation. Solve large-scale problems with ease.
Bilevel OptimizationTackle optimistic and pessimistic bilevel problems through KKT or strong duality reformulations, or use the MibS solver.
Robust Optimization
Easily solve robust and adjustable robust optimization problems with standard techniques like dualization or with column-and-constraint generation.
And More...See all our tutorials...
Getting Started with idol¶
New to idol? Be sure to have a look at our tutorials. If you want to get a fast hands-on start, have a look at our local installation guideline. It is the easiest installation process one could think of: it automatically downloads the latest version of idol, and installs it locally in a sub-folder of your CMake project. It’s really a mater of seconds before you can start using idol.
Example
Idol has a user-friendly interface which should look natural to people working in optimization. For instance, here is how one solves a Knapsack Problem using the Gurobi solver.
using namespace idol;
const unsigned int n_items = 5;
const double[] profit = { 40., 50., 100., 95., 30., };
const double[] weight = { 2., 3.14, 1.98, 5., 3., };
const double capacity = 10.;
Env env;
Model model(env);
const auto x = model.add_vars(Dim<1>(n_items), 0., 1., Binary, 0., "x");
model.add_ctr(idol_Sum(j, Range(n_items), weight[j] * x[j]) <= capacity);
model.set_obj_expr(idol_Sum(j, Range(n_items), -profit[j] * x[j]);
model.use(Gurobi());
model.optimize();
Is this a MIP Solver?¶
idol is not a MIP solver in itself. In fact, it typically needs to call external solvers as a sub-routine of more complex algorithms such as Branch-and-Price.
The idea is to work hand in hand with existing well-engineered optimization software to enhance their possibilities. By doing so, we aim at solving larger and more complex problems than what is currently possible.
Still, idol can be used to solve your favourite MILP, MIQP, or MIQCQP through the many external solvers it interfaces with. A clear advantage of using idol to solve these problems is that it offers a unified and common interface to every solver. Thus, you can write your code once and test it with different solvers. The following solvers are currently supported by idol:
GLPK,
coin-or/Osi (which gives access to Cplex, Symphony, or any Osi compatible solver),