简体   繁体   English

C ++中的非线性编程库

[英]Non-linear programming library in C++

I'm looking for recommendations for C++ libraries for non-linear programming ( not just for integers! ). 我正在寻找用于非线性编程的C ++库的建议( 不仅仅是整数! )。

Preference is for actively maintained F/OSS solutions, but actively maintained commercial solutions offering free evaluation versions are acceptable. 优先考虑积极维护的F / OSS解决方案,但可以接受提供免费评估版本的积极维护的商业解决方案。

Thanks in advance! 提前致谢!

Edit: As requested, here are more details: 编辑:根据要求,这里有更多细节:

The application I'm working on is simple, and it's about minimizing polynomials of degree 4 and higher (up to 11) with a small set (~20) of constraints expressed as inequalities (again, as polynomials, degree <= 4). 我正在研究的应用很简单,它是关于最小化4次和更高次数(最多11次)的多项式,其中一小组约束(~20)表示为不等式(同样,作为多项式,度<= 4)。 I might also, occasionally, have to throw in some trigonometric function, though. 不过,我偶尔也可能要投入一些三角函数。 In any case, it's always continuous, differentiable functions I'm dealing with. 无论如何,它始终是我正在处理的连续,可区分的功能。 The number of variable ranges from 1 to 12, for now, and won't go much beyond that. 到目前为止,变量的数量范围从1到12,并且不会超出此范围。

Finally, I need a solution that works on Windows, but cross-platform ones would be preferable. 最后,我需要一个适用于Windows的解决方案,但跨平台的解决方案更可取。

I'm not sure, but maybe ROOT from CERN will be suitable for you. 我不确定,但也许CERN的ROOT适合你。 This is really huge library ( ROOT::Math::Polynomial class, for example) from CERN itself. 这是来自CERN本身的巨大的库(例如ROOT :: Math :: Polynomial类)。

I must say, it's not a 'one-minute-to-learn' library indeed, but has both: console to work with all math stuff in real time (looks similar to MathCAD cmd line) and libs and dlls you can link with your code statically. 我必须说,它确实不是一个“一分钟到学习”的库,但它有两个: 控制台可以实时处理所有数学内容(看起来类似于MathCAD cmd行)和libsdll,你可以链接到你的代码静态。 And it's a cross platform library. 它是一个跨平台的库。 More to say, the most powerful feature of the ROOT is that you can build almost all kind of charts and plots. 更有甚者,ROOT最强大的功能是你可以构建几乎所有类型的图表和图表。

The most robust such library I know of is IPOPT . 我所知道的最强大的库是IPOPT

It is astonishingly robust, it gave me results for chemical engineering problems that I could not solve even with commercial solvers. 它非常强大,它给了我化学工程问题的结果,即使使用商业解算器也无法解决。 Look at the success stories for further examples of application. 查看有关应用程序进一步示例的成功案例

NLopt has solid C code for a good dozen algorithms, including COBYLA , Constrained Optimization BY Linear Approximations for derivative-free optimization with nonlinear inequality and equality constraints, by MJD Powell. 对于十几种算法, NLopt具有可靠的C代码,包括COBYLA ,约束优化BY线性近似,用于非线性不等式和等式约束的无导数优化,由MJD Powell提出。
Added: here are runs of several of the non-derivative optimizers in NLopt . 补充: 这里NLopt中几个非衍生优化器的NLopt
For Rosenbrock and Powell test functions in 5d and 10d, they're all very sensitive to random startpoints; 对于5d和10d的Rosenbrock和Powell测试函数,它们都对随机起始点非常敏感; ymmv. 因人而异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM