Replies: 2 comments 4 replies
-
Hey @makaimann, If I understand correctly, you can define a planning entity for the You can find inspiration for defining the capabilities and task requirements in the quick-start conference scheduling: https://github.com/TimefoldAI/timefold-quickstarts/tree/stable/java/conference-scheduling. Regarding the selection of "near" tasks, I'm not entirely clear on your use case. However, I would recommend creating a constraint that penalizes the "distance" between tasks for each robot. Implementing constraints that either reward or penalize solutions effectively aids the solver in exploring the solution space. One helpful feature for incrementally calculating the "distance" between tasks is called shadow variables. This approach allows you to update the distance value when updating the task list. The VRP quick-start will provide ideas on calculating distance and creating related constraints: https://github.com/TimefoldAI/timefold-quickstarts/tree/stable/java/vehicle-routing |
Beta Was this translation helpful? Give feedback.
-
Hey @zepfred, thanks for your quick response! This makes sense. Although my concern with list variables is that order matters in a list variable, so unless I do something about it there will be lots of moves that have no impact (ex: swapping two tasks in the list). Basically, I’m wanting a “PlanningSetVariable” (but completely understand there is not). Should I not be worried about that? And/or would you recommend configuring the moves to not include any that just permute order within one list? Furthermore, list variables assume each task is only assigned once — but there could be multiple robots assigned to the same task, so having a planning list variable per robot wouldn’t work in this case. Regarding nearness constraints — I already know how I’ll do that with a distance matrix and shadow variables if needed. I shouldn’t have even mentioned that because it distracts from my main question about assignments where order doesn’t matter. My mistake. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Timefold team, thanks for all your work on this awesome tool! I’m new to Timefold so let me know if this is the wrong place to ask a question like this.
I’m hoping to get some intuition on how to best encode a particular problem.
Problem
I have a robotics task assignment problem where robots can service multiple tasks if the tasks are near each other. However, I don’t actually care about the order. My goal is to get Timefold to cluster nearby tasks and assign teams of robots that have the right capabilities and meet some minimum number (some tasks may be collaborative).
This is actually a many-to-many relationship between robots and tasks but where order doesn’t matter. If we explicitly model clusters, then each task and robot only has a single cluster.
Ideas
At most there can be as many clusters as there are tasks. I had two main ideas:
PlanningEntity
)With these ideas there are a bunch of symmetries. For example, you can permute all the cluster integer identities, or swap entire lists without changing the meaning. My two main questions are the following:
I will definitely evaluate different encodings, but I’m curious how Timefold experts would approach this!
Beta Was this translation helpful? Give feedback.
All reactions