Giter Site home page Giter Site logo

hlefebvr / idol Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 0.0 7.29 MB

The Mathematical Optimization Framework

Home Page: https://hlefebvr.github.io/idol

License: GNU General Public License v3.0

CMake 3.95% Shell 0.10% C++ 95.71% C 0.24%
algorithms algorithms-implemented branch-and-bound branch-and-cut-and-price branch-and-price column-generation cpp mathematical-programming milp mixed-integer-programming optimization solver

idol's People

Contributors

hlefebvr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

idol's Issues

Getting rid of BlockModel and AbstractModel

The idea is to deal only with Model-s and to get rid of the esoteric concepts of BlockModel, and thus,
of AbstractModel.

Reason for introducing BlockModel (back then): When introducing column generation, a method was needed to describe the decomposable structure of the problem. Since the branch-and-bound algorithm was written in terms of "models", the idea was to embed the structure within the Model. Doing so led to the creation of BlockModel which embedded the sub-problem's models and their generation patterns. The master problem was then implicitly what the B&B algorithm considered.

Issue:

  • BlockModel directly implied the necessity of AbstractModel for polymorphism. This introduces complexity.
  • Moreover, the polymorphism is not complete (e.g., iterating over variables is done only over the master's variables) and, for advanced applications, which is the aim of the library, a (manual) downcast is needed, which is bad style.
  • Finally, when using column generation, this forced the B&B algorithm to save solutions of the relaxed model by requesting values for variables from the non-relaxed model (since the relaxation was only the master problem and "implicitly" the sub-problems).

Proposed solution: The idea would be to deal only with Model-s and to directly embed the structure of the problem inside the backend of the model. We would create two optimizers for doing column generation and dantzig-wolfe decomposition.

  • ColumnGenerationOptimizer is an optimizer which is attached to a model. The model is the master problem. Then, sub-problems can be added to the optimizer. When optimized, the master problem is solved and missing columns are identified by solving the sub-problems. Since the optimizer is attached to the master problem, branching is done only on the master variables (allowing for branching on original master problem's variables as well as on dynamically generated variables (e.g., Ryan and Foster)). Sub-problems can potentially be dynamically added.
  • DantzigWolfeDecompositionOptimizer inherits from ColumnGenerationOptimizer and is an optimizer which is attached to a model. This model is the original formulation of the problem. The problem is reformulated automatically and branching may be performed on sub-problems' variables, i.e., variables of the attached model.

Advantages:

  • Simplifies the overall interface;
  • Avoids downcasts;
  • Avoids problems related to iteration over objects of model defined as BlockModel;
  • Avoids mess with computing decomposition and "opposite axis annotation".

Heuristics::IntegerMaster and LazyCut

Describe the bug
If a problem is solved by branch-and-price and lazy cuts are added in the callback, the lazy cut are not generated in the callback and a potentially wrong solution is submitted.

Expected behavior
The callback should you the same optimizer as the original problem but disabling column generation with master problem being integer.

Implement branching with priorities

It would be nice to have branching with priorities implemented.

Skeleton:

BranchAndBound()
    .with_branching_rule(
        BranchingWithPriority()
            .add_branching_rule(MostInfeasible::Strategy<NodeVarInfo>(x.begin(), x.end()))
            .add_branching_rule(MostInfeasible::Strategy<NodeVarInfo>(y.begin(), y.end()))
    )

Refactor ColumnGeneration

Current issues

  • The current implementation of ColumnGeneration is not 100% clean and there is a confusion with the phases when dealing with infeasible master problem with artificial variables.
  • Only one stabilization rule is used which is based on the last iterate.

Do not always solve child nodes to optimality

Is your feature request related to a problem? Please describe.
Currently, all nodes are solved to optimality when they are created. Yet, this is not necessary for correctness. We only need to solve the node optimally if it is selected for branching.

Describe the solution you'd like
Nodes should be solved partially according to some criterion (?) and solved only when needed.

Describe alternatives you've considered
.

Additional context
.

Load columns from pool

Currently, columns are not loaded from the pool.

For each sub problem, check if columns agree with the bounds of parent and if they agree with the SP model constraints.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.