-
Bug
-
Resolution: Done
-
Critical
-
7.12.1.GA
type casting exception in OptaPlanner 7.x tests which uses drl
Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap')
The rule is:
rule "periodSpread" when $constraintConfiguration : ExaminationConstraintConfiguration() $topicConflict : TopicConflict($leftTopic : leftTopic, $rightTopic : rightTopic) $leftExam : Exam(topic == $leftTopic, $leftPeriodIndex : periodIndex, period != null) $rightExam : Exam(topic == $rightTopic, period != null, Math.abs($leftPeriodIndex - periodIndex) < ($constraintConfiguration.getPeriodSpreadLength() + 1)) then scoreHolder.penalize(kcontext, $topicConflict.getStudentSize()); end
The problematic string is here : Math.abs($leftPeriodIndex - periodIndex) < ($constraintConfiguration.getPeriodSpreadLength() + 1))
Problem fixed on mvel
https://github.com/mvel/mvel/commit/33405a17ae203d91c29e87da0e89c117f566d7ce
Hotfix for OptaPlanner
https://github.com/kiegroup/optaplanner/pull/1756
PR: https://github.com/kiegroup/optaplanner/commit/14b0af321c2f05992e36a56aaa5c7455e24e6856
- clones
-
PLANNER-2618 Regression in ExaminationPerformanceTest
- Resolved