简体   繁体   中英

Get all feasible solutions from the eventlistener

I am using optaplanner and using an event listener to get the results. The problem is there is only the getNewBestSolution() function. Is there any way to get all feasible solutions instead of getting always a better one?

I would like to get all the solutions scored with 10hard instead of only one solution with 10hard and then the solution with 20hard and miss all the solutions in between.

Thanks

It's not supported out of the box, but users have done it before by hacking BestSolutionRecaller.java .

The problem is that for 10 lessons and 20 timeslots, there are 20^10 possible solutions, too many too process or care about. An improvement on that is Pareto optimization, which only keeps solutions that aren't dominated by other solutions, but it too suffers from too many solutions when scaling out: it makes it the user's problem to pick the best solution, but how can a user pick the best solution out of thousands? It typically doesn't work in real world business scenarios.

Constraint weight parameterization through @ConstraintWeight (which we do support) is typically a far better alternative to give the user the ability to pick the solution he/she is looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM