2016-11-28 27 views
2

私のOSはウィンドウ7、パルプバージョンは1.6.1、グロビバージョンは7.0.1です。 gurobipyは正常にインポートできます。 pulp.solvers.GUROBIがテストに合格したので、私はグロビを使うことができました。しかし、pulp.solvers.CPLEX_CMDは失敗しました。エラーメッセージは次のとおりです。Pulp.pulpTestAll()テストに失敗しました。アンパックする値が多すぎます

pulp.pulpTestAll() 
    Testing zero subtraction 
    Testing inconsistant lp solution 
    Testing continuous LP solution 
    Testing maximize continuous LP solution 
    Testing unbounded continuous LP solution 
    Testing Long Names 
    Testing repeated Names 
    Testing zero constraint 
    Testing zero objective 
    Testing LpVariable (not LpAffineExpression) objective 
    Testing Long lines in LP 
    Testing LpAffineExpression divide 
    Testing MIP solution 
    Testing MIP solution with floats in objective 
    Testing MIP relaxation 
    Testing feasibility problem (no objective) 
    Testing an infeasible problem 
    Testing an integer infeasible problem 
    Testing column based modelling 
    Testing dual variables and slacks reporting 
    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.PULP_CBC_CMD passed. 
Solver pulp.solvers.CPLEX_DLL unavailable 
    Testing zero subtraction 
    Testing inconsistant lp solution 
    Testing continuous LP solution 
    Testing maximize continuous LP solution 
    Testing unbounded continuous LP solution 
    Testing Long Names 
    Testing repeated Names 
    Testing zero constraint 
'_dummy' 
('* Solver', <class pulp.solvers.CPLEX_CMD at 0x000000000B224CA8>, 'failed.') 
Solver pulp.solvers.CPLEX_PY unavailable 
Solver pulp.solvers.COIN_CMD unavailable 
Solver pulp.solvers.COINMP_DLL unavailable 
Solver pulp.solvers.GLPK_CMD unavailable 
Solver pulp.solvers.XPRESS unavailable 
    Testing zero subtraction 
    Testing inconsistant lp solution 
    Testing continuous LP solution 
    Testing maximize continuous LP solution 
    Testing unbounded continuous LP solution 
    Testing Long Names 
    Testing repeated Names 
    Testing zero constraint 
    Testing zero objective 
    Testing LpVariable (not LpAffineExpression) objective 
    Testing LpAffineExpression divide 
    Testing MIP solution 
    Testing MIP solution with floats in objective 
    Testing MIP relaxation 
    Testing feasibility problem (no objective) 
    Testing an infeasible problem 
    Testing an integer infeasible problem 
    Testing column based modelling 
    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.GUROBI passed. 
    Testing zero subtraction 
    Testing inconsistant lp solution 
    Testing continuous LP solution 
too many values to unpack 
('* Solver', <class pulp.solvers.GUROBI_CMD at 0x000000000B224FA8>, 'failed.') 
Solver pulp.solvers.PYGLPK unavailable 
Solver pulp.solvers.YAPOSIB unavailable 
Traceback (most recent call last): 

    File "<ipython-input-21-94f8f423594d>", line 1, in <module> 
    pulp.pulpTestAll() 

    File "C:\Users\Guodong\Software\Anaconda2\lib\site-packages\pulp\pulp.py",  line 2283, in pulpTestAll 
    raise PulpError("Tests Failed") 

PulpError: Tests Failed 
+0

これを把握しましたか?同じエラーが発生しています。 – SashaZd

+0

@SashaZd、いいえ、私はただエラーを無視しました –

+0

私はgurobiをアンインストールして再インストールしました。今回はそれが働いた:) – SashaZd

答えて

0

同じエラーが表示されます。それはGurobi_CMDの問題でした。グロビはすべてのテストに合格しますが、グロビ_CMDで失敗します。

Gurobiをアンインストールして再インストールし、PuLPの.cfgファイルをGurobiインストールを正しく指すように変更して解決しました。

関連する問題