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.