[英]CpoException: Can not execute command 'cpoptimizer -angel'. Please check availability of required executable file
I have CPLEX Optimization Studio installed on my Ubuntu machine and I am using the docplex
model module with success.我在我的 Ubuntu 机器上安装了CPLEX Optimization Studio ,并且我成功地使用了
docplex
模型模块。 Now I have to use CpoModel from docplex.cp.model
and I have the error:现在我必须使用docplex.cp.model中的
docplex.cp.model
并且出现错误:
CpoException: Can not execute command 'cpoptimizer -angel'.
CpoException:无法执行命令“cpoptimizer -angel”。 Please check availability of required executable file.
请检查所需的可执行文件的可用性。
I have no idea what's going on.我不知道是怎么回事。 I cannot get support from IBM because I have student license.
我无法获得IBM的支持,因为我有学生许可证。
Please try the following as suggested here :请按照此处的建议尝试以下操作:
CpoModel.solve(agent='local',
execfile='COSHOME/cpoptimizer/bin/cpoptimizer')
Where COSHOME
is the directory where CPLEX Optimization Studio is installed.其中
COSHOME
是安装 CPLEX Optimization Studio 的目录。
Alternately, you can create a file named cpo_config.py
that looks like the following and include it in your PYTHONPATH
:或者,您可以创建一个名为
cpo_config.py
的文件,如下所示并将其包含在您的PYTHONPATH
中:
context.solver.agent = 'local'
context.solver.local.execfile = 'full path of the cpoptimizer executable'
The advantage of the later is that it would apply to all of your docplex programs.后者的优点是它适用于您所有的 docplex 程序。 See also the documentation on configuring the local solving agent .
另请参阅有关配置本地求解代理的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.