I'm looking for a java framework, which is suitable for optimization tasks. In best case it's realized with Java 8. I know there are better languages for optimization tasks, but currently I'm restricted to Java.

It should do:

public class OptimizationProblem {

    // Given: Any function, which returns a value for a combination of A and B.
    public int value (A a, B b);
    List<A> as;
    List<B> bs;

    // This function should be part of the framework
    // It should map each A to one B (if both are of same length), so that the value
    // in sum is max (not an easy task, at all).
    Map<A, B> map = findBestCombinations (as, bs, OptimizationProblem::value);

I expect the framework to handle minimization and maximization problems. It does not have to find the "optimal" solution to given problems. If it's not possible to find the solution in an adequate time, it's allowed to return a "good" solution.

  • 3
    "other useful methods like that" is a little generic. Could you please edit your question and explicitly state your (must-have / nice-to-have) requirements? That most likely improves your chances to good answers significantly, as often "keywords trigger things" in readers' minds :)
    – Izzy
    Commented Jul 15, 2014 at 9:46

1 Answer 1


Since I'm looking for a Java library for quadratic programming (Solve small quadratic programming problem with inequality constraints in Java or C/C++), I've come across some items. I think this general question about optimization packages for Java will be useful to others, so here are my notes about some items I looked at. These should be understood as relating only to the version of the software at the present time (September 2018). This list is non-exhaustive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.