在 Python 的 Pymo 扩展上安装 Couenne 求解器
Installing Couenne solver on Python's Pymo extension
如何安装 Pyomo 的“Cuenne”优化器扩展?我从以下位置下载了二进制文件:https://www.coin-or.org/download/binary/Couenne/
这是来自 Pyomo 网站的关于如何使用美国手语解决问题的官方指南:
The basic work flow that takes place above can be summarized as:
Create an ASL solver plugin that uses the ipopt executable appearing
in the shell search PATH.
Output the Pyomo model as an NL file. Invoke the solver (which
produces an SOL file).
Check the solver termination condition stored in the results object.
Load the solution stored in the results object into the Pyomo model.Construct a Pyomo model.
Solve the PyomoRead the SOL file into a Pyomo results object.
http://nbviewer.jupyter.org/github/Pyomo/PyomoGallery/blob/master/asl_io/asl_io.ipynb
但它根本没有详细说明如何让 Pyomo 识别 Couenne 求解器。
您必须确保 Couenne 可执行文件在您的 PATH 环境变量中。如果您可以打开终端并输入 couenne
并获得以下输出,您就会知道这是正确完成的:
$ couenne
Couenne 0.5.6 -- an Open-Source solver for Mixed Integer Nonlinear Optimization
Mailing list: couenne@list.coin-or.org
Instructions: http://www.coin-or.org/Couenne
No stub!
usage: couenne [options] stub [-AMPL] [<assignment> ...]
Options:
-- {end of options}
-= {show name= possibilities}
-? {show usage}
-bf {read boundsfile f}
-e {suppress echoing of assignments}
-of {write .sol file to file f}
-s {write .sol file (without -AMPL)}
-v {just show version}
同样,您应该打开终端并验证是否已成功安装 Pyomo。一旦你验证了这两件事,你就可以使用 Pyomo 的 Couenne,只需将 'couenne'
指定为求解器即可。
对于那些在实践中纠结 Bethany 的回答意味着什么的人(就像我一样)。将 couenne.exe 文件复制到与例如相同的文件夹中。 ipopt.exe(例如:C:\ProgramData\Anaconda3\Library\bin)
如何安装 Pyomo 的“Cuenne”优化器扩展?我从以下位置下载了二进制文件:https://www.coin-or.org/download/binary/Couenne/
这是来自 Pyomo 网站的关于如何使用美国手语解决问题的官方指南:
The basic work flow that takes place above can be summarized as:
Create an ASL solver plugin that uses the ipopt executable appearing in the shell search PATH.
Output the Pyomo model as an NL file. Invoke the solver (which produces an SOL file).
Check the solver termination condition stored in the results object.
Load the solution stored in the results object into the Pyomo model.Construct a Pyomo model.
Solve the PyomoRead the SOL file into a Pyomo results object.
http://nbviewer.jupyter.org/github/Pyomo/PyomoGallery/blob/master/asl_io/asl_io.ipynb
但它根本没有详细说明如何让 Pyomo 识别 Couenne 求解器。
您必须确保 Couenne 可执行文件在您的 PATH 环境变量中。如果您可以打开终端并输入 couenne
并获得以下输出,您就会知道这是正确完成的:
$ couenne
Couenne 0.5.6 -- an Open-Source solver for Mixed Integer Nonlinear Optimization
Mailing list: couenne@list.coin-or.org
Instructions: http://www.coin-or.org/Couenne
No stub!
usage: couenne [options] stub [-AMPL] [<assignment> ...]
Options:
-- {end of options}
-= {show name= possibilities}
-? {show usage}
-bf {read boundsfile f}
-e {suppress echoing of assignments}
-of {write .sol file to file f}
-s {write .sol file (without -AMPL)}
-v {just show version}
同样,您应该打开终端并验证是否已成功安装 Pyomo。一旦你验证了这两件事,你就可以使用 Pyomo 的 Couenne,只需将 'couenne'
指定为求解器即可。
对于那些在实践中纠结 Bethany 的回答意味着什么的人(就像我一样)。将 couenne.exe 文件复制到与例如相同的文件夹中。 ipopt.exe(例如:C:\ProgramData\Anaconda3\Library\bin)