Git Product home page Git Product logo

linprog's Introduction

Linear Programming

Introduction

Linear programming problem in standard form is

min  c * x
s.t. A * x = b,
     x >= 0.

And the dual problem is

max r * b
s.t. r * A <= c

In the integer programming, the variables must be integers.

Artificial Variable

One can add artificial variables to convert inequaltiy to equality.

e.g. A * x <= b iff A * x + s = b, s >= 0.

Basic Solution

Let A = [B D] where B is a basis for column space, if xb = b / B and xb >= 0, then the basic solution xb is feasible. And the basic solution is actually x = [xb 0].

Let r = cb \ B, where c = [cb cd], if r * D <= cd then xb is dual feasible.

If xb is both primal and dual feasible, then it is optimum.

Two Phrase Method

Solve the artificial problem for a basic solution

min  1 * s
s.t. A * x + s = b,
     x, s >= 0

If the optimum value is zero, then the problem is feasible.

Algorithm

simplex.py

  1. revised simplex
  2. dual simplex

decomposition.py

  1. Dantzig Wolfe Decomposition

bnb

branch_cut.py

  1. branch and bound
  2. Gomory cut

LU

pf_update.py

  1. product form update

ft_update.py

  1. FT-like update

dense.py

  1. LU factorization for dense matrices

Graph

dynamic.py

  1. 0-1 knapsack problem

network_simplex.py

  1. minimum cost flow problem

transport.py

  1. transportation problem

Modeling

sudoku.py

  1. Sudoku as 0-1 linear programming

Dependency

numpy, scipy.

Reference

Books

  1. Bertsekas D. P. "Network Optimization: Continuous and Discrete Models". 1998.
  2. Duff I. S., Erisman A. M., Reid J. K. "Direct Methods for Sparse Matrices". 2017.
  3. Luenberger D. G., Ye Yinyu. "Linear and Nonlinear Programming". 2008.
  4. Pan Pingqi. "Linear Programming Computation". 2014. (中文版于2012年出版)
  5. 刘红英, 夏勇等. "数学规划基础". 2012.

Papers

  1. Huangfu Q , Hall J A J . Novel update techniques for the revised simplex method[J]. Computational Optimization & Applications, 2015, 60(3):587-608.

Further

  1. H.D. Mittelmann, Decision Tree for Optimization Software, http://plato.asu.edu/guide.html.
  2. Coin-OR https://www.coin-or.org/
  3. cvxopt http://cvxopt.org/
  4. MIPLIB http://miplib.zib.de/
  5. MiniZinc http://www.minizinc.org/
  6. NEOS https://neos-server.org/neos/
  7. SCIP http://scip.zib.de/
  8. LEMON https://lemon.cs.elte.hu/trac/lemon

linprog's People

Contributors

lyxn avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

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.