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

`compareToGiven(Facts...).penalizesMore(String?)` in constraint verifier

Open triceo opened this issue 1 year ago • 0 comments

ConstraintVerifier should support compareToGiven(Facts...).penalizesMore(String?)

Example usage:

constraintVerifier.verifyThat(MyConstraintProvider::fairnessConstraint)
    .given(Shift(Amy), Shift(Amy), Shift(Beth), Shift(Beth))
    .compareToGiven(Shift(Amy), Shift(Beth), Shift(Beth), Shift(Beth))
    .penalizesLess();

Originally posted by @Christopher-Chianelli in https://github.com/TimefoldAI/timefold-solver/pull/918#discussion_r1664306923

triceo avatar Jul 08 '24 05:07 triceo