Replies: 1 comment 9 replies
-
Hi! I think Timefold should be a good fit for your problem. For the hard constraint, you could introduce a shadow variable that keeps track on if a meeting is blocked by another meeting of higher priority. You then could check for this value when deciding whether you have a hard constraint violation or not. I'm not sure that this would be the computationally most efficient way, but it's an idea. Maybe someone from the Timefold team has a better idea here :) Another note: Is the number of priorities really arbitrary here in reality? How many meetings do you schedule? Could it be an acceptable simplification to limit the number of priorities to something that can be modelled with a bendable score? |
Beta Was this translation helpful? Give feedback.
-
Hey all, I'm fairly new to Timefold, and I was wondering if my use case is a good fit for it.
I have a use case where I need to deconflict a bunch of meetings for a client. meaning I would receive many meetings and I would need to produce a finalized meeting plan for the client. These meetings are very simple PlanningEntities with a vlauerange of PossibleIntervals for when the meeting can happen and a priority value. The @PlanningVariable would simply select one of these intervals.
I would be using an over-constrained problem with a HardMediumSoftScore, where the hard constraint ensures that no assigned meetings overlap. The medium constraint penalizes unassigned meetings as a factor of their priority.
However, this isn't quite the behavior I'm looking for. The priority on the meeting shouldn't be outscored additively by multiple lower-priority meetings. As my constraint works right now, a meeting with a priority of 2 could potentially be left unassigned if it overlaps with two or more meetings with a priority of 1. Ideally, the priority should work more like distinct tiers, where priority 2 should always outweigh any number of priority 1 meetings.
I looked into using BendableScore, but it seemed suitable only if I had a fixed number of priority tiers (e.g., six). In my case, the priority could theoretically range from 1 to any large number, so that solution didn't seem viable.
I've been struggling to think of an approach that would solve this. I tried a hard constraint that penalizes cases where a lower-priority meeting is scheduled while a higher-priority meeting is left unassigned. However, that approach failed in a scenario like the following:
We have three meetings: e1 (highest priority), e2 (second highest), and e3 (lowest priority).
e1 overlaps with e2, and e2 overlaps with e3.
Ideally, e1 should be scheduled over e2 because it has a higher priority. Similarly, e3 should be scheduled over e2, because e2 is blocked by something with an even higher priority, despite e3 having a lower priority than e2.
This situation is where I get stuck. I'm not sure if my use case is poorly suited for Timefold because the priority is more like a tiered system that shouldn't be volatile to penalties from lower-priority meetings. Alternatively, it could be that my use case is a good fit and I'm missing a key concept that would help me solve this problem.
Please feel free to ask for clarification if something doesn't make sense. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions