Skip to content

Commit

Permalink
deploy: 7f26e61
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Jan 28, 2025
0 parents commit c61ad49
Show file tree
Hide file tree
Showing 501 changed files with 65,575 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 4295ac0db0d6807f0e54186f96877923
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/bilevel/index.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/bilevel/single-level/KKT.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/classes/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/index.doctree
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/misc/CtrType.doctree
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/misc/VarType.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/Ctr.doctree
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/Dim.doctree
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/Env.doctree
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/Expr.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/QCtr.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/modeling/Var.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/mixed-integer/padm/PADM.doctree
Binary file not shown.
Binary file added .doctrees/api/robust/index.doctree
Binary file not shown.
Binary file added .doctrees/api/robust/modeling/Description.doctree
Binary file not shown.
Binary file added .doctrees/api/types/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/benchmark/index.doctree
Binary file not shown.
Binary file added .doctrees/developer_guide/build-the-doc.doctree
Binary file not shown.
Binary file added .doctrees/developer_guide/index.doctree
Binary file not shown.
Binary file added .doctrees/developer_guide/tests.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples/bilevel-kkt.doctree
Binary file not shown.
Binary file added .doctrees/examples/bilevel-mibs.doctree
Binary file not shown.
Binary file added .doctrees/examples/bilevel-pessimistic.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/examples/index.doctree
Binary file not shown.
Binary file added .doctrees/examples/knapsack-problem.doctree
Binary file not shown.
Binary file added .doctrees/examples/robust-adr.doctree
Binary file not shown.
Binary file added .doctrees/examples/robust-determistic.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/faq/gap.doctree
Binary file not shown.
Binary file added .doctrees/faq/index.doctree
Binary file not shown.
Binary file added .doctrees/faq/mosek-and-eigen.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/installation/index.doctree
Binary file not shown.
Binary file added .doctrees/installation/local_installation.doctree
Binary file not shown.
Binary file added .doctrees/installation/options.doctree
Binary file not shown.
Binary file added .doctrees/references.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/tutorials/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/ecdf-gap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions _sources/api/bilevel/external-solvers/MibS.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bilevel::MibS
=============

Doxygen
-------

.. doxygenclass:: idol::Bilevel::MibS
7 changes: 7 additions & 0 deletions _sources/api/bilevel/external-solvers/Optimizers_MibS.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Optimizers::Bilevel::MibS
=========================

Doxygen
-------

.. doxygenclass:: idol::Optimizers::Bilevel::MibS
29 changes: 29 additions & 0 deletions _sources/api/bilevel/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Bilevel Optimization
====================

Modeling
^^^^^^^^

.. toctree::
:maxdepth: 1
:glob:

modeling/*

External Solvers
^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
:glob:

external-solvers/*

Single-level Reformulations
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1
:glob:

single-level/*
7 changes: 7 additions & 0 deletions _sources/api/bilevel/modeling/Description.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bilevel::Description
====================

Doxygen
-------

.. doxygenclass:: idol::Bilevel::Description
7 changes: 7 additions & 0 deletions _sources/api/bilevel/single-level/KKT.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bilevel::KKT
============

Doxygen
-------

.. doxygenclass:: idol::Bilevel::KKT
7 changes: 7 additions & 0 deletions _sources/api/bilevel/single-level/Optimizers_KKT.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Optimizers::Bilevel::KKT
========================

Doxygen
-------

.. doxygenclass:: idol::Optimizers::Bilevel::KKT
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Optimizers::Bilevel::StrongDuality
==================================

Doxygen
-------

.. doxygenclass:: idol::Optimizers::Bilevel::StrongDuality
7 changes: 7 additions & 0 deletions _sources/api/bilevel/single-level/StrongDuality.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bilevel::StrongDuality
============

Doxygen
-------

.. doxygenclass:: idol::Bilevel::StrongDuality
4 changes: 4 additions & 0 deletions _sources/api/classes/external-bilevel/MibS.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bilevel::Mibs
=============

.. doxygenclass:: idol::Bilevel::MibS
4 changes: 4 additions & 0 deletions _sources/api/classes/external-bilevel/Optimizers_MibS.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Optimizers::Bilevel::MibS
=========================

.. doxygenclass:: idol::Optimizers::Bilevel::MibS
8 changes: 8 additions & 0 deletions _sources/api/classes/external-bilevel/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
External Bilevel Solvers
========================

.. toctree::
:maxdepth: 1
:glob:

*
36 changes: 36 additions & 0 deletions _sources/api/classes/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.. _classes:

Class List
==========

Mixed-Integer Programming
^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 2
:glob:

common/index
external-mip/index
universal-callbacks/index
branch-and-bound/index
column-generation/index

Bilevel Optimization
^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 2
:glob:

external-bilevel/index

Robust Optimization
^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 2
:glob:

column-and-constraint-generation/index

85 changes: 85 additions & 0 deletions _sources/api/classes/universal-callbacks/Callback.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. _api_Callback:

Callback
========

Callbacks are user-defined functions which are invoked during the execution of branch-and-bound algorithms at certain
key steps of the procedure. These key m_n_points_bound are called :ref:`events <api_CallbackEvent>` in idol.
Callback functions can be used to monitor the algorithm's progress, control its behavior, or perform additional processing.

UserCutCallback and LazyCutCallback
-----------------------------------

A common use of callbacks is to implement custom cut generation procedures at each node of the branch-and-bound tree. Note that
idol offers out-of-the-box callback routines for cut separation. Namely, :ref:`UserCutCallback <api_UserCutCallback>`
and :ref:`LazyCutCallback <api_LazyCutCallback>`. Yet, it is totally possible to define your own cut generation procedure
by using the ``Callback::add_user_cut`` and ``Callback::add_lazy_cut`` methods inside your callback.

In a nutshell, :ref:`UserCutCallback <api_UserCutCallback>` (or, similarly, ``Callback::add_user_cut``) are intended for
cuts which have a potential to improve the quality of the relaxation but whose presence in the model is not necessary for the
branch-and-bound to converge to an optimal solution. :ref:`UserCutCallback <api_UserCutCallback>` callbacks are called when
a non-valid solution has been found.

:ref:`LazyCutCallback <api_LazyCutCallback>` (or, similarly, ``Callback::add_lazy_cut``),
instead, are intended to generate constraints which should be part of the model but which were omitted in the model for some reason.
A typical reason for omitting constraints in a model's definition is the large number of such constraints.
:ref:`LazyCutCallback <api_LazyCutCallback>` callbacks are called when a valid solution has been found.

Creating your own callback
--------------------------

If you want to create your own callback, you should first create a new class which inherits the ``Callback`` class and
overrides the ``operator()(CallbackEvent)`` method.

Note that callbacks cannot be given "as-is" to an optimizer but must be passed through a ``CallbackFactory``. A callback
factory is a class whose role is to create a new callback object whenever it is needed. Every callback factories must be
a child (or little child) of the ``CallbackFactory`` class.

.. admonition:: Example

We now give an example of callback which prints out every valid solution found.

.. code-block::
class MyCallback : public CallbackFactory {
public:
class Strategy { // Real callback implementation
protected:
void operator()(CallbackEvent t_event) {
if (t_event != IncumbentSolution) {
return;
}
std::cout << primal_solution() << std::endl;
}
}
Callback* operator()() { // Creates a new callback object
return new Strategy();
}
CallbackFactory* clone() const { // Creates a copy of the callback factory
return new MyCallback(*this);
}
}
Later, it is then possible to use this callback in compliant optimizers like :ref:`Gurobi <api_Gurobi>` or :ref:`BranchAndBound <api_BranchAndBound>`.

.. code-block::
model.use(
Gurobi().with_callback(MyCallback();
);
model.optimize();
.. hint::

Note that there also exists more advanced callbacks which are specific to idol's branch-and-bound implementation.
For these advanced feature, see :ref:`BranchAndBoundCallback <api_BranchAndBoundCallback>`.

.. doxygenclass:: idol::Callback
:protected-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _api_CallbackFactory:

CallbackFactory
===============

.. doxygenclass:: idol::CallbackFactory
:protected-members:
60 changes: 60 additions & 0 deletions _sources/api/classes/universal-callbacks/LazyCutCallback.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.. _api_LazyCutCallback:

LazyCutCallback
===============

Lazy cuts are essentially constraints which are part of an optimization model but which have been omitted in the current
definition of the model. Lazy cuts typically arise in models with a large number of constraints. Instead of enumerating
then all, it may be judicious to omit some of them to get a smaller optimization model. Then, the returned solution is
checked for feasibility against the whole set of constraints. If a violated constraint is identified, we add the
constraint to the model and resolve. If not, then all the constraints are satisfied and the solution is optimal for the
original model in which all constraints materializes.

The LazyCutCallback can be used to implement lazy cut constraint generation on the fly, during the optimization process.

Consider the following optimization problem:

.. math::
\begin{align}
\min_x \ & c^\top x \\
\text{s.t.} \ & x\in X, \\
& \xi^\top x \le \xi_0 \quad (\xi_0,\xi) \in \Xi,
\end{align}
in which assume that :math:`|\Xi|` is large (potentially infinite). The idea is to start by solving the following
relaxed master problem in which constraints associated to :math:`(\xi_0,\xi)` have been omitted.

.. math::
\begin{align}
\min_x \ & c^\top x \\
\text{s.t.} \ & x\in X.
\end{align}
If we assume that this problem is feasible and bounded, we can denote by :math:`x^*` a solution of this problem. Then,
we search for a violated constraint ":math:`\xi^\top x \le \xi_0`" for some :math:`(\xi_0,\xi)\in\Xi`. Observe that
a constraint is violated if, and only if, the following holds:

.. math::
\left(\exists(\xi_0,\xi)\in\Xi, \ \xi^\top x^* > \xi_0\right)
\Leftrightarrow
\left(\max_{(\xi_0,\xi)\in\Xi} \xi_0 - \xi^\top x^* < 0\right).
Thus, the LazyCutCallback automatically solve the optimization problem on the right handside and checks for its value.
A new constraint is added if, and only if,

.. math::
\max_{\xi\in\Xi} \xi_0 - \xi^\top x^* < -\varepsilon,
with :math:`\varepsilon` a given tolerance (by default, :code:`Tolerance::Feasibility`).


.. hint::

You may also be interested by a tutorial showing how you can implement a simple Benders Decomposition using lazy
cuts. :ref:`See Benders Decomposition tutorial <tutorial_user_lazy_cuts>`.


.. doxygenclass:: idol::LazyCutCallback
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _api_UserCutCallback:

UserCutCallback
===============

.. doxygenclass:: idol::UserCutCallback
8 changes: 8 additions & 0 deletions _sources/api/classes/universal-callbacks/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Universal Callbacks
===================

.. toctree::
:maxdepth: 1
:glob:

*
31 changes: 31 additions & 0 deletions _sources/api/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. _api:

API
===

Mixed-Integer Optimization
--------------------------

.. toctree::
:maxdepth: 3
:glob:

mixed-integer/index

Bilevel Optimization
--------------------

.. toctree::
:maxdepth: 3
:glob:

bilevel/index

Robust Optimization
-------------------

.. toctree::
:maxdepth: 3
:glob:

robust/index
34 changes: 34 additions & 0 deletions _sources/api/mixed-integer/branch-and-bound/BranchAndBound.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _api_BranchAndBound:

BranchAndBound
==============

This class is an optimizer factory which creates a new branch-and-bound algorithm.
It can be used to create customized branch-and-bound algorithms with a large degree of freedom.

.. seealso::

If you are not familiar with optimizers and optimizer factories, please refer to :ref:`this page <mip_optimizers>`.

.. admonition:: Example

Here, we create a simple branch-and-bound algorithm where branching is done on integer variables which are being
relaxed. Each node is solved by the external solver GLPK. Nodes are selected according to the "best-bound"
rule while variables are selected according to the "most-infeasible" branching rule.

The created algorithm also incorporates sub-tree exploration of maximum depth 2.

.. code-block::
model.use(
BranchAndBound()
.with_node_optimizer( GLPK::ContinuousRelaxation() )
.with_branching_rule( MostInfeasible() )
.with_node_selection_rule( BestBound() )
.with_subtree_depth(2)
);
Doxygen
-------

.. doxygenclass:: idol::BranchAndBound
Loading

0 comments on commit c61ad49

Please sign in to comment.