All Projects → freewheel → flipy

freewheel / flipy

Licence: Apache-2.0 license
A Python linear programming interface library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to flipy

rcbc
COIN-OR branch and cut (CBC) bindings for R
Stars: ✭ 16 (-30.43%)
Mutual labels:  solver, linear-programming, cbc
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 (+234.78%)
Mutual labels:  linear-programming, cbc
lpsolvers
Linear programming solvers in Python with a unified API
Stars: ✭ 20 (-13.04%)
Mutual labels:  solver, linear-programming
blt
Lattice-based integer linear programming solver
Stars: ✭ 60 (+160.87%)
Mutual labels:  solver, linear-programming
rust-lp-modeler
Lp modeler written in Rust
Stars: ✭ 75 (+226.09%)
Mutual labels:  solver, linear-programming
Sundials
SUNDIALS is a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. This is a mirror of current releases, and development will move here eventually. Pull requests are welcome for bug fixes and minor changes.
Stars: ✭ 194 (+743.48%)
Mutual labels:  solver
Machine-Learning
🌎 I created this repository for educational purposes. It will host a number of projects as part of the process .
Stars: ✭ 38 (+65.22%)
Mutual labels:  linear-programming
Logician
Logic programming in Swift
Stars: ✭ 182 (+691.3%)
Mutual labels:  solver
Qpsolvers
Quadratic Programming solvers in Python with a unified API
Stars: ✭ 157 (+582.61%)
Mutual labels:  solver
django-mirage-field
Django model field encrypt/decrypt your data, keep secret in database.
Stars: ✭ 86 (+273.91%)
Mutual labels:  cbc
sudokufx
AR Sudoku grabber and solver using JavaCV, JavaFX and Scala
Stars: ✭ 64 (+178.26%)
Mutual labels:  solver
pulp-operator
Kubernetes Operator for Pulp 3. Under active development.
Stars: ✭ 32 (+39.13%)
Mutual labels:  pulp
Cubejs
cube.js -- JavaScript library for modeling and solving the 3x3x3 Rubik's Cube
Stars: ✭ 215 (+834.78%)
Mutual labels:  solver
libdnf
Package management library.
Stars: ✭ 157 (+582.61%)
Mutual labels:  solver
Optaplanner
AI constraint solver in Java to optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling, conference scheduling and other planning problems.
Stars: ✭ 2,454 (+10569.57%)
Mutual labels:  solver
EKR-SIMPLEX-PROBLEM-CALCULATOR
simplex problem calculator
Stars: ✭ 13 (-43.48%)
Mutual labels:  linear-programming
Pyro2
A framework for hydrodynamics explorations and prototyping
Stars: ✭ 181 (+686.96%)
Mutual labels:  solver
WarpPI
WarpPI Calculator, Step-by-step algebra calculator for Raspberry Pi. (abandoned project)
Stars: ✭ 93 (+304.35%)
Mutual labels:  solver
SkytilsMod
A Hypixel Skyblock Utilities mod
Stars: ✭ 236 (+926.09%)
Mutual labels:  solver
robust
Robust optimization for power markets
Stars: ✭ 27 (+17.39%)
Mutual labels:  gurobi

Flipy

flipy_logo_60pt

supported Build Status Coverage

Flipy is a Python linear programming interface library, originally developed by FreeWheel. It currently supports Gurobi and CBC as the backend solver.

To use Gurobi, make sure you have a Gurobi license file, and gurobipy is installed in your Python environment. You can find details from Gurobi’s documentation.

Flipy requires Python 3.6 or newer.

Installation

The latest offical version of Flipy can be installed with pip:

pip install flipy

The latest development version can be get with Git:

git clone https://github.com/freewheel/flipy.git
cd flipy
python setup.py install

Quickstart

Here is a simple example for Flipy:

import flipy

# 1 <= x <= 3.5
x = flipy.LpVariable('x', low_bound=1, up_bound=3.5)
# 2 <= y <= 4
y = flipy.LpVariable('y', low_bound=2, up_bound=4)

# 5x + y <= 12
lhs = flipy.LpExpression('lhs', {x: 2.5, y: 1})
rhs = flipy.LpExpression('rhs', constant=12) 
constraint = flipy.LpConstraint(lhs, 'leq', rhs)

# maximize: 3x + 2y
objective = flipy.LpObjective('test_obj', {x: 3, y: 2}, sense=flipy.Maximize)
problem = flipy.LpProblem('test', objective, [constraint])

solver = flipy.CBCSolver()
status = solver.solve(problem)

Get the solution

After solving, a status is returned to indicate whether the solver has found a optimal solution for the problem:

print(status)
# <SolutionStatus.Optimal: 1>

The objective value can be retrieved with objective.evaluate():

print(objective.evaluate())
# 17.6

The value of variables can be retrieved with .evaluate() as well:

print(x.evaluate())
# 3.2
print(y.evaluate())
# 4.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].