简体   繁体   中英

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. Now I have to use CpoModel from docplex.cp.model and I have the error:

CpoException: Can not execute command '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.

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.

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'

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM