Log in to your Timefold account to give feedback

Feature Requests

Feature requests related to the Timefold Platform and Models. For feature requests for the Timefold Solver please go to Github Discussions
Several named time measures per shift, selectable per rule, with a period for balance rules
Context: in public transport one duty has several time measures that matter: spread (start to end), paid time, overtime, night time, driving time. Contracts, labour law and fairness rules each depend on a different one. Timefold offers one alternative measure per shift (loggedTime), and only contract period rules use it. Gap: Only one alternative measure per shift, so a contract can’t cap paid time while another rule uses a different measure. balanceTimeWorkedRules always balances shift duration, never loggedTime. balanceTimeWorkedRules balances over the whole planning window. With a four-week run, one driver can take all the overtime in week 1 and none in week 2 and still look balanced. rollingWindowRules support only minutesWorkedLimit. Request: Named time measures on the shift: "timeMeasures": { "paid": "PT420M", "overtime": "PT60M", "night": "PT0M" } A measure selector on every time-based rule (period rules, rolling-window rules, weekend rules, balance time worked), with shift duration as the default: { "id": "maxPaidPerDay", "period": "DAY", "minutesLoggedMax": 480, "timeMeasure": "paid" } A period on balanceTimeWorkedRules, using the same values as period rules (DAY, WEEK, MONTH, custom periods), so balancing happens within each period instead of only over the whole window: "balanceTimeWorkedRules": [ { "id": "fairPaidTimePerWeek", "timeMeasure": "paid", "period": "WEEK", "includeEmployeeTags": ["full-time"] } ] Historic values per measure for balance rules, following the employeeToPublishedMinutesWorked pattern, for continuous planning. Compatibility: loggedTime stays as an alias for a default measure, and a balance rule without period keeps today’s behaviour over the whole window, so existing models keep working. Use cases this unlocks: Paid-time limits: cap paid time per day and week, and cap spread separately (Italian nastro). Daily overtime fairness: balance the overtime measure. Weekly overtime fairness: balance paid time per WEEK, adjusted for FTE. Because contracted hours scale with FTE, evening out paid time per week evens out weekly overtime, with no separate overtime rule needed. Impact: this applies to every customer with time-based labour rules, which in public transport means almost all of them. We can calculate every measure per duty on our side. We only need the rules to point at them.
0
·
Employee Shift Scheduling
Dynamic “work stretch” period for shift start time difference rules (reset on days off)
Problem The shift start time difference rule (shiftStartTimeDifferenceInMinutesMax) only works over fixed periods (WEEK, MONTH, SCHEDULE, or custom named periods). For transit operators, start times only need to stay consistent within a run of consecutive working days. After a day off, the driver can switch to a different start time with no ill effect. A fixed period like WEEK doesn’t match this: It applies the limit across a day off, where it isn’t needed, which over-constrains the solver. It resets in the middle of a work stretch, where the limit is needed, which under-constrains it. This problem describe the issue for start time rule - but it can be any type of rule Example An employee is off on Tuesday this week and Wednesday next week. The desired behaviour is: Start times stay within X minutes of each other up to this Tuesday. Start times stay within X minutes of each other from this Wednesday to next Tuesday. Start times stay within X minutes of each other from next Wednesday on. Our current contract, for reference: { "id": "startTimeHomogeneityContract", "periodRules": [ { "id": "startTime_WEEK_0.5", "period": "WEEK", "excludeShiftTags": ["SPARE"], "shiftStartTimeDifferenceInMinutesMax": 30 }, { "id": "startTime_SCHEDULE_1", "period": "SCHEDULE", "excludeShiftTags": ["SPARE"], "shiftStartTimeDifferenceInMinutesMax": 60 } ] } Requested capability A new dynamic period type, for example period: "CONSECUTIVE_WORKING_DAYS". Its bounds would be calculated from the gaps between assigned shifts, not from calendar boundaries. The rule would reset whenever an employee has a day with no assigned shift. It should support: Static days off: days off provided in the input, such as unavailability or fixed weekly days off. Dynamic days off: days off that come from the solver’s own shift assignments while it respects the other rules. Optionally, a configurable minimum gap length, such as one day or more than 24 hours, to decide what counts as a break. Current workaround and why it falls short We can build named custom periods per employee around known days off. That only works for static days off. It also pushes period-building logic onto our side and makes the input larger and more fragile. It can’t work when the solver decides the days off. Impact Start-time consistency matters for driver wellbeing and is required for duty and roster quality. A work-stretch-based rule would remove the need for custom-period generation and allow more flexible rosters to be optimised in one pass.
0
·
Employee Shift Scheduling
Load More
→