Replies: 3 comments 2 replies
-
See the Timeslots in our Conference Scheduling example: Planning Solution contains only the @ProblemFactCollectionProperty The PlanningEntity contains the value range provider: Do take a second to read about the negative effects of placing the ValueRangeProvider annotation in the entity in case you haven't. https://docs.timefold.ai/timefold-solver/latest/using-timefold-solver/modeling-planning-problems#valueRangeProviderOnPlanningEntity. What you describe (availability) can also be handled using constraints, see our quickstart. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I will look at the example you indicated. |
Beta Was this translation helpful? Give feedback.
-
In the example, I understand that I still need to pass the full list of my ProblemFacts to the Solution as well as making sure that each Entity has its own filtered list, right? |
Beta Was this translation helpful? Give feedback.
-
I am trying to filter the available employees for each Shift (PlanningEntity) because there are many cases (vacation, illness, forced rest) for which an employee can never be assigned to a shift. To do this, as per the documentation , I put the list of in the shift (entity) to ensure that only the employees who are available for a given shift are returned. I do not want to accept solutions that use an unavailable employee. I can not understand where to make the ConstraintProvider take the list through the ProblemFactCollectionProperty annotation, in my opinion it should take it from the shift and not from the solution but the documentation says that it can only be inserted in the PlanningSolution.
Beta Was this translation helpful? Give feedback.
All reactions