All Projects → frangio68 → Min Cost Flow Class

frangio68 / Min Cost Flow Class

Licence: lgpl-3.0
C++ solvers for Minimum Cost Flow Problems

Projects that are alternatives of or similar to Min Cost Flow Class

RelevancyTuning
Dice.com tutorial on using black box optimization algorithms to do relevancy tuning on your Solr Search Engine Configuration from Simon Hughes Dice.com
Stars: ✭ 28 (-22.22%)
Mutual labels:  optimization-algorithms
Optim
OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions
Stars: ✭ 411 (+1041.67%)
Mutual labels:  optimization-algorithms
Cppnumericalsolvers
a lightweight C++17 library of numerical optimization methods for nonlinear functions (Including L-BFGS-B for TensorFlow)
Stars: ✭ 638 (+1672.22%)
Mutual labels:  optimization-algorithms
dfogn
DFO-GN: Derivative-Free Optimization using Gauss-Newton
Stars: ✭ 20 (-44.44%)
Mutual labels:  optimization-algorithms
Fmin
Unconstrained function minimization in Javascript
Stars: ✭ 317 (+780.56%)
Mutual labels:  optimization-algorithms
Awesome Robotics
A curated list of awesome links and software libraries that are useful for robots.
Stars: ✭ 478 (+1227.78%)
Mutual labels:  optimization-algorithms
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (-52.78%)
Mutual labels:  optimization-algorithms
Pyswarms
A research toolkit for particle swarm optimization in Python
Stars: ✭ 742 (+1961.11%)
Mutual labels:  optimization-algorithms
Ojalgo
oj! Algorithms
Stars: ✭ 336 (+833.33%)
Mutual labels:  optimization-algorithms
Dist Keras
Distributed Deep Learning, with a focus on distributed training, using Keras and Apache Spark.
Stars: ✭ 613 (+1602.78%)
Mutual labels:  optimization-algorithms
Deep-Learning-Optimization-Algorithms
Visualization of various deep learning optimization algorithms using PyTorch automatic differentiation and optimizers.
Stars: ✭ 47 (+30.56%)
Mutual labels:  optimization-algorithms
Curvaturefilter
Curvature Filters are efficient solvers for Variational Models
Stars: ✭ 291 (+708.33%)
Mutual labels:  optimization-algorithms
Pagmo2
A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 540 (+1400%)
Mutual labels:  optimization-algorithms
vqf
Implementation of Variational Quantum Factoring algorithm.
Stars: ✭ 32 (-11.11%)
Mutual labels:  optimization-algorithms
Gaft
A Genetic Algorithm Framework in Python
Stars: ✭ 651 (+1708.33%)
Mutual labels:  optimization-algorithms
qpmad
ROS-compatible Eigen-based Goldfarb-Idnani quadratic programming solver
Stars: ✭ 41 (+13.89%)
Mutual labels:  optimization-algorithms
Ensmallen
A header-only C++ library for numerical optimization --
Stars: ✭ 436 (+1111.11%)
Mutual labels:  optimization-algorithms
Mindseye
Neural Networks in Java 8 with CuDNN and Aparapi
Stars: ✭ 8 (-77.78%)
Mutual labels:  optimization-algorithms
Captainblackboard
船长关于机器学习、计算机视觉和工程技术的总结和分享
Stars: ✭ 693 (+1825%)
Mutual labels:  optimization-algorithms
Solid
🎯 A comprehensive gradient-free optimization framework written in Python
Stars: ✭ 546 (+1416.67%)
Mutual labels:  optimization-algorithms

Min-Cost-Flow-Class

ReadMe for the MCFClass project, a set of C++ solvers for (Linear or Convex Quadratic Separable) Min Cost Flow Problem solvers under the same interface deriving from the base class MCFClass.

The aim of MCFClass is to provide an abstraction layer between practitioners who need to solve MCF problems within complex applications and developers of MCF software. The idea is to provide an interface which caters for all the needs that a practitioner can have, thereby allowing him/her to use whichever algorithm - among those that have an implementation conforming to this interface - without bothering with the details of the implementation, and to easily switch between different algorithms.

MCFClass defines and "exports" the types of "flows" (MCFClass::FNumber), "costs" (MCFClass::CNumber) and so on, together with a set of comparison operators (ETZ, GTZ, ...) which automatically detect whether or not the underlying types are integers or floats, inserting appropriate "epsilons" in the latter case and avoiding them (for speed) in the former; these things are sorted out at compile time without user intervention.

