timefold-solver
timefold-solver copied to clipboard
Extend a ConstraintProvider (with ConstraintConfiguration)
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?