简体   繁体   中英

How do you specify the solver in Pulp

I use the library Pulp to solve linear programming problems in python, I read that the solver can be specified (primal or dual simplex, interior point, ...), but I found nothing about how to do it. The only example I read is calling the solve() function with

prob.solve(pulp.COIN_CMD(msg=1, options=['dualSimplex']))

but it generates the following error: PulpSolverError: Pulp: cannot execute cbc.exe cwd:

It looks like your pulp installation has issues with its cbc.exe.

Is it actually there and axecuteable? Have you followed the installation instructions?

https://coin-or.github.io/pulp/main/installing_pulp_at_home.html

You could verify this like this:

>>> import pulp
>>> pulp.pulpTestAll()

to your question

your calling solve correctly, I think. Fix the cbc.exe error at first :)

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