All Projects → ztlpn → minilp

ztlpn / minilp

Licence: Apache-2.0 license
A pure Rust linear programming solver

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to minilp

EKR-SIMPLEX-PROBLEM-CALCULATOR
simplex problem calculator
Stars: ✭ 13 (-78.69%)
Mutual labels:  linear-programming, simplex-algorithm
antaresViz
ANTARES Visualizations
Stars: ✭ 19 (-68.85%)
Mutual labels:  linear-programming
lpsolvers
Linear programming solvers in Python with a unified API
Stars: ✭ 20 (-67.21%)
Mutual labels:  linear-programming
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (-72.13%)
Mutual labels:  linear-programming
cddlib
An efficient implementation of the Double Description Method
Stars: ✭ 71 (+16.39%)
Mutual labels:  linear-programming
SimplexSolver
An easy-to-use Simplex solver class for linear programming.
Stars: ✭ 18 (-70.49%)
Mutual labels:  linear-programming
pydata-london-2018
Slides and notebooks for my tutorial at PyData London 2018
Stars: ✭ 22 (-63.93%)
Mutual labels:  linear-programming
blt
Lattice-based integer linear programming solver
Stars: ✭ 60 (-1.64%)
Mutual labels:  linear-programming
flipy
A Python linear programming interface library
Stars: ✭ 23 (-62.3%)
Mutual labels:  linear-programming
good lp
Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and let's you solve them with various solvers.
Stars: ✭ 77 (+26.23%)
Mutual labels:  linear-programming
rcbc
COIN-OR branch and cut (CBC) bindings for R
Stars: ✭ 16 (-73.77%)
Mutual labels:  linear-programming
L1-optimal-paths-Stabilization
Video Stabilization with the L1 optimal camera paths technique.
Stars: ✭ 33 (-45.9%)
Mutual labels:  linear-programming
Machine-Learning
🌎 I created this repository for educational purposes. It will host a number of projects as part of the process .
Stars: ✭ 38 (-37.7%)
Mutual labels:  linear-programming
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (-55.74%)
Mutual labels:  linear-programming
minizinc-python
Access to all MiniZinc functionality directly from Python
Stars: ✭ 92 (+50.82%)
Mutual labels:  linear-programming
SDLP
Seidel's LP Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables
Stars: ✭ 36 (-40.98%)
Mutual labels:  linear-programming
Gosl
Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.
Stars: ✭ 1,629 (+2570.49%)
Mutual labels:  linear-programming
emhass
emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
Stars: ✭ 54 (-11.48%)
Mutual labels:  linear-programming
Linear-Algebra-and-Its-Applications-notes
《线性代数及其应用》笔记
Stars: ✭ 196 (+221.31%)
Mutual labels:  linear-programming
rust-lp-modeler
Lp modeler written in Rust
Stars: ✭ 75 (+22.95%)
Mutual labels:  linear-programming

minilp

Crates.io Documentation

A fast linear programming solver library.

Linear programming is a technique for finding the minimum (or maximum) of a linear function of a set of continuous variables subject to linear equality and inequality constraints.

Features

  • Pure Rust implementation.
  • Able to solve problems with hundreds of thousands of variables and constraints.
  • Incremental: add constraints to an existing solution without solving it from scratch.
  • Problems can be defined via an API or parsed from an MPS file.

Warning: this is an early-stage project. Although the library is already quite powerful and fast, it will probably cycle, lose precision or panic on some harder problems. Please report bugs and contribute code!

Examples

Basic usage

use minilp::{Problem, OptimizationDirection, ComparisonOp};

// Maximize an objective function x + 2 * y of two variables x >= 0 and 0 <= y <= 3
let mut problem = Problem::new(OptimizationDirection::Maximize);
let x = problem.add_var(1.0, (0.0, f64::INFINITY));
let y = problem.add_var(2.0, (0.0, 3.0));

// subject to constraints: x + y <= 4 and 2 * x + y >= 2.
problem.add_constraint(&[(x, 1.0), (y, 1.0)], ComparisonOp::Le, 4.0);
problem.add_constraint(&[(x, 2.0), (y, 1.0)], ComparisonOp::Ge, 2.0);

// Optimal value is 7, achieved at x = 1 and y = 3.
let solution = problem.solve().unwrap();
assert_eq!(solution.objective(), 7.0);
assert_eq!(solution[x], 1.0);
assert_eq!(solution[y], 3.0);

For a more involved example, see examples/tsp, a solver for the travelling salesman problem.

License

This project is licensed under the Apache License, Version 2.0.

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