This release comprises:

  • docs/: HTML doxygen documentation, also available at

    https://frangio68.github.io/Min-Cost-Flow-Class/

  • doxygen/: files to produce the documentation

  • License.md: the text of the "GNU Lesser General Public License", Version 3.0, under which most of this code is distributed (but not all of it, see RelaxIV below)

  • MCFClass/: definition of the base class

  • MCFClone/: implements a "fake" MCF solver that takes two "real" ones and does everything on both; useful for testing the solvers (either for correctness or for efficiency) when used within "complex" approaches

  • MCFCplex/: implements a MCF solver conforming to the MCFClass interface based on calls to the commercial (but now free for academic purposes) Cplex solver from IBM

  • MCFSimplex/: implements a MCF solver conforming to the MCFClass interface based on the primal and dual revised network simplex algorithm

  • OPTUtils/: contains the OPTUtils.h file with a few minor utility functions

  • ReadMe.md: this file

  • RelaxIV/: implements a MCF solver conforming to the MCFClass interface based on the RELAXIV code by D. Bertsekas and P. Tseng, as described in Bertsekas, Dimitri P., and Paul Tseng. "RELAX-IV: A faster version of the RELAX code for solving minimum cost flow problems." (1994), Report LIDS-P-2276, MIT.

    be aware that RelaxIV is distributed under a less permissive academic license than the rest of the code (see RelaxIV/academicl.txt for details), which only applies to researchers of noncommercial and academic institutions, e.g., universities; if the license does not apply to you, you must not download the source or delete it immediately

  • SPTree/: implements a MCF solver partly conforming to the MCFClass interface, in the sense that is is only able to solve MCF instances that are in fact Shortest Path Tree ones (that is, only one source node and no arc capacities), but then does so using SPT algorithms (both label-setting and label-correcting variants can be used) that are much faster than complete MCF ones

  • pyMCFSimplex-0.9/: a Python-Wrapper for the MCFSimplex solver by Johannes from the G#.Blog, check README.txt for details

  • test/: contains two example Main files to use the library. One solves a given MCF instance with any one MCF solver, which can be chosen by just changing two lines of code. The other compares the results of two solvers in order to verify that they agree. See the comments in both files for more details

There are two more complete solvers available under the MCFClass interface, namely CS2 and MCFZIB. These are, however, distributed under a more restrictive academic license, which has to be explicitly accepted before getting hold of the code. Request forms are available at

http://www.di.unipi.it/optimize/Software/MCF.html

Build and install

You can either use CMake or plain makefiles to build the library, your choice.

Using CMake

Configure and build the library with:

mkdir build
cd build
cmake ..
make

If CPLEX is not installed in a default directory, you can specify its path with:

cmake <source-path> -DCPLEX_STUDIO_DIR=/path/to/CPLEX/Studio

Or can also avoid the search (and disable MCFCplex) with:

cmake <source-path> -DMCFClass_USE_CPLEX=OFF
  • Optionally, you can install the library with:
sudo make install
  • After the library is built, you can use it in your CMake project with:
find_package(MCFClass)
target_link_libraries(<my_target> MCFClass::MCFClass)

Using makefiles

  • To create the library, go into lib/ and type
make -f makefile-lib
  • To test the library, go into test and type make.

  • If you want to use the MCFCplex class, which comes commented out by default, uncomment the two lines in lib/makefile:

MCFCxDIR = $(libMCFClDIR)MCFCplex/
include $(MCFCxDIR)makefile

Then edit extlib/makefile-libCPLEX to insert the right Cplex path libraries. You can similarly enable (or disable) any solver, both the LGPL ones and those under the academic license, if you have obtained them, by commenting out (or commenting) the corresponding two lines in lib/makefile.

Other stuff

More information about (some of) the implemented algorithms can be found at

http://pages.di.unipi.it/frangio/abstracts.html#JOC06

A further solver, MCFIntPnt (based on Interior-Point algorithms) has been developed, but it has not yet reached a sufficient maturuty to be distributed; its principles are discussed at

http://pages.di.unipi.it/frangio/abstracts.html#SIOPT04 http://pages.di.unipi.it/frangio/abstracts.html#COAP06 http://pages.di.unipi.it/frangio/abstracts.html#OMS06

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