rai*_*ves 5 optimization cplex docplex cp-optimizer
我在 Ubuntu 计算机上安装了CPLEX Optimization Studiodocplex ,并且正在成功使用模型模块。现在我必须使用CpoModel并docplex.cp.model出现错误:
CpoException:无法执行命令“cpoptimizer -angel”。请检查所需可执行文件的可用性。
我不知道发生了什么事。我无法获得IBM的支持,因为我有学生许可证。
Please try the following as suggested here:
CpoModel.solve(agent='local',
execfile='COSHOME/cpoptimizer/bin/cpoptimizer')
Run Code Online (Sandbox Code Playgroud)
Where COSHOME is the directory where CPLEX Optimization Studio is installed.
Alternately, you can create a file named cpo_config.py that looks like the following and include it in your PYTHONPATH:
context.solver.agent = 'local'
context.solver.local.execfile = 'full path of the cpoptimizer executable'
Run Code Online (Sandbox Code Playgroud)
The advantage of the later is that it would apply to all of your docplex programs. See also the documentation on configuring the local solving agent.
| 归档时间: |
|
| 查看次数: |
1880 次 |
| 最近记录: |