Questions tagged [linear-programming]

An optimization technique for minimizing or maximizing a function of several variables in the presence of constraints where all relationships are linear.

Linear Programming is a mathematical optimization technique for minimizing or maximizing a linear function of several variables (called the objective function) subject to several linear constraints. The objective function and the set of constraints are collectively called the Linear Program.

The dual Simplex Method is a commonly used solution technique in Linear Programming. There are several commercial and open-source software packages for solving linear programs.

Brief history:
1939. Production, planning. [Kantorovich]
1947. Simplex algorithm. [Dantzig]
1947. Duality. [von Neumann, Dantzig, Gale-Kuhn-Tucker]
1947. Equilibrium theory. [Koopmans]
1948. Berlin airlift. [Dantzig]
1975. Nobel Prize in Economics. [Kantorovich and Koopmans]
1979. Ellipsoid algorithm. [Khachiyan]
1984. Projective-scaling algorithm. [Karmarkar]
1990. Interior-point methods. [Nesterov-Nemirovskii, Mehorta, ...]

External links:

2509 questions
17
votes
2 answers

Finding all combinations based on multiple conditions for a large list

I am trying to calculate the optimal team for a Fantasy Cycling game. I have a csv-file containing 176 cyclist, their teams, the amount of points they have scored and the price to put them in my team. I am trying to find the highest scoring team of…
17
votes
3 answers

Difference LP/MIP and CP

what is the difference between Constraint Programming (CP) and Linear Programming (LP) or Mixed Integer Programming (MIP) ? I know what LP and MIP is but dont understand the difference to CP - or is CP just the same as MIP and LP ? I am a but…
17
votes
3 answers

binary linear programming solver in Python

I have a Python script in which I need to solve a linear programming problem. The catch is that the solution must be binary. In other words, I need an equivalent of MATLAB's bintprog function. NumPy and SciPy do not seem to have such a procedure.…
tlayton
  • 1,757
  • 1
  • 11
  • 13
17
votes
1 answer

How to convert quadratic to linear program?

I have an optimization problem that has in the objective function 2 multiplied variables, making the model quadratic. I am currently using zimpl, to parse the model, and glpk to solve it. As they don't support quadratic programming, I would need to…
16
votes
7 answers

mathematical optimization library for Java --- free or open source recommendations?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have…
14
votes
3 answers

Get the position of points on a line segment with constraints

I am designing a layout engine for ZenUML. One requirement (after simplification) is this: There a line segment; There are n (n < 100, it can be reduced to n < 30 if that makes difference in performance) points on this line segment, the order is…
Devs love ZenUML
  • 11,344
  • 8
  • 53
  • 67
13
votes
1 answer

Quadratic programming in Haskell

Are there any Haskell bindings for quadratic programming libraries? If not, which one should I write simplified bindings for assuming I cannot avoid needing one? Is there a reasonably canonically favored open source library for this?
13
votes
2 answers

Get constraints in matrix format from gurobipy

I coded my model in gurobipy and I want to get the matrix of constraints and vector of cost. Is there any way to access those?
13
votes
3 answers

LP Simplex algorithm in C++

I need the robust C++ source code of the simplex algorithm (is a popular algorithm for numerical solution of the linear programming problem). Please, no links to wikipedia. I need good source code in C++, using templates, clear user-friendly names…
Alexey Malistov
  • 26,407
  • 13
  • 68
  • 88
12
votes
1 answer

MapReduce Linear Programming

Can a simple linear programming problem be solved on a distributed system using MapReduce?
Michael
  • 13,838
  • 18
  • 52
  • 81
12
votes
1 answer

Matching algorithms in R (bipartite matching, Hungarian algorithm)

I wonder how to set up some example some fundamental matching procedures in R. There are many examples in various programming languages, but I have not yet found a good example for R. Let’s say I want to match students to projects and I would…
majom
  • 7,863
  • 7
  • 55
  • 88
11
votes
1 answer

Linear programming - dual simplex variable meanings?

I have just learned the simplex method for solving linear programs, and I'm trying to understand what it's dual problem represents. I understand the mechanics of solving a dual problem - I do not need help with that. What I can't get (even after…
penelope
  • 8,251
  • 8
  • 45
  • 87
11
votes
6 answers

How do I solve a set of constraints in Perl?

I have the following set of constraints in Perl (just a sample set of constraints, not the ones I really need): $a < $b $b > $c $a is odd => $a in [10..18] $a > 0 $c < 30 And I need to find a list ($a, $b, $c) that meet the constraints. My naive…
Nathan Fellman
  • 122,701
  • 101
  • 260
  • 319
11
votes
2 answers

Algorithm to place a mailbox to minimize the total distance that the residents travel to get their mail

Assume the input is specified as an array of building objects, where each building has a number of residents an its distance from the start of the street. Total distance = SUM(distance[i] * #residents[i]) I found here two questions that are similar…
carlos22
  • 163
  • 1
  • 7