PulpSolverError:“PuLP:执行 glpsol.exe 时出错”纸浆测试All() 产生此错误消息:“CBC 提供了一个错误的热启动解决方案”

问题描述

在使用 PuLP 求解时遇到“PulpSolverError: PuLP: Error while execution glpsol.exe”问题。

     ---------------------------------------------------------------------------
    PulpSolverError                           Traceback (most recent call last)
    <ipython-input-8-2777eb898bca> in <module>
         28             file.write("\n% of Customers {:.1f}" .format(j*100))
         29             print ('\n% of Customers within the service distance: ',j*100,'%')
    ---> 30             df_assign_vars[j],list_facility_vars[j],number_of_warehouses[j] = optimal_location(service_level,j,service_level_par,warehouses,customers,customer_demands,distance,scenario_name)
         31             if output_inline == True:
         32                 output_visual_inline(number_of_warehouses)
    
    <ipython-input-3-5775a28a71f6> in optimal_location(service_level,sl_customers,scenario_name)
         63 
         64     # The problem is solved using PuLP's choice of Solver
    ---> 65     germany_problem.solve()
         66     #germany_problem.solve(use_mps=False)
         67 
    
    ~\Anaconda3\lib\site-packages\pulp\pulp.py in solve(self,solver,**kwargs)
       1897         #time it
       1898         self.solutionTime = -clock()
    -> 1899         status = solver.actualSolve(self,**kwargs)
       1900         self.solutionTime += clock()
       1901         self.restoreObjective(wasNone,dummyVar)
    
    ~\Anaconda3\lib\site-packages\pulp\apis\glpk_api.py in actualSolve(self,lp)
         91 
         92         if not os.path.exists(tmpSol):
    ---> 93             raise PulpSolverError("PuLP: Error while executing "+self.path)
         94         status,values = self.readsol(tmpSol)
         95         lp.assignVarsVals(values)

PulpSolverError: PuLP: Error while executing glpsol.exe

使用pulpTestAll() 进行了检查并收到此错误消息

C:\Users\<username>\Anaconda3\lib\site-packages\pulp\tests\test_pulp.py:325: UserWarning:

CBC gives a wrong solution with warmStart.

感谢您的帮助!尝试重新安装 PuLP,但同样的问题仍然存在

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...