79547998

Date: 2025-04-01 07:45:16
Score: 1
Natty:
Report link

You already made sure your model is consistent, as per your comment. Next thing you have to check is that your entities implements correctly hashCode() and equals(). In particular, as per Timefold documentation:

https://docs.timefold.ai/timefold-solver/latest/using-timefold-solver/modeling-planning-problems

Planning entity hashCode() implementations must remain constant. Therefore entity hashCode() must not depend on any planning variables. Pay special attention when using data structures with auto-generated hashCode() as entities, such as Kotlin data classes or Lombok’s @EqualsAndHashCode.

I struggled a lot with that until I read that statement in the documentation. I must say: not just hashCode(). Hope it helps.

Reasons:
  • Whitelisted phrase (-1): Hope it helps
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @EqualsAndHashCode
  • Low reputation (1):
Posted by: Emanuele Torrenti