Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
    • Task Scheduling
  • Platform
Start Free Trial
  • Employee Shift Scheduling
  • More information
  • FAQs
  • Modeling your planning problem
  • latest
    • latest
    • 1.38.x
    • 1.37.x

Employee Shift Scheduling

  • The basics
    • Introduction
    • Getting started: Hello world
    • Lessons overview
      • Lesson 1
      • Lesson 2
      • Lesson 3
      • Lesson 4
      • Interlude 1: Basic demo data
      • Lesson 5
      • Lesson 6
      • Lesson 7
    • User guide
      • Terminology
      • Use case guide
      • Scheduling API concepts
      • Integration
      • Constraints
      • Using the API
        • Using the OpenAPI spec
        • API tooling
      • Demo datasets
      • Input datasets
        • Model configuration
        • Model input
        • Planning window
      • Planning window
      • Time zones and Daylight Saving Time (DST)
      • Tags and tag types
      • Input validation
      • Output datasets
        • Metadata
        • Model output
        • Input metrics
        • Key performance indicators (KPIs)
      • Metrics and optimization goals
      • Score analysis
      • Visualization
      • Efficiency X-Ray
      • Assignability analysis
  • Feature guides
    • Employee resource constraints
      • Employee availability and preferences
        • Employee availability
        • Employee preferences
      • Employee contracts
      • Employee priority
      • Pairing employees
      • Employee groups
      • Shift travel and locations
      • Shift Breaks
      • Employee activation
      • Work limits
        • Minutes worked per period
        • Minutes worked in a rolling window
        • Minutes logged per period
        • Days worked per period
        • Days worked in a rolling window
        • Consecutive days worked
        • Shifts worked per period
        • Shifts worked in a rolling window
        • Weekend minutes worked per period
        • Weekends worked per period
        • Weekends worked in a rolling window
        • Consecutive weekends worked
        • Consecutive shifts worked
      • Time off
        • Days off per period
        • Consecutive days off per period
        • Consecutive days off in a rolling window
        • Consecutive minutes off in a rolling window
        • Shifts to avoid close to day off requests
        • Consecutive weekends off per period
      • Shift rotations and patterns
        • Shift rotations
        • Single day shift sequence patterns
        • Minimize gaps between shifts
        • Multi-day shift sequence patterns
        • Daily shift pairings
        • Overlapping shifts
        • Shift start times differences
        • Minutes between shifts
      • Shift type diversity
        • Shift tag types
        • Shift types worked per period
        • Unique tags per employee per period
      • Fairness
        • Balance time worked
        • Balance shift count
    • Shift service constraints
      • Alternative shifts
      • Cost management
        • Cost groups
        • Employee rates
      • Demand-based scheduling
      • Priority and optional shifts
      • Skills and risk factors
      • Shift assignments
        • Shift selection
        • Employee selection
    • Scenarios
      • Configuring labor law compliance
      • Configuring employee well-being
      • Self-rostering and optimization
  • Responding to change
    • Manual intervention
    • Recommendations
    • Real-time planning
  • More information
    • FAQs
      • Constraints and weights
      • Modeling your planning problem
      • Planning horizon and replanning
    • Changelog
    • Upgrade to the latest version
    • Feature requests
Ask Claude Ask ChatGPT

Modeling your planning problem

Answers to common questions about modeling your planning problem in the Employee Shift Scheduling model.

  • Which model fits my planning problem?
  • Should I plan my whole operation in one dataset or split it up?
  • Which rules belong in the model, and which can I handle in my own system?
  • What happens to work that doesn’t fit in the plan?
  • How do shift priorities work?
  • How do I use my own employees before contractors or agency staff?
  • How do I model skills, certifications, and departments?

Which model fits my planning problem?

Choose the model based on what you assign, and whether travel between locations is part of the work.

Model Use it when Typical use cases

Field Service Routing

People travel between locations during their shift, and the order of their visits matters.

Field service, home care, and facility maintenance

Pick-up and Delivery Routing

Drivers pick up people or goods at one location and take them to another.

Non-emergency medical transportation, and courier and express delivery

Employee Shift Scheduling

Employees work shifts at a location, and you decide who works which shift.

Hospitals and healthcare, retail, security, and hospitality

Task Scheduling

Jobs run on machines, employees, or other resources, often with dependencies between jobs.

Discrete manufacturing, project scheduling, and single-site maintenance

If employees travel between several locations during a shift, and the route or the order of visits matters, use the Field Service Routing model. The Employee Shift Scheduling model calculates straight-line distances between locations and doesn’t plan routes.

The Task Scheduling model has Preview maturity, so backward-incompatible changes can still be introduced.

If your planning problem matches more than one model, contact us to discuss which one fits best.

For more information, see the model catalog.

Should I plan my whole operation in one dataset or split it up?

Split your operation into separate datasets when its parts don’t share resources or work. Keep the parts in one dataset when they do.

For instance, if each branch has its own employees and its own work, solve one dataset per branch. Smaller datasets solve faster, and a problem in one branch’s data doesn’t affect the others.

If some resources, for instance employees, vehicles, or machines, work for more than one branch, keep those branches in one dataset. The model can then decide where the shared resources are needed most. When you split them, each dataset is planned without knowing about the others, which usually leads to a worse plan overall.

If you need different kinds of plans, for instance shift schedules and routes, use a separate model for each. Solve them in order, and use the output of one plan to prepare the input for the next. For instance, use the shifts from your shift schedule as the vehicle shifts when you plan routes.

Which rules belong in the model, and which can I handle in my own system?

Include a rule in the model when it can make one plan better than another. When a rule doesn’t change which plan is best, handle it in your own system, before you submit the dataset or after the model returns the plan.

For instance:

  • Leave work out of the dataset when it can’t be done yet, for instance a job that’s waiting for parts or materials. Add it to a later dataset when it’s ready.

  • Handle steps that only depend on the finished plan in your own system, for instance creating work orders or notifying customers.

Some work can’t be expressed with the model’s features. Leave that work out of the dataset, and show it in your planning tool so planners can schedule it manually. If that work takes up a resource’s time, make sure the dataset shows the resource as unavailable for that time, so the model plans around it.

What happens to work that doesn’t fit in the plan?

The Employee Shift Scheduling model leaves it unassigned. Unassigned work appears in the output dataset and in the dataset’s metrics, so you can see what wasn’t planned and decide what to do with it.

Work is left unassigned when assigning it would break a hard constraint, for instance when no available resource has the right skills, or when there isn’t enough capacity for all the work.

To control which work is assigned when there isn’t capacity for everything, give your work priorities. When not all work can be assigned, the model prefers higher-priority work. Depending on the model, you can also mark work as optional. Optional work is treated as a soft constraint and assignments will be balanced against other soft constraints.

You can send more work than fits in the planning period. For instance, send a month of maintenance work when you plan two weeks, and give work that must happen soon a higher priority. The model assigns the urgent work, fills the gaps with lower priority work where possible, and leaves the rest unassigned. The unassigned work can be included in the next dataset.

To find out why a specific piece of work wasn’t assigned, use score analysis.

How do shift priorities work?

Give each shift a priority to control which shifts are assigned when there aren’t enough employees for all of them. There are ten built-in priorities, from 1 (highest) to 10 (lowest).

To set how much each priority counts, and whether shifts with that priority are mandatory or optional, add an unassignedShiftRule with priorityWeights to globalRules.

The penalties for unassigned shifts add up. For instance, with weights of 100 for priority 1 and 10 for priority 3, leaving one priority 1 shift unassigned counts as much as leaving ten priority 3 shifts unassigned.

  • Use large gaps between weights when higher-priority shifts should almost always be assigned first.

  • Use weights close together, for instance 1002, 1001, and 1000, when the model should assign as many shifts as possible and only use priority to choose between otherwise equal options.

For more information, see Priority and optional shifts.

How do I use my own employees before contractors or agency staff?

Put contractors and agency staff in an employee cost group with an employeeActivationCost. The Minimize activated employees soft constraint penalizes each activated employee by employeeActivationCost * (1 + shiftCount), where shiftCount counts shifts in the planning window matching the cost group’s activationShiftInclude setting. This encourages using your own employees first, but other soft constraints can outweigh that preference.

When the model does activate a contractor, the Maximize activated employee saturation constraint encourages it to give that contractor as many shifts as possible, instead of spreading shifts across more contractors.

To encourage a target ratio of activated employees between groups, use the Keep employee activation ratio soft constraint. This is a preference, not a guaranteed minimum share of permanent staff.

You can also give your own employees a higher employee priority or contract priority. Priority makes the model more likely to meet those employees' preferences and working-hour rules, for instance their minimum hours.

For more information, see Employee activation.

How do I model skills, certifications, and departments?

Add skills to employees, and add the skills each shift needs to the shift. Use requiredSkills for skills an employee must have, and preferredSkills for skills that are nice to have.

  • Certifications that expire: add validityDateTimeSpans to the employee’s skill, so the skill only counts while it’s valid.

  • Shifts that accept one of several skills: by default, an employee needs all the required skills. Change the skill matching strategy to match any of the skills instead.

  • Departments and locations: restrict who can work in a department with skills, or with shift tags. To limit how many departments an employee works in during a period, use unique tags per period.

  • Employees who must work together, for instance a trainee and a mentor: use required pairings.

For more information, see Skills and risk factors.

  • © 2026 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default