Questions tagged [glpk]

The GLPK (GNU Linear Programming Kit) is, according to its website, a package for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.

The GLPK (GNU Linear Programming Kit) is, according to its website, a package for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.

GLPK supports the GNU MathProg modeling language, which is a subset of the AMPL language.

350 questions
95
votes
3 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
  • 1,085
  • 1
  • 8
  • 6
19
votes
10 answers

GLPK: No such file or directory error when trying to install R package

I am trying to install sparkTable in R 3.1.0 which depends on Rglpk. I manually installed GPLK on the system and added the libs folder to LD_LIBRARY_PATH before going into R for the install.packages("sparkTable") procedure. I get this error during…
719016
  • 9,922
  • 20
  • 85
  • 158
12
votes
0 answers

Warm-start linear programming in Python?

I'm working on an mid-sized linear program (70k x 10k sparse constraint matrix) and need to run a large number of scenarios, requiring ~2,000 CPU-hours at my current solve time. Because the changes are relatively minor (changing at most ~10% of the…
emunsing
  • 9,536
  • 3
  • 23
  • 29
10
votes
9 answers

Pyomo can't locate GLPK solver

I'm trying to use the GLPK solver with Pyomo. I have a working model that's been tested, but keep getting an error saying GLPK can't be found. WARNING: Could not locate the 'glpsol' executable, which is required for solver 'glpk' I've installed…
Dylan Cross
  • 544
  • 2
  • 6
  • 14
9
votes
5 answers

PyInstaller .exe file does nothing

After 3 days, I can't get a python program packaged into a .exe file. I've tried py2exe (which continuously missed modules), and PyInstaller. Here's the complicated part. My program uses a lot of additional installed modules (coopr, pyomo,…
Dylan Cross
  • 544
  • 2
  • 6
  • 14
8
votes
2 answers

PuLP very slow when adding many constraints

I'm trying to use PuLP, but it is taking 50 seconds to add 4000 constraints (with 67 variables). Solving the problem only takes a fraction of a second. We want to use PuLP to easily test several solvers on a large set of problems. Should it be…
jmilloy
  • 7,875
  • 11
  • 53
  • 86
8
votes
4 answers

Unable to compile pyglpk on OSX 10.8 / Ubuntu 14.x

I am struggling to compile PyGLPK on OSX 10.8. I have installed glpk and gmp through homebrew. I have verified that the following files are all present in /usr/local/include gmp.h gmpxx.h glpk.h Yet I still get the following error. python setup.py…
Michael Barton
  • 8,868
  • 9
  • 35
  • 43
7
votes
5 answers

pulp.solvers.PulpSolverError: PuLP: cannot execute glpsol.exe

I am a newbie with python and optimization. I am getting some error, please help me resolve it. I tried running the below mentioned code in PyCharm where I am running Anaconda 3 from pulp import * x = LpVariable("x", 0, 3) y = LpVariable("y", 0,…
Rahul Bajaj
  • 71
  • 1
  • 1
  • 3
7
votes
4 answers

How do you install glpk-solver along with pyomo in Winpython

I want to use "pyomo" for my studies. I installed pyomo via easy_install coopr install instructions, Pyomo needs a solver to work so I wanted to install the (GNU Linear Programming Kit) glpk_webpage, pyomo seems to be installed just right because I…
www.pieronigro.de
  • 840
  • 2
  • 12
  • 30
6
votes
0 answers

Building glpk error: Could not build wheels for glpk which use PEP 517 and cannot be installed directly

when trying to install glpk I get the following error. I've tried many things to solve it but I don't get to find a solution Collecting glpk Using cached glpk-0.4.5.tar.gz (152 kB) Installing build dependencies ... done Getting requirements to…
6
votes
0 answers

Pyomo cannot find GLPK solver on Docker machine

I have a Docker machine running Linux. I am using Pyomo with the GLPK solver. I installed GLPK from the shell command line for the Docker image, using apt-get install glpk-utils I have all my code saved under the subfolder /code I can see glpsol is…
Ryan Skene
  • 864
  • 1
  • 12
  • 29
6
votes
3 answers

How to use GLPK with cvxopt in Windows 10?

I use 64 bit Windows 10. I downloaded glpk-4.64 for Windows. I unzipped the file to my documents. I added the w64 path in this folder to Windows' environment variables. I check if the glpk works in command line by executing…
alwbtc
  • 28,057
  • 62
  • 134
  • 188
6
votes
1 answer

How can I write an if condition for my variable in GLPK?

Here is my full problem: Information: *Max. total investment: $125 *Pay-off is the sum of the units bought x pay-off/unit *Cost per investment: Buy-in cost + cost/unit x number of units if you buy at least one unit *The cost is sum of the costs per…
Figen Güngör
  • 12,169
  • 14
  • 66
  • 108
5
votes
1 answer

How can I write an IF condition for my decision variable for Mixed Integer Linear Programming (MILP) using PuLP GLPK on Python?

I am trying to solve an optimization problem using mixed integer linear programming on PuLP with GLPK solver on Python. So far I have been successful solving basic optimization problems with constraints, such as: prob = LpProblem("MILP",…
Muhammad Ali
  • 277
  • 3
  • 11
5
votes
0 answers

CVXPY: suppress output for GLPK

I am using cvxpy and since the update to 1.0.6 I get unwanted output when calling GLPK. import cvxpy as cvx x = cvx.Variable(2) p = cvx.Problem(cvx.Minimize(x[0]), [x[0] + x[1] == 1, x[0] - x[1] >= 1]) p.solve(solver = cvx.GLPK) In IPython3 this…
Hennich
  • 682
  • 3
  • 18
1
2 3
23 24