idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
Home

A C++ Framework for Optimization

Start solving optimization problems now.

Get started with examples To installation guidelines

What 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:

Mixed-integer Optimization

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 Optimization

Tackle 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.

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 subfolder of your CMake project. It's really a matter of seconds before you can start using idol.

‍Example

Idol has a user-friendly interface which looks natural to people working in optimization. For instance, here is how you solve a knapsack problem instance with Gurobi.

using namespace idol;
const unsigned int n_items = 5;
const std::vector<double> profit { 40., 50., 100., 95., 30., };
const std::vector<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();
std::cout << "Objective value: " << model.get_best_obj() << std::endl;

Is this a MIP Solver?

idol is not a MIP solver in itself. In fact, it typically needs to call external solvers as a subroutine of more complex algorithms like, e.g., branch-and-cut-and-price.

The idea is to work hand in hand with existing well-engineered optimization software to enhance their possibilities. Not to replace them!

Another advantage of using idol is that you can easily switch between different solvers. Write your model once and try different solvers.

The following MIP solvers are currently supported by idol:

It also integrates with the following solvers for mixed-integer bilevel optimization: