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:

2006 questions
84
votes
4 answers

What is the minimum cost to connect all the islands?

There is a grid of size N x M. Some cells are islands denoted by '0' and the others are water. Each water cell has a number on it denoting the cost of a bridge made on that cell. You have to find the minimum cost for which all the islands can be…
79
votes
2 answers

Python Mixed Integer Linear Programming

Are there any Mixed Integer Linear Programming(MILP) solver for Python? Can GLPK python solve MILP problem? I read that it can solve Mixed integer problem. I am very new to linear programming problem. So i am rather confused and cant really…
asun
  • 925
  • 1
  • 7
  • 6
51
votes
13 answers

Best open source Mixed Integer Optimization Solver

I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale…
36
votes
7 answers

linear programming in python?

I need to make a linear programming model. Here are the inequalities I'm using (for example): 6x + 4y <= 24 x + 2y <= 6 -x + y <= 1 y <= 2 I need to find the area described by these inequalities, and shade it in a graph, as well as keep track of…
user24562
  • 371
  • 1
  • 3
  • 5
34
votes
1 answer

Using min/max *within* an Integer Linear Program

I'm trying to set up a linear program in which the objective function adds extra weight to the max out of the decision variables multiplied by their respective coefficients. With this in mind, is there a way to use min or max operators within the…
solvingPuzzles
  • 7,683
  • 14
  • 62
  • 110
27
votes
3 answers

pandas, melt, unmelt preserve index

I've got a table of clients (coper) and asset allocation (asset) A = [[1,2],[3,4],[5,6]] idx = ['coper1','coper2','coper3'] cols = ['asset1','asset2'] df = pd.DataFrame(A,index = idx, columns = cols) so my data look like asset1 …
Mohammad Athar
  • 1,652
  • 1
  • 12
  • 27
27
votes
5 answers

Minimum exact cover of grid with squares; extra cuts

This problem appeared in a challenge, but since it is now closed it should be OK to ask about it. The problem (not this question itself, this is just background information) can be visually described like this, borrowing their own image: I chose to…
harold
  • 53,069
  • 5
  • 75
  • 140
24
votes
5 answers

How to choose an integer linear programming solver?

I am newbie for integer linear programming. I plan to use a integer linear programming solver to solve my combinatorial optimization problem. I am more familiar with C++/object oriented programming on an IDE. Now I am using NetBeans with Cygwin to…
23
votes
3 answers

Linear Programming Tool/Libraries for Java

I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available?
dacracot
  • 20,476
  • 26
  • 98
  • 148
22
votes
6 answers

What libraries should I use for linear programming in python?

A quick search on "python linear programming" turns up a lot of hits (e.g. this one). Looking through them, I see a fair number of complaints about outdated dependencies, poor documentation, etc. Can anybody recommend a headache-free (e.g. fast,…
Abe
  • 17,738
  • 21
  • 71
  • 103
21
votes
9 answers

Which algorithm for assigning shifts (discrete optimization problem)

I'm developing an application that optimally assigns shifts to nurses in a hospital. I believe this is a linear programming problem with discrete variables, and therefore probably NP-hard: For each day, each nurse (ca. 15-20) is assigned a…
20
votes
5 answers

What is linear programming?

I read over the wikipedia article, but it seems to be beyond my comprehension. It says it's for optimization, but how is it different than any other method for optimizing things? An answer that introduces me to linear programming so I can begin…
Cam
  • 13,963
  • 16
  • 70
  • 121
19
votes
3 answers

What is the benefit of using exponential backoff?

When the code is waiting for some condition in which delay time is not deterministic, it looks like many people choose to use exponential backoff, i.e. wait N seconds, check if the condition satisfies; if not, wait for 2N seconds, check the…
xis
  • 22,592
  • 8
  • 39
  • 55
17
votes
2 answers

Python Pulp using with Matrices

I am still very new to Python, after years and years of Matlab. I am trying to use Pulp to set up an integer linear program. Given an array of numbers: {P[i]:i=1...N} I want to maximize: sum( x_i P_i ) subject to the constraints A x <= b A_eq x =…
16
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…
1
2 3
99 100