简体   繁体   English

在Python中将求解器添加到PuLP

[英]Adding solvers to PuLP in Python

I just started working with Pulp in Python 3.5 (Spyder) on OSx. 我刚刚开始在OSx的Python 3.5(Spyder)中使用Pulp。

However, after running the pip install I ran the tests and some solvers are not available (eg CPLEX, COIN and XPRESS). 但是,在运行pip安装后,我运行了测试,并且某些求解器不可用(例如CPLEX,COIN和XPRESS)。

I'm trying to solve a quadratic programming problem and I'd like to use the XPRESS solver, but I cannot find how to install extra solvers. 我正在尝试解决二次编程问题,并且想使用XPRESS求解器,但找不到如何安装额外的求解器。

Do you mean FICO XPRESS: https://en.wikipedia.org/wiki/FICO_Xpress . 您是说FICO XPRESS: https//en.wikipedia.org/wiki/FICO_Xpress It is not free though. 它不是免费的。 You will need to pay and download. 您需要付费和下载。

I have tried Coin, it is free and fast. 我尝试过Coin,它是免费且快速的。 To download, go to https://projects.coin-or.org/CoinBinary . 要下载,请访问https://projects.coin-or.org/CoinBinary

Pulp is an interface for the solvers, not the solvers themselves. 纸浆是求解器的接口,而不是求解器本身的接口。 So when you download pulp, solvers are not installed automatically. 因此,当您下载纸浆时,不会自动安装求解器。 You need to download Coin, Glpk, etc. in addition to the installation of Pulp. 除了安装Pulp之外,还需要下载Coin,Glpk等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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