我打算使用 Apache Commons Math 库中提供的 Simplex 方法来解决以下线性规划问题。我没有让它工作,我发现 API 文档有限。
问题
从向量 开始s0,确定s,解:
| min f' * s
| s
|
| s.t. s_l <= s <= s_u
其中f是一个向量,s_l分别s_u是 的下界和上界s。
我可以在 Matlab 中使用该命令轻松解决这个问题,linprog(f, [], [], [], [], s_l, s_u, s0, options)并希望在 Java 中做同样的事情,最好使用 Apache Commons Math。
单纯形求解器
我尝试使用SimplexSolver类似于此处解释的 Apache Commons Math:http:
//google-opensource.blogspot.se/2009/06/introducing-apache-commons-math.html
但是我无法缝合来定义我的界限s_l,s_u并且我必须使用这种方法来提供LinearConstraint(我没有)。
你应该能够做到吗?