Microsoft Solver Foundation 满足我的需求吗?

发布于 2024-07-30 03:45:02 字数 621 浏览 4 评论 0原文

我正在研究线性和非线性编程(优化)框架的选项。

要求是:

  1. 支持大约线性和非线性规划问题。 100-1000 个变量和最多大约 1000 个约束(我认为这非常简单)。 非线性问题具有涉及多个变量的乘法或除法的约束 - 没有比这更复杂的了。

  2. 与 MS 环境(SQL Server、MS Access、.NET、Excel)集成良好

  3. 很高兴获得支持对于特别问题定义(即某种脚本语言或支持在 Excel 前端定义和解决问题)

  4. 我会单独使用 Excel,但我还需要能够以编程方式(.NET 环境)连接到求解器以解决更大的问题。

对于编程访问,我打算开发一个求解器的抽象接口(这样我们就可以在需要时更改求解器)。 然后我偶然发现了 MS Solver Foundation (http://code.msdn.microsoft.com/solverfoundation) 已经有这个接口了。 我想知道它是否符合我们的其他要求以及用户对此有何看法。

I'm looking into options for a linear and non-linear programming (optimization) framework.

Requirements are:

  1. Support linear and non-linear programming problems with approx. 100-1000 variables and up to about 1000 constraints (I gather that is pretty simple). The non-linear problems have constraints involving multiplication or division of multiple variables - nothing more complicated than that.

  2. Integrates well with MS environments (SQL Server, MS Access, .NET, Excel)

  3. Nice to have would be support for ad hoc problem definition (i.e. some sort of scripting language or support for defining and solving the problem in an Excel front end)

  4. I would use Excel alone but I also need the ability to interface to the solver programatically (.NET environment) for the bigger problems.

For programmatic access I was intending to develop an abstracting interface to the solver (so we could change solvers if ever needed). Then I stumbled into MS Solver Foundation (http://code.msdn.microsoft.com/solverfoundation) which already has this interface. I am wondering if it fits the bill with respect to our other requirements and what opinion users have of it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一刻暧昧 2024-08-06 03:45:02

事实证明 Microsoft Solver Foundation 不支持非线性编程。 截至 2010 年 1 月,该团队的 官方据消息,他们正在考虑此事,但不在他们的近期计划中。

因此,我选择 AMPL 作为建模语言接口,KNITRO 用于求解器算法。 KNITRO 看起来不错,因为它显然由三种算法合二为一( 的 2 种变体)内点法Active Set法之一)。 另请参阅维基百科页面 KNITRO

在一个出色的门户网站上尝试了 AMPL 和 KNITRO 的评估版本后,我最终选择了 AMPL 和 KNITRO,该门户网站显然是由美国国家科学基金会和美国能源部资助的 阿贡国家实验室 名为 NEOS。 NEOS 提供了一个网络界面,用于使用 AMPL 或 GAMS(以及一些求解器和其他一些求解器)上传您的数学模型,然后通过结果网页和电子邮件返回您的结果。 据说有一个用于提交问题的电子邮件界面,但我没有成功地让它发挥作用。

现在,这一切都需要花钱。 KNITRO 和 AMPL 是商业产品。 最终该解决方案的成本约为 8000 美元。 不便宜。 如果您正在寻找免费的解决方案,我认为解算器的选项几乎仅限于 IPOPT(我也在 NEOS 上尝试过,发现它运行良好,但由于其他非技术原因我无法选择它)并且放弃 AMPL 接口。 您可以通过IPOPT 的API 设置您的问题。 但与 Micrsoft Solver Foundation 的 API 不同,IPOPT 接口稍微复杂一些,而且最具挑战性的是,它要求您的调用应用程序实现计算模型非线性方程的一阶(可能还有二阶)导数的回调。 建模语言接口(如 AMPL)会为您处理这个问题,因为它们能够根据用其语言编写的所有方程计算符号导数。

Well it turns out Microsoft Solver Foundation does not support non-linear programming. As of Jan 2010, the team's official word on this is that they are considering it but that it is not in their immediate plans.

So I have settled on AMPL as the modelling language interface and KNITRO for the solver algorithm. KNITRO looks good because it apparantly consists of three algorithms in one (2 variants of the Interior Point Method and 1 of Active Set method). See also the Wikipedia page for KNITRO.

I settled on AMPL and KNITRO after trying out evaluation versions of both on an excellent web portal apparently funded by the US National Science Foundation and US Dept of Energy at the US Argonne National Laboratory called NEOS. NEOS provides a web interface for uploading your mathematical model using AMPL or GAMS (and for some solvers, a few others) and then getting your results back via a results web page and by email. There is supposedly an email interface for submitting problems but I wasn't successful in getting that to work.

Now, all this costs money. KNITRO and AMPL are commercial products. In the end the solution will cost about $8000 US. Not cheap. If you are looking for free solutions I think the options are pretty much limited to IPOPT for the solver (which I also tried on NEOS and found that it worked well but I was not able to select it because of other non-technical reasons) and forgoing the AMPL interface. You can set up your problem via IPOPT's API. Unlike Micrsoft Solver Foundation's API though, the IPOPT interface is a bit more complicated and, most challenging of all, it requires that your calling application implement callbacks that compute first (and, possibly, second) derivatives of your model's non-linear equations. Modelling language interfaces (like AMPL) take care of this for you because they are able to compute symbolic derivatives from all the equations written in their language.

夏至、离别 2024-08-06 03:45:02

Based on your listed requirements, it looks like Microsoft Solver Foundation meets everyone of your requirements and then some. Read the "What Is Solver Foundation?" document on the Solver Foundation site. It mentions Linear programming, non-linear programming, Develop in .NET, can use in Excel, Solver Foundation also comes with a Microsoft Office Excel add-in to provide a complete modeling environment in a familiar interface.

柠栀 2024-08-06 03:45:02

我尝试过Solver Foundation来解决我过去尝试(不成功)解决的一个问题,并在2天内破解了它,包括Solver API的学习。
求解器性能非常出色,SFS(求解器基础服务)API 也非常棒

I've tried Solver Foundation on a problem I tried (unsuccessfully) to solve in the past, and cracked it in 2 days, including learning of Solver API.
Solver performance is great, and SFS (Solver Foundation Services) API is AWESOME.

小…楫夜泊 2024-08-06 03:45:02

基于 GNU 的 GLPK 库是一个很棒的免费选项。 我已经向它抛出了数千个列问题,不用担心。 它需要几种不同的问题定义格式,但对我来说最简单的是通过 C 或 C++ API 使用。 其背后的引擎的改进一直在发生。 我相信也有一些包装器可用(即 Perl、Python)。

The GNU-based GLPK library is a great, free option. I've thrown 1000s and 1000s of column problems at it no worries. It takes a few different problem definition formats, but was easiest for me to use via the C or C++ API. Improvements to the engines behind it occur all the time. I believe some wrappers are available too (ie. Perl, Python).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文