Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Python的Pymo扩展上安装Couenne解算器_Python_Windows_Installation_Pyomo - Fatal编程技术网

在Python的Pymo扩展上安装Couenne解算器

在Python的Pymo扩展上安装Couenne解算器,python,windows,installation,pyomo,Python,Windows,Installation,Pyomo,如何安装Pyomo的Cuenne优化器扩展?我已从以下位置下载了二进制文件: 以下是Pyomo网站关于如何使用ASL解决问题的官方指南: 上述基本工作流程可概括为: 创建使用ipopt可执行文件的ASL解算器插件 在shell搜索路径中 将Pyomo模型输出为NL文件。调用所需的解算器 生成一个SOL文件 检查结果对象中存储的解算器终止条件 将结果对象中存储的解决方案加载到Pyomo模型中。构造Pyomo模型 解决Pyomo问题将SOL文件读入Pyomo结果对象 但是它没有详细说明如何让Pyom

如何安装Pyomo的Cuenne优化器扩展?我已从以下位置下载了二进制文件:

以下是Pyomo网站关于如何使用ASL解决问题的官方指南:

上述基本工作流程可概括为:

创建使用ipopt可执行文件的ASL解算器插件 在shell搜索路径中

将Pyomo模型输出为NL文件。调用所需的解算器 生成一个SOL文件

检查结果对象中存储的解算器终止条件

将结果对象中存储的解决方案加载到Pyomo模型中。构造Pyomo模型

解决Pyomo问题将SOL文件读入Pyomo结果对象


但是它没有详细说明如何让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”作为解算器。

您必须确保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

对于那些像我一样在实践中挣扎Bethany的答案意味着什么的人。将couenne.exe文件复制到与例如ipopt.exe相同的文件夹中,例如:C:\ProgramData\Anaconda3\Library\bin