help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Configuring PuLP + GLPK


From: Seung Mo Gu
Subject: [Help-glpk] Configuring PuLP + GLPK
Date: Fri, 9 Apr 2010 11:01:47 +0400

So I just installed PuLP but was unable to configure it with GLPK. Should it 
work naturally after both are installed? I #39;m currently running Python 
2.6.5, PuLP 1.4.7, and GLPK 4.34. Could it be that the GLPK version is 
incompatible? I know PuLP requires Python 2.5 or higher. I tried running the 
sample code below in the python shell but nothing is printed. I #39;ve also 
included the pulp.pulpTestAll() output:


from pulp import *




prob = LpProblem("test1", LpMinimize)




# Variables

x = LpVariable("x", 0, 4)

y = LpVariable("y", -1, 1)

z = LpVariable("z", 0)




# Objective

prob += x + 4*y + 9*z




# Constraints

prob += x+y <= 5

prob += x+z >= 10

prob += -y+z == 7




prob.solve(GLPK(msg = 0))

# Solution

for v in prob.variables():

   print v.name, "=", v.varValue




print "objective=", value(prob.objective)

--------------------------------------------------------------

Solver pulp.solvers.CPLEX_DLL unavailable.

Solver pulp.solvers.CPLEX_CMD unavailable.

Solver pulp.solvers.COIN_CMD unavailable.

 Testing continuous LP solution

 Testing maximize continuous LP solution

 Testing unbounded continuous LP solution

 Error in CoinMP it reports Optimal

 Testing MIP solution

 Testing MIP relaxation

 Testing feasibility problem (no objective)

 Testing an infeasible problem

 Testing an integer infeasible problem

 Error in CoinMP to be fixed, reports Optimal

 Testing column based modelling

 Testing column based modelling with empty constraints

 Testing dual variables and slacks reporting

 Testing resolve of problem

 Testing Sequential Solves

 Testing fractional constraints

 Testing elastic constraints (no change)

 Testing elastic constraints (freebound)

 Testing elastic constraints (penalty unchanged)

 Testing elastic constraints (penalty unbounded)

* Solver pulp.solvers.COINMP_DLL passed.

Solver pulp.solvers.GLPK_CMD unavailable.

Solver pulp.solvers.XPRESS unavailable.

Solver pulp.solvers.GUROBI unavailable.





 
So I just installed PuLP but was unable to configure it with GLPK. Should it work naturally after both are installed? I'm currently running Python 2.6.5, PuLP 1.4.7, and GLPK 4.34. Could it be that the GLPK version is incompatible? I know PuLP requires Python 2.5 or higher. I tried running the sample code below in the python shell but nothing is printed. I've also included the pulp.pulpTestAll() output:

from pulp import *

prob = LpProblem("test1", LpMinimize)

# Variables
x = LpVariable("x", 0, 4)
y = LpVariable("y", -1, 1)
z = LpVariable("z", 0)

# Objective
prob += x + 4*y + 9*z

# Constraints
prob += x+y <= 5
prob += x+z >= 10
prob += -y+z == 7

prob.solve(GLPK(msg = 0))
# Solution
for v in prob.variables():
   print v.name, "=", v.varValue

print "objective=", value(prob.objective)
--------------------------------------------------------------
Solver pulp.solvers.CPLEX_DLL unavailable.
Solver pulp.solvers.CPLEX_CMD unavailable.
Solver pulp.solvers.COIN_CMD unavailable.
Testing continuous LP solution
Testing maximize continuous LP solution
Testing unbounded continuous LP solution
Error in CoinMP it reports Optimal
Testing MIP solution
Testing MIP relaxation
Testing feasibility problem (no objective)
Testing an infeasible problem
Testing an integer infeasible problem
Error in CoinMP to be fixed, reports Optimal
Testing column based modelling
Testing column based modelling with empty constraints
Testing dual variables and slacks reporting
Testing resolve of problem
Testing Sequential Solves
Testing fractional constraints
Testing elastic constraints (no change)
Testing elastic constraints (freebound)
Testing elastic constraints (penalty unchanged)
Testing elastic constraints (penalty unbounded)
* Solver pulp.solvers.COINMP_DLL passed.
Solver pulp.solvers.GLPK_CMD unavailable.
Solver pulp.solvers.XPRESS unavailable.
Solver pulp.solvers.GUROBI unavailable.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]