tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Update optaplanner example

Open dupliaka opened this issue 3 years ago • 1 comments

Moved to 8.24.0.Final version Removed deprecated drools calculation Added constraints stream solver Updated to solver config java api

dupliaka avatar Jul 08 '22 14:07 dupliaka

@dupliaka The CI fails because the optaplanner tutorial can no longer be built using Java 8 (because OptaPlanner 8.24 is being built with Java 11).

To fix that, go to the root pom.xml and move two <module>optaplanner</module> elements from default-first and integration-lite-first profiles to default-jdk9-and-above and integration-jdk9-and-above profiles.

See https://github.com/eugenp/tutorials#profile-based-segregation for explanation of the profiles.

@yurloc Thank you for noticing! Fixed

dupliaka avatar Jul 12 '22 07:07 dupliaka

Thank you for your contribution @dupliaka and @yurloc. PR is merged and article is now updated.

dkapil avatar Aug 18 '22 04:08 dkapil

Thank you very much! I have notice that there is no mention on ConstraintStream that is provided in test_whenConstraintStreamSolver. It is a major difference since the previous version and it would be much more consistent to mention it in the blog as well. You can mention in Scoring section telling simply that there is a better way to define constraints in the lambda function way that allows to cash results and calculate score faster. To do so you just need to define one class (see CourseScheduleConstraintProvider.java)

dupliaka avatar Aug 19 '22 05:08 dupliaka

Thanks @dupliaka . We have opened an internal jira to look into this further.

dkapil avatar Aug 19 '22 07:08 dkapil

Thanks @dupliaka . We have opened an internal jira to look into this further.

Great! Thanks for collaboration feel free to reach me out if you would need some additional assistance.

dupliaka avatar Aug 19 '22 07:08 dupliaka