IPython:AMPL运行Gecode需要指向什么?

2024-06-01 09:29:23 发布

您现在位置:Python中文网/ 问答频道 /正文

在这篇文章之后-http://zverovich.net/2013/06/27/visualizing-geographical-ampl-data-using-ipython-and-google-charts.html

我试过这样的方法:

...
option solver '..\Gecode\include\gecode';
solve;

CreateProcess("..\Gecode\include\gecode.exe") failure!
Error code 2.

在没有:

^{pr2}$

在Windows上安装gecode之后,我没有看到要指向的特定文件。IPython项目还需要其他AMPL文件吗ampl.exe文件,还是只是缺少了gecode?在


Tags: 文件httpdatanetincludeipythonexeusing
1条回答
网友
1楼 · 发布于 2024-06-01 09:29:23

为了能够调用solve,还需要安装解算器。通常情况下,解算器可执行文件被放置在搜索路径上,以便从AMPL中获取,尽管您可以在“解算器”选项中指定解算器可执行文件的完整路径,例如

option solver 'path/to/solver';

可以从AMPL Google Code repository下载包括gecode在内的一些开源解算器。在

相关问题 更多 >