Apache Commons 数学优化“Hello World”例子
我正在尝试实现 apache commons 数学优化包。我正在寻找一个“hello world”示例来求解两个方程的约束非线性系统。我的系统是可微分的,由两个自变量组成。 apache commons 文档和彻底的谷歌搜索没有产生任何代码示例供我构建 - 有什么建议吗?
I am attempting to implement the apache commons math optimization package. I am searching for a "hello world" example to solve a constrained non-linear system of two equations. My system is differentialable and consists of two independent variables. The apache commons documentation and a thorough google search have yielded no code examples for me to build off of -- any suggestions out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想要优化非线性函数并且您的问题包含非线性约束,那么 Apache Commons Math 中的算法还不够。目前,仅支持具有变量边界的非线性目标函数。
要解决导数已知的一般 NLP 问题,您可以考虑通过 Java 接口使用 Ipopt 。
如果导数未知,并且变量数量相对较少(小于 100),您可以考虑使用 COBYLA2 优化器的 Java 端口,该端口可用 此处。
If you want to optimize a nonlinear function and your problem consists of nonlinear constraints, the algorithms in Apache Commons Math is not sufficient. Currently, only nonlinear objective functions with variable bounds is supported.
To solve general NLP problems where the derivatives are known, you might instead consider using Ipopt via its Java interface.
If the derivatives are not known, and the number of variables is relatively small (less than 100), you could consider to use the Java port of the COBYLA2 optimizer, which is available here.