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
7
votes
3 answers

Implementions of "Interior Point Method" to solve LP (and QP)

I would like to look at a couple of implementations of IPMs. The languages preferable are C/C++, Java or any scripting languages like python, perl. Others are also fine. I am searching for a good resource which can help me with, basics of…
7
votes
3 answers

How to find optimum combination for Cutting Stock Problem using Knapsack

EDIT (31-12-2019) - https://jonathan.overholt.org/projects/cutlist Above is the link of the free project which is what exactly I am looking for. I am just looking for proper guidance so that I can make it work. I am working on minimizing the wastage…
Scorpion
  • 6,831
  • 16
  • 75
  • 123
7
votes
2 answers

Determine allocation of values - Python

I am trying to create an optimal shift schedule where employees are assigned to shift times. The output should aim to spend the least amount of money. The tricky part is I need to account for specific constraints. These being: 1) At any given time…
jonboy
  • 415
  • 4
  • 14
  • 45
7
votes
1 answer

Choice of optimization algorithm for distributing lines inside a shape

Consider the follow representation of a concrete slab element with reinforcement bars and holes. I need an algorithm that automatically distributes lines over an arbitrary shape with different holes. The main constraints are: Lines cannot be…
farbro
  • 103
  • 1
  • 6
7
votes
3 answers

Linear programming with conditional constraints in R

I have a linear programming problem where I'm trying to select from a number of binary resources to optimize value, basically a knapsack problem. The issue I'm having is that the different resources have characteristics in common and I want to…
7
votes
3 answers

Pyomo: Access Solution From Python Code

I have a linear integer programme I want to solve. I installed solver glpk (thanks to this answer) and pyomo. I wrote code like this: from pyomo.environ import * from pyomo.opt import SolverFactory a = 370 b = 420 c = 2 model =…
7
votes
3 answers

Linear Programming: Find all optimal vertices

I was wondering if there is a nice way (preferably using JuMP) to get all optimal solutions of a linear program (in case there are multiple optimal solutions). An example minimize the statistical distance (Kolmogorov distance) between two…
balletpiraat
  • 206
  • 1
  • 11
7
votes
2 answers

scipy.optimize.linprog unable to find a feasible starting point despite a feasible answer clearly exists

the vector k seems to satisfy all constraints. Is there something I'm missing here? Thanks. import numpy as np from scipy.optimize import linprog A_ub=[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0,…
RAY
  • 6,810
  • 6
  • 40
  • 67
7
votes
2 answers

Representing Travelling Salesman as Linear Expression

I've seen online that one can write the travelling salesman problem as a linear expression and compute it using software such as CPLEX for java. I have a 1000 towns and need to find a short distance. I plan on partitioning these 1000 towns into…
7
votes
2 answers

Minimize sum of distances in point pairs

I have a bunch of points on a 2-dimensional Grid. I want to group the Points into pairs, while minimizing the sum of the euclidean distances between the points of the pairs. Example: Given the points: p1: (1,1) p2: (5,5) p3: (1,3) p4: (6,6) Best…
7
votes
2 answers

Code a linear programming exercise by hand

I have been doing linear programming problems in my class by graphing them but I would like to know how to write a program for a particular problem to solve it for me. If there are too many variables or constraints I could never do this by…
7
votes
3 answers

Is there a well understood algorithm or solution model for this meeting scheduling scenario?

I have a complex problem and I want to know if an existing and well understood solution model exists or applies, like the Traveling Salesman problem. Input: A calendar of N time events, defined by starting and finishing time, and place. The…
6
votes
6 answers

What are some examples of problems well suited for Integer Linear Programming?

I've always been writing software to solve business problems. I came across about LIP while I was going through one of the SO posts. I googled it but I am unable to relate how I can use it to solve business problems. Appreciate if some one can help…
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
6
votes
2 answers

testing pulp installation fails

Following instructions from http://www.coin-or.org/PuLP/main/installing_pulp_at_home.html#installation , I installed PuLP using "Windows Installation from source" When I tried to run the test on the page ( Instructions on the page : "To test that…
Sriram Samynathan
  • 141
  • 1
  • 2
  • 3
6
votes
2 answers

Clustering while trying to minimise spare capacity

I am trying to cluster ~30 million points (x and y co-ordinates) into clusters - the addition that makes it challenging is I am trying to minimise the spare capacity of each cluster while also ensuring the maximum distance between the cluster and…