All Projects → PetterS → monolith

PetterS / monolith

Licence: GPL-3.0 license
A C++ monorepo for discrete and continuous optimization. Batteries included!

Programming Languages

Jupyter Notebook
11667 projects
AMPL
153 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects
basic
69 projects

Projects that are alternatives of or similar to monolith

Operations-Research
Some lecture notes of Operations Research (usually taught in Junior year of BS) can be found in this repository along with some Python programming codes to solve numerous problems of Optimization including Travelling Salesman, Minimum Spanning Tree and so on.
Stars: ✭ 92 (+9.52%)
Mutual labels:  operations-research
optaplanner-quickstarts
OptaPlanner quick starts for AI optimization: many use cases shown in many different technologies.
Stars: ✭ 226 (+169.05%)
Mutual labels:  operations-research
radCAD
A framework for generalised dynamical systems modelling & simulation (inspired by and compatible with cadCAD.org)
Stars: ✭ 59 (-29.76%)
Mutual labels:  modelling-framework
lectures-notes
My latex notes on whatever I'm studying. All are available to the public, but please take them with a grain of salt and notify me in case of errors :)
Stars: ✭ 62 (-26.19%)
Mutual labels:  operations-research
cspy
A collection of algorithms for the (Resource) Constrained Shortest Path problem in Python / C++ / C#
Stars: ✭ 64 (-23.81%)
Mutual labels:  operations-research
SpineOpt.jl
A highly adaptable modelling framework for multi-energy systems
Stars: ✭ 25 (-70.24%)
Mutual labels:  modelling-framework
adaptive-large-neighbourhood-search
ALNS header-only library (loosely) based on the original implementation by Stefan Ropke.
Stars: ✭ 28 (-66.67%)
Mutual labels:  operations-research
cplex-example
Solving a TSP with the CPLEX C++ API.
Stars: ✭ 40 (-52.38%)
Mutual labels:  operations-research
utopia
Utopia is a comprehensive modelling framework for complex and evolving systems. Docs @ https://docs.utopia-project.org — NOTE: This repository is a READ-ONLY-MIRROR of the actual development repository; please open issues and MRs there:
Stars: ✭ 12 (-85.71%)
Mutual labels:  modelling-framework
scikit-decide
AI framework for Reinforcement Learning, Automated Planning and Scheduling
Stars: ✭ 30 (-64.29%)
Mutual labels:  scheduling-algorithms
process-scheduling-solver
A web app to generate gantt chart and calculate turnaround time and waiting time for various CPU scheduling algorithms.
Stars: ✭ 90 (+7.14%)
Mutual labels:  scheduling-algorithms
Coluna.jl
Branch-and-Price-and-Cut in Julia
Stars: ✭ 128 (+52.38%)
Mutual labels:  column-generation
vrpy
A python framework for solving the VRP and its variants with column generation.
Stars: ✭ 94 (+11.9%)
Mutual labels:  column-generation

Monolith

Monolith is a monorepo with several optimization projects. Some of the code was originally written for research or as hobby projects in other repositories (e.g. spii and easy-IP).

One of the highlights is a state-of-the-art scheduler using column generation, which significantly outperforms all other optimizers at schedulingbenchmarks.org. Try it in the browser (wasm) here!

Why a monorepo?

  • C++ does not have an ABI. Every compiler, or worse, every flag configuration of every compiler generates potentially incompatible code. I want to use many compilers (MCVC, GCC, Clang) and many settings (debug, release, asan, fuzzers etc.). I also use Emscripten to compile programs to WASM (example here).
  • Refactoring code becomes much easier if all code with all dependencies is available in one IDE at the same time.

Contact

Petter Strandmark, [email protected]

Modules

Column generation

Implements the algorithm described in First-order Linear Programming in a Column Generation-Based Heuristic Approach to the Nurse Rostering Problem (2020) doi link.

The minimum::linear::colgen module contains code for solving scheduling problems. It significantly outperforms all other optimizers at schedulingbenchmarks.org.

Some of the reasons it is fast:

  • It uses a first-order LP solver based on papers by Chambolle and Pock.
  • The Ryan-Foster rule is used to iteratively work towards an integer solution. There is no time to branch and bound for big problems.
  • The pricing problem uses highly optimized dynamic programming in a DAG (in minimum::algorithms).

See the README in the module itself for more info.

Minimum/AI

The minimum::ai module contains code originally from my Monte-Carlo tree search repository. It is very fast – some years ago it evaluated almost 2 million complete games per second when playing 4 in a row.

Minimum/Linear

The minimum::linear module contains code originally from my easy-IP repository. It is a modelling interface (DSL) for integer programming and supports converting IPs to SAT. It also uses two free solvers: Cbc and Glpk.

minimum::linear also contains an implementation of a first-order LP solver based on papers by Chambolle and Pock. Using a first-order LP solver is very important when solving really big scheduling problems.

Minimum/Nonlinear

The minimum::nonlinear module contains code originally from my spii repository. When a function is defined, it will be automatically differentiated with an autodiff library. This makes the resulting code very fast and numerically stable. The library contains minimization routines like L-BFGS and Newton’s method.

For example, a function of one vector variable is simply defined as:

auto lambda = [](auto* x) {
    auto d0 = x[1] - x[0] * x[0];
    auto d1 = 1 - x[0];
    return 100 * d0 * d0 + d1 * d1;
};

Having auto here instead of e.g. double is crucial. Efficient code for first and second-order derivatives is generated with

auto term = make_differentiable<2>(lambda);

Minimum/Constrained

Using both minimum::linear and minimum::nonlinear, this module implements constrained optimization via successive linear programming.

Minimum/Curvature

The module minimum::curvature contains code originally written at curve_extraction. It computes shortest paths in regular graphs taking curvature into account.

Building

Everything needed to build the library is included. With CMake and a modern C++ compiler, you can do

$ cmake /path/to/source
$ make

Licence

The license can be found in the LICENSE file. Contact me if you need another license.

The software in the third-party folder is not written exclusively by me and their respective license files apply.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].