Replies: 3 comments 2 replies
-
Thanks for the feedback, @jmuletpol! You are right that this is a shortcoming of the current implementation of pinning. While we would love to have more granular ways of pinning like you describe, it is not currently on the roadmap. |
Beta Was this translation helpful? Give feedback.
-
I have the same question, is there an alternative way of modeling this behavior? See also this post: https://stackoverflow.com/questions/78073693/timefold-ai-partial-pinning Referring to @jmuletpol answer is it enough to have a provider and a planning variable in the same planning entity without giving any id? |
Beta Was this translation helpful? Give feedback.
-
I would love that. I have worked around it, but I had a scenario where I absolutely wanted to do this, pin the start time of a task, but have the employee list open for planning. I just have a heavy constraint around the time so that it is pressed to where I want it to go. |
Beta Was this translation helpful? Give feedback.
-
Timefold 1.6.x has currently two ways to pin a planning entity, that is to say, using the
@PinningVariable
annotation to a boolean member or creating a pinning filter for the PlanningEntity.If the PlanningEntity has two or more planning variables, e.g. period and room, all variables will be pinned. It would be nice to have the possibility to specify which planning variables to pin. For instance, to pin the period variable and leave the room variable movable.
At the moment, the only way I have found to implement such a behavior is to set the
@ValueRangeProvider
inside the Entity class instead of in the PlanningSolution class. There, I modify the collection returned by the@ValueRangeProvider
depending on the type of pinning I am interested in. Possibly, not the best approach.Beta Was this translation helpful? Give feedback.
All reactions