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 that you pulp installation is working correctly please type the following into a python interpreter and note that the output should be similar. The output below is what you would expect if you have not installed any other solvers and the CoinMP solver bundled with pulp works.")
My Results :
import pulp pulp.pulpTestAll() Solver pulp.solvers.CPLEX_DLL unavailable. Solver pulp.solvers.CPLEX_CMD unavailable. Solver pulp.solvers.COIN_CMD unavailable. Solver pulp.solvers.COINMP_DLL unavailable. Solver pulp.solvers.GLPK_CMD unavailable. Solver pulp.solvers.XPRESS unavailable. Solver pulp.solvers.GUROBI unavailable.
According to the webpage,this should be my output :
import pulp pulp.pulpTestAll()
Solver pulp.pulp.COIN_MEM unavailable. Solver pulp.pulp.COIN_CMD unavailable. Testing continuous LP solution Testing maximize continuous LP solution Testing unbounded continuous LP solution Testing MIP solution Testing MIP relaxation Testing feasibility problem (no objective) Testing an inf开发者_C百科easible problem Testing an integer infeasible problem (Error to be fixed) 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.pulp.COINMP_DLL passed. Solver pulp.pulp.GLPK_MEM unavailable. Solver pulp.pulp.GLPK_CMD unavailable. Solver pulp.pulp.XPRESS unavailable.
I am using Python 2.7.1, PuLP 1.4.7 on Windows 7 64 bit.
I guess it is because the CoinMP solver bundled with PuLP is not working. I just started working on Python a week back, I am just an amateur in programming.
Afaik you need to install any supported solver, eg
sudo aptitude install glpk
or
sudo aptitude install coinor-libcbc0
Just tested both on (K)ubuntu 11.10 and got
Solver pulp.solvers.PULP_CBC_CMD unavailable.
Solver pulp.solvers.CPLEX_DLL unavailable.
Solver pulp.solvers.CPLEX_CMD unavailable.
Testing zero subtraction
Testing continuous LP solution
Testing maximize continuous LP solution
Testing unbounded continuous LP solution
Testing Long Names
Testing repeated Names
Testing MIP solution
Testing MIP relaxation
Testing feasibility problem (no objective)
Testing an infeasible problem
Testing an integer infeasible problem
Testing column based modelling
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.COIN_CMD passed.
Solver pulp.solvers.COINMP_DLL unavailable.
Testing zero subtraction
Testing continuous LP solution
Testing maximize continuous LP solution
Testing unbounded continuous LP solution
Testing Long Names
Testing repeated Names
Testing MIP solution
Testing MIP relaxation
Testing feasibility problem (no objective)
Testing an infeasible problem
Testing an integer infeasible problem
Testing column based modelling
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.GLPK_CMD passed.
Solver pulp.solvers.XPRESS unavailable.
Solver pulp.solvers.GUROBI unavailable.
Solver pulp.solvers.PYGLPK unavailable.
Solver pulp.solvers.YAPOSIB unavailable.
hth
Try run python GUI as administrator
精彩评论