Java 数学优化库 --- 免费或开源推荐?

发布于 2024-07-06 19:11:53 字数 112 浏览 5 评论 0 原文

有谁知道这样一个执行数学优化(线性规划、凸优化或更一般类型的问题)的库? 我正在寻找类似 MATLAB 的工具,但能够处理更大的问题。 我是否必须编写自己的实现,或者购买其中一种商业产品(CPLEX 等)?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have to write my own implementations, or buy one of those commercial products (CPLEX and the like)?

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

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

发布评论

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

评论(7

唔猫 2024-07-13 19:11:54

一个好的答案取决于您所说的“凸”和“更一般”的含义如果您正在尝试解决大型或具有挑战性的线性或凸二次优化问题(尤其是具有离散分量的问题),那么很难击败主要商业解决方案,gurobicplexDash< /a> 除非钱对你来说是个大问题。 它们都具有干净的 JNI 接口,并且可在大多数主要平台上使用。

coin-or 项目有几个优化器,并且有一个 JNI 接口项目。 它是完全免费的(EPL 许可证),但需要更多的设置工作并且可能不会给你同样的性能。

A good answer is dependent on what you mean by "convex" and "more general" If you are trying to solve large or challenging linear or convex-quadratic optimization problems (especially with a discrete component to them), then it's hard to beat the main commercial solvers, gurobi, cplex and Dash unless money is a big issue for you. They all have clean JNI interfaces and are available on most major platforms.

The coin-or project has several optimizers and have a project for JNI interface. It is totally free (EPL license), but will take more work to set-up and probably not give you the same performance.

燕归巢 2024-07-13 19:11:54

有一个名为 lpsolve 的线性优化工具。 它是用 C 编写的(我认为),但附带了 Java/JNI 包装器(API 不是很 OO,但它可以完成工作)。 它非常容易使用,去年我已经让它在实时系统中运行得非常愉快和稳定。

There is a linear optimization tool called lpsolve. It's written in C (I think) but comes with a Java/JNI wrapper (API is not very OO but it does the job). It's pretty easy to use and I have had it running quite happily and stably in a live system for the last year.

番薯 2024-07-13 19:11:54

您可以尝试JOptimizer,开源的,适合一般凸优化问题(线性规划、二次规划、qcqp、锥规划) 、半定规划等

You may try JOptimizer, open source and suitable for general convex optimization problems (linear programming, quadratic programming, qcqp, cone programming, semidefinite programming, ect

默嘫て 2024-07-13 19:11:54

OptaPlanner(Java,开源,ASL)可以处理大型问题,并且没有约束类型限制(例如线性与凸形)。

OptaPlanner (Java, open source, ASL) can handle large problems and doesn't have an constraint type limitations (such as linear vs convex).

爱你是孤单的心事 2024-07-13 19:11:54

你可能想看看 JScience,它看起来很完整。 (数学结构、线性代数求解等)

You may want to look at JScience, it looks pretty complete. (Mathematical structures, linear algebra solving, etc.)

橘虞初梦 2024-07-13 19:11:54

IPOPT 有一个 Java 接口。 您还可以针对 Java 调整 APMonitor 建模语言。 我开发了这个平台,所以如果有人想创建一个新的 Java 接口,我会很高兴与他们合作。 它已经有一个 Python API 和 MATLAB 接口,并包括 IPOPT、APOPT 等求解器、BPOPT 以及其他可以处理大型系统的方法。

IPOPT has an interface for Java. You may also be able to adapt the APMonitor modeling language for Java. I develop this platform so I'll be glad to work with someone if they'd like to create a new interface to Java. It already has a Python API and MATLAB interface and includes solvers such as IPOPT, APOPT, BPOPT, and others that can handle large-scale systems.

挽清梦 2024-07-13 19:11:54

查看 AMPL。 基本版本是免费的,但解决更大的问题需要花钱。 您无需为语言付费; 您为求解器付费。 还可以上传您的代码并让它在他们的服务器上运行。

Look into AMPL. The basic edition is free, but it costs money for larger problems. You don't pay for the language; you pay for solvers. It is also possible to upload your code and have it run on their servers.

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