测试纸浆安装失败

时间:2011-06-24 17:16:26

标签: python linear-programming pulp

按照http://www.coin-or.org/PuLP/main/installing_pulp_at_home.html#installation的说明,我使用“从源安装的Windows安装”

安装了PuLP

当我尝试在页面上运行测试时(页面上的说明:“要测试您的纸浆安装是否正常工作,请在python解释器中键入以下内容并注意输出应该类似。下面的输出如果您没有安装任何其他求解器和与纸浆捆绑在一起的CoinMP求解器,那么您会期望。“)

我的结果:

  
    
      

进口纸浆       pulp.pulpTestAll()       Solver pulp.solvers.CPLEX_DLL不可用。       Solver pulp.solvers.CPLEX_CMD不可用。       Solver pulp.solvers.COIN_CMD不可用。       Solver pulp.solvers.COINMP_DLL不可用。       Solver pulp.solvers.GLPK_CMD不可用。       Solver pulp.solvers.XPRESS不可用。       Solver pulp.solvers.GUROBI无法使用。

    
  

根据网页,这应该是我的输出:

  
    
      

进口纸浆       pulp.pulpTestAll()
      Solver pulp.pulp.COIN_MEM不可用。       Solver pulp.pulp.COIN_CMD不可用。            测试连续LP解决方案            测试最大化连续LP解决方案            测试无界连续LP解决方案            测试MIP解决方案            测试MIP放松            测试可行性问题(无客观)            测试不可行的问题            测试整数不可行的问题(要修复的错误)            测试基于列的建模            使用空约束测试基于列的建模            测试双变量和松弛报告            测试解决问题            测试顺序求解            测试分数约束            测试弹性约束(无变化)            测试弹性约束(freebound)            测试弹性约束(惩罚不变)            测试弹性约束(惩罚无限制)       * Solver pulp.pulp.COINMP_DLL通过。       Solver pulp.pulp.GLPK_MEM不可用。       Solver pulp.pulp.GLPK_CMD不可用。       Solver pulp.pulp.XPRESS无法使用。

    
  

我在Windows 7 64位上使用Python 2.7.1,PuLP 1.4.7。

我想这是因为与PuLP捆绑在一起的CoinMP解算器无法正常工作。一周前我刚刚开始研究Python,我只是编程方面的业余爱好者。

2 个答案:

答案 0 :(得分:2)

Afaik您需要安装任何支持的解算器,例如

sudo aptitude install glpk

sudo aptitude install coinor-libcbc0

刚刚在(K)ubuntu 11.10上测试并获得了

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

答案 1 :(得分:0)

尝试以管理员身份运行python GUI