-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c61ad49
Showing
501 changed files
with
65,575 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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
BIN
+75.4 KB
.doctrees/api/mixed-integer/branch-and-bound/BranchAndBoundCallback.doctree
Binary file not shown.
Binary file added
BIN
+18.2 KB
.doctrees/api/mixed-integer/branch-and-bound/BranchAndBoundCallbackFactory.doctree
Binary file not shown.
Binary file added
BIN
+37.8 KB
.doctrees/api/mixed-integer/branch-and-bound/cuts/KnapsackCover.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+25.9 KB
.doctrees/api/mixed-integer/branch-and-bound/heuristics/LocalBranching.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+18.4 KB
.doctrees/api/mixed-integer/branch-and-bound/heuristics/SimpleRounding.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+22.8 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/BestBound.doctree
Binary file not shown.
Binary file added
BIN
+23.9 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/BestEstimate.doctree
Binary file not shown.
Binary file added
BIN
+23 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/BreadthFirst.doctree
Binary file not shown.
Binary file added
BIN
+22.8 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/DepthFirst.doctree
Binary file not shown.
Binary file added
BIN
+22.8 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/WorstBound.doctree
Binary file not shown.
Binary file added
BIN
+3.19 KB
.doctrees/api/mixed-integer/branch-and-bound/node-selection/index.doctree
Binary file not shown.
Binary file added
BIN
+41.9 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/FirstInfeasibleFound.doctree
Binary file not shown.
Binary file added
BIN
+41.4 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/LeastInfeasible.doctree
Binary file not shown.
Binary file added
BIN
+41.3 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/MostInfeasible.doctree
Binary file not shown.
Binary file added
BIN
+40.8 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/PseudoCost.doctree
Binary file not shown.
Binary file added
BIN
+56.1 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/StrongBranching.doctree
Binary file not shown.
Binary file added
BIN
+44.5 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/UniformlyRandom.doctree
Binary file not shown.
Binary file added
BIN
+3.29 KB
.doctrees/api/mixed-integer/branch-and-bound/variable-selection/index.doctree
Binary file not shown.
Binary file added
BIN
+49.7 KB
.doctrees/api/mixed-integer/column-generation/ArtificialCosts.doctree
Binary file not shown.
Binary file added
BIN
+160 KB
.doctrees/api/mixed-integer/column-generation/DantzigWolfeDecomposition.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+181 KB
.doctrees/api/mixed-integer/column-generation/Optimizers_DantzigWolfeDecomposition.doctree
Binary file not shown.
Binary file added
BIN
+34.9 KB
.doctrees/api/mixed-integer/column-generation/stabilization/Neame.doctree
Binary file not shown.
Binary file added
BIN
+35.1 KB
.doctrees/api/mixed-integer/column-generation/stabilization/Wentges.doctree
Binary file not shown.
Binary file added
BIN
+2.95 KB
.doctrees/api/mixed-integer/column-generation/stabilization/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
BIN
+156 KB
.doctrees/api/mixed-integer/external-solvers/Optimizers_Gurobi.doctree
Binary file not shown.
Binary file added
BIN
+3.54 KB
.doctrees/api/mixed-integer/external-solvers/Optimizers_HiGHS.doctree
Binary file not shown.
Binary file added
BIN
+3.54 KB
.doctrees/api/mixed-integer/external-solvers/Optimizers_Mosek.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 added
BIN
+16.2 KB
.doctrees/examples/generalized-assignment-problem-penalty-bap.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.2 KB
.doctrees/examples/two-stage-robust-facility-location-problem.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 added
BIN
+2.89 KB
.doctrees/tutorials/mixed-integer-programming/branch-and-bound/create-branching-rule.doctree
Binary file not shown.
Binary file added
BIN
+3.36 KB
.doctrees/tutorials/mixed-integer-programming/branch-and-bound/create-callback.doctree
Binary file not shown.
Binary file added
BIN
+2.91 KB
...s/tutorials/mixed-integer-programming/branch-and-bound/create-node-selection-rule.doctree
Binary file not shown.
Binary file added
BIN
+2.86 KB
.doctrees/tutorials/mixed-integer-programming/branch-and-bound/create-node.doctree
Binary file not shown.
Binary file added
BIN
+3.22 KB
.doctrees/tutorials/mixed-integer-programming/branch-and-bound/index.doctree
Binary file not shown.
Binary file added
BIN
+2.87 KB
...s/tutorials/mixed-integer-programming/branch-and-bound/user-cuts-lazy-constraints.doctree
Binary file not shown.
Binary file added
BIN
+2.87 KB
...trees/tutorials/mixed-integer-programming/branch-and-bound/write-branch-and-bound.doctree
Binary file not shown.
Binary file added
BIN
+36.6 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/dantzig-wolfe.doctree
Binary file not shown.
Binary file added
BIN
+2.82 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/in-out-stabilization.doctree
Binary file not shown.
Binary file added
BIN
+9.13 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/index.doctree
Binary file not shown.
Binary file added
BIN
+2.82 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/integer-master.doctree
Binary file not shown.
Binary file added
BIN
+40.6 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/strong-branching.doctree
Binary file not shown.
Binary file added
BIN
+2.9 KB
...utorials/mixed-integer-programming/dantzig-wolfe/writing-branch-and-cut-and-price.doctree
Binary file not shown.
Binary file added
BIN
+13.2 KB
.doctrees/tutorials/mixed-integer-programming/dantzig-wolfe/writing-branch-and-price.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+28.6 KB
.doctrees/tutorials/mixed-integer-programming/modeling/constraints.doctree
Binary file not shown.
Binary file added
BIN
+4.47 KB
.doctrees/tutorials/mixed-integer-programming/modeling/environment.doctree
Binary file not shown.
Binary file added
BIN
+14.3 KB
.doctrees/tutorials/mixed-integer-programming/modeling/expressions.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+15.1 KB
.doctrees/tutorials/mixed-integer-programming/modeling/models.doctree
Binary file not shown.
Binary file added
BIN
+11.3 KB
.doctrees/tutorials/mixed-integer-programming/modeling/objective-function.doctree
Binary file not shown.
Binary file added
BIN
+39.2 KB
.doctrees/tutorials/mixed-integer-programming/modeling/variables.doctree
Binary file not shown.
Binary file added
BIN
+7.17 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/access-optimizer.doctree
Binary file not shown.
Binary file added
BIN
+2.86 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/create-optimizer.doctree
Binary file not shown.
Binary file added
BIN
+30.1 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/create-universal-callback.doctree
Binary file not shown.
Binary file added
BIN
+4.22 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/index.doctree
Binary file not shown.
Binary file added
BIN
+18.4 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/optimizers.doctree
Binary file not shown.
Binary file added
BIN
+33.8 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/solving.doctree
Binary file not shown.
Binary file added
BIN
+44 KB
.doctrees/tutorials/mixed-integer-programming/optimizers/universal-callbacks.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.21 KB
...es/tutorials/robust-optimization/two-stage/column-and-constraint-generation/index.doctree
Binary file not shown.
Binary file added
BIN
+38.6 KB
...rials/robust-optimization/two-stage/column-and-constraint-generation/introduction.doctree
Binary file not shown.
Binary file added
BIN
+19.5 KB
...ptimization/two-stage/column-and-constraint-generation/trust-region-stabilization.doctree
Binary file not shown.
Binary file added
BIN
+11.3 KB
...utorials/robust-optimization/two-stage/column-and-constraint-generation/write-ccg.doctree
Binary file not shown.
Binary file added
BIN
+3.39 KB
.../robust-optimization/two-stage/column-and-constraint-generation/writing-separator.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
7
_sources/api/bilevel/external-solvers/Optimizers_MibS.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Optimizers::Bilevel::MibS | ||
========================= | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Optimizers::Bilevel::MibS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Bilevel::Description | ||
==================== | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Bilevel::Description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Bilevel::KKT | ||
============ | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Bilevel::KKT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Optimizers::Bilevel::KKT | ||
======================== | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Optimizers::Bilevel::KKT |
7 changes: 7 additions & 0 deletions
7
_sources/api/bilevel/single-level/Optimizers_StrongDuality.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Optimizers::Bilevel::StrongDuality | ||
================================== | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Optimizers::Bilevel::StrongDuality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Bilevel::StrongDuality | ||
============ | ||
|
||
Doxygen | ||
------- | ||
|
||
.. doxygenclass:: idol::Bilevel::StrongDuality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
4
_sources/api/classes/external-bilevel/Optimizers_MibS.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Optimizers::Bilevel::MibS | ||
========================= | ||
|
||
.. doxygenclass:: idol::Optimizers::Bilevel::MibS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
External Bilevel Solvers | ||
======================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
7 changes: 7 additions & 0 deletions
7
_sources/api/classes/universal-callbacks/CallbackFactory.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
60
_sources/api/classes/universal-callbacks/LazyCutCallback.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
6 changes: 6 additions & 0 deletions
6
_sources/api/classes/universal-callbacks/UserCutCallback.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _api_UserCutCallback: | ||
|
||
UserCutCallback | ||
=============== | ||
|
||
.. doxygenclass:: idol::UserCutCallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Universal Callbacks | ||
=================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
_sources/api/mixed-integer/branch-and-bound/BranchAndBound.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.