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
5
votes
1 answer

cvxopt.glpk.ilp documentation on Integer & Binary set keys

I have a mixed integer programming problem, (cutting stock with column generation), that I've solved in AMPL and I'm ported to Python using cvxopt. CVXOPT "op" doesn't provide the binary variable option that I need, so I'm extending it with GLPK to…
PointOnePA
  • 91
  • 6
5
votes
1 answer

Find all alternative basic solutions using existing linear-programming tool

I have to find all basic solutions of some tiny linear-programming problems. Here's an example (in lp_solve format): max: x1 + x2; x1 + x2 <= 1; x1 <= 0.8; x2 <= 0.8; All 2 basic solutions: x1 = 0.2, x2 = 0.8 x1 = 0.8, x2 = 0.2 Of course there is…
tdihp
  • 2,329
  • 2
  • 23
  • 40
5
votes
1 answer

specifying tolerance for GLPK solver in PuLP Python

I am running PuLP Programming Library in Python 2.7.8, Windows 32 bit. I'm using GLPK as my solver for a mixed integer linear programming problem. The solver converges to approx. 1% of the optimal quickly, however time to compute the exact optimal…
Akhil
  • 53
  • 1
  • 5
5
votes
1 answer

GLPK linear programming

I am working on some very large scale linear programming problems. (Matrices are currently roughly 1000x1000 and these are the 'mini' ones.) I thought that I had the program running successfully, only I have realized that I am getting some very…
Hilary Park
  • 969
  • 1
  • 7
  • 5
4
votes
1 answer

how to write "then" as IP constraint in Julia

Hello fellows, i am learning Julia and integer programing but i am stuck at one point How to model "then" in julia-jump for integer programing leanring. Stuck here here #Define the variables of the model @variable(mo, x[1:N,1:S],…
4
votes
2 answers

pulp.pulpTestAll() :has no attribute 'pulpTestAll'

I just installed pulp and followed instructions here: https://www.coin-or.org/PuLP/main/installing_pulp_at_home.html#testing-your-pulp-installation however it shows the following message: AttributeError: module 'pulp' has no attribute…
minichloe
  • 41
  • 4
4
votes
1 answer

how to write piecewise linear objective function in Pyomo

I want to create a linear model in Pyomo that has piecewise linear function in its objective function. I managed to create the following code: model = AbstractModel() breakpoints = [-5,0,5] values = [10,0, 10] model.X = Var(bounds=(-5,5)) model.Y=…
kfurmanska
  • 51
  • 4
4
votes
0 answers

CVXOPT GLPK bindings in Python

I'm on Mac OS X El Capitan. I've installed GLPK via brew install GLPK I have python installed via Anaconda. Because I want the GLPK bindings for CVXOPT, I'm installing it manually instead of via condo install. I got the installer here:…
Leo Mizuhara
  • 365
  • 2
  • 3
  • 15
4
votes
0 answers

C element of struct inside strunct not retaining assigned value

Here's my structs : typedef struct Bounds Bounds; struct Bounds { int type; double lb; double ub; }; typedef struct HelperGlpk HelperGlpk; struct HelperGlpk { double *matrix_coefs; double *obj_coefs; Bounds *row_bounds; …
Hayanno
  • 182
  • 2
  • 8
4
votes
1 answer

Print GLPK objective/constraints in human readable format

I'm using GLPK C API for a mixed integer programming problem. Is there some way to print the objective/constraints in human readable format for debugging?
3
votes
1 answer

Adding binary variables in GLPK

I'm using GLPK under Linux to solve some linear programming problems. In one of my restrictions I have: s.t. example: binary_var+binary_val <=1; Where binary_val is a variable defined as 'binary'. If binary_val takes the value 1, will its sum be…
alfongj
  • 2,255
  • 1
  • 19
  • 23
3
votes
1 answer

Installing glpk-hs

I've been trying to use glpk-hs in my Haskell project but I'm completely lost on how to do it. I'm using stack to run my program and my confusion most likely comes from my lack of knowledge on how it works. That being said, I've downloaded…
ohhisara
  • 67
  • 1
  • 5
3
votes
2 answers

How to configure PuLP to call GLPK solver

I am using the PuLP library in Python to solve an MILP problem. I have run my problem successfully with the default solver (CBC). Now I would like to use PuLP with another solver (GLPK). How do I set up PuLP with GLPK? I have done some research…
johnwolf1987
  • 10,603
  • 3
  • 14
  • 17
3
votes
1 answer

How to add GLPK solver on pulp, python

I'd like to know how to add GLPK solver step by step on pulp, python. I have installed python (v=3.6.5), pulp (v=1.6.8). I get the result as below when I executed pulp.pulpTestAll(). Testing zero subtraction Testing inconsistant lp solution …
mhiro216
  • 91
  • 2
  • 6
3
votes
1 answer

ompr objective: minimize variance of rowsums

I am using the ompr package with r, and I cannot figure out how to change the objective function to my needs. The first model is running, but the objective is not really what I…
Manuel
  • 265
  • 3
  • 11
1
2
3
23 24