timefold-solver icon indicating copy to clipboard operation
timefold-solver copied to clipboard

matchWeigher overload that returns a Score, so matches can affect the score level of the penality/reward

Open ge0ffrey opened this issue 2 years ago • 0 comments

forEach(MyRule)
.join(Lesson, equal(MyRule.teacher, Lesson.teacher))
.filter(lesson.room == myRule.room)
.penalize((myRule, lesson) -> myRule.isHard() ? Score.ofHard(1) : Score.ofSoft(1))

ge0ffrey avatar Sep 22 '23 15:09 ge0ffrey