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

Extend a ConstraintProvider (with ConstraintConfiguration)

Open ge0ffrey opened this issue 2 years ago • 0 comments

Presume you have the following ConstraintProviders:

  • AnimalConstraintProvider with 40 constraints.
  • CatConstraintProvider with 200 declared constraints, extends AnimalConstraintProvider for 240 effective constraints.
  • DogConstraintProvider with 300 declared constraints, extends AnimalConstraintProvider for 340 effective constraints.

Now, presume your model has a ConstraintConfiguration. It could be an instance of a CatConstraintConfiguration or a DogConstraintConfiguration. But the field is of type AnimalConstraintConfiguration (an abstract class). Can we make that work?

What about ConstraintVerifier tests?

ge0ffrey avatar Sep 28 '23 08:09 ge0ffrey