在Microsoft规划求解的基础VS Matlab的fmincon约束的非线性优化基础、Microsoft、VS、fmincon

2023-09-03 09:43:19 作者:伪面君子

谁能告诉我在微软求解基础3.0例子或评论约束的非线性优化?怎么样了比较Matlab的fmincon?或者是有约束的非线性优化没有更好的.NET库?谢谢,

can anyone show me examples or reviews for constrained nonlinear optimization in Microsoft Solver foundation 3.0? How's it compared to Matlab's fmincon? Or is there any better .net library for constrained nonlinear optimization? thanks,

推荐答案

重要更新在2012年2月25日:

IMPORTANT UPDATE on Feb 25, 2012:

无国界医生3.1现在支持通过其NelderMeadSolver求解有界变量约束优化:的 http://msdn.microsoft.com/en-us/library/hh404037(V = vs.93)的.aspx

MSF 3.1 now supports nonlinear optimization with bounded variables via its NelderMeadSolver solver: http://msdn.microsoft.com/en-us/library/hh404037(v=vs.93).aspx

对于一般的线性约束,微软求解器的基础仅支持线性规划和二次规划通过其内点解算器。对于该解算器,请参阅由Tomas提到的SVM职位。

For general linear constraints, Microsoft solver foundation only support linear programming and quadratic programming via its interior point solver. For this solver, please see the SVM post mentioned by Tomas.

无国界医生有一个一般的非线性规划求解,内存有限的-BFGS,但是它不支持任何约束。该解算器也需要明确的梯度的功能。对于该解算器,请访问:

MSF has a general nonlinear programming solver, Limited-Memory-BFGS, however which does not support any constraint. This solver also requires an explicit gradient function. For this solver, please see:

Logistic回归的F#

Logistic regression in F# using MSF

F#ODSL只支持线性规划。我有一个QP扩展它,可以在 codexplex 。

F# ODSL mentioned by Tomas only supports linear programming. I have a QP extension for it, available at codexplex.

回到你的问题 - 优化F(X)与线性约束(类似于 fmincon ),我还没有看到任何免费的图书馆,有这个能力。 NMath.NET(商业)似乎有一个。我想,解决一个高度非线性优化,但它不为我工作。最后,我诉诸DotNumerics实施B-LBFGS。

Back to your question - optimize f(x) with linear constraints (similar to fmincon), I haven't seen any free library which has this ability. NMath.NET (commercial) seems to have one. I tried that for solving a highly nonlinear optimization, but it does not work for me. At last I resorted to B-LBFGS implemented in DotNumerics.

我想你也会喜欢下面的SO问题:

I think you will also be interested in the following SO question:

Open源替代MATLAB的fmincon函数?

答案指向 SciPy的。优化。cobyla ,这似乎是类似于 fmincon 的东西。但最主要的信息是,为您的特定问题,也许 fmincon 太一般了。您可以使用一个更具体的解算器,例如LBFGS或QP。另外,如果您的初始值不是很好的通用求解器有时不工作。

The answers point to SciPy.​optimize.​cobyla, which seems to be something similar to fmincon. But the main message is that for your specific problem, maybe fmincon is too general. You can use a more specific solver, e.g. LBFGS or QP. Also general solvers sometimes do not work if your initial value is not good.