January 30, 2025
03:55
min

Optimize employee shift scheduling

Keep up with Timefold
Product updates, optimization insights, and stories from the builders behind PlanningAI.
Share

This video walks through the employee shift scheduling problem with a hospital example: assigning employees to shifts while respecting skills, contracts, availability and preferences. Organizations that automate their shift scheduling can accept more time-off requests afterwards, so work schedules fit their employees' lives better.

Every shift needs the right skill, and every employee has limits

The example has a 6 AM to 2 PM shift that requires an anesthetics skill and a 2 PM to 8 PM shift that requires cardiology. Amy King has both skills, but she can't take both shifts. Her contract caps how many hours she works per day.

Availability and preferences shape the schedule

Employees mark when they want to work, when they'd rather not, and when they can't work at all. Amy King wants to work on Saturday and prefers not to work on Thursday. Chad King took paid time off, so he isn't available on Monday.

Hard constraints first, then soft constraints

The solver starts from an infeasible schedule and improves it over time. Once the hard constraints reach zero, every employee has the right skill for their shifts, nobody works two shifts at once, and there are at least 10 hours between shifts so people can go home and rest.

From there, the solver optimizes the soft constraints. It assigns shifts people want and avoids the ones they don't. The final schedule in the video has one undesired assignment and far more desired ones.

Real schedules change after you publish them

Real rosters add many more constraints, from labor laws to employee requests. After a schedule goes out, employees call in sick and demand shifts. The plan has to absorb those changes.

Learn more

Related videos
April 16, 2026
02:41
min

Employee Shift Scheduling Priorities: How to Tell Your Scheduler Who Comes First

ESS
Optimization
Optimize the Vehicle Routing Problem (VRP)
January 30, 2025
03:59
min

Optimize the Vehicle Routing Problem (VRP)

FSR
Optimize employee shift scheduling
January 30, 2025
03:55
min

Optimize employee shift scheduling

ESS
Maintenance scheduling optimization
January 30, 2025
05:36
min

Maintenance scheduling optimization

FSR
VRP constraints: shift length, service time and lunch breaks
January 30, 2025
03:22
min

VRP constraints: shift length, service time and lunch breaks

FSR
Code the Capacitated Vehicle Routing Problem (CVRP) in Java
January 30, 2025

Code the Capacitated Vehicle Routing Problem (CVRP) in Java

FSR
Code the Vehicle Routing Problem with Time Windows (VRPTW) in Java
January 30, 2025

Code the Vehicle Routing Problem with Time Windows (VRPTW) in Java

Maximizing Factory Production Line Efficiency
January 30, 2025
06:49
min

Maximizing Factory Production Line Efficiency

Order fulfillment routing
January 30, 2025

Order fulfillment routing

January 30, 2025

Optimize the world for fun and profit By Geoffrey De Smet, Lukáš Petrovický

What do our employees say about Timefold Solver?
January 30, 2025

What do our employees say about Timefold Solver?

Unlocking the Power of Timefold: Community, Enterprise, Orbit
January 30, 2025

Unlocking the Power of Timefold: Community, Enterprise, Orbit

Master Employee Shift Scheduling with AI: A Technical Guide to Timefold Software
January 30, 2025

Master Employee Shift Scheduling with AI: A Technical Guide to Timefold Software

ESS
January 30, 2025

Mobile Workforce Planning AI - Dispatch field service technicians

Timefold Team Days (fall 2023)
January 30, 2025

Timefold Team Days (fall 2023)

Code automated maintenance scheduling in Java with Timefold
January 30, 2025

Code automated maintenance scheduling in Java with Timefold

Build an AI-powered scheduling app with Spring Boot and Timefold
January 30, 2025

Build an AI-powered scheduling app with Spring Boot and Timefold

Code planning automation AI in Kotlin Notebooks
January 30, 2025

Code planning automation AI in Kotlin Notebooks

Build an AI-powered scheduling app with Quarkus and Timefold
January 30, 2025

Build an AI-powered scheduling app with Quarkus and Timefold

Solve the Capacitated Vehicle Routing Problem (CVRP) in Kotlin
January 30, 2025

Solve the Capacitated Vehicle Routing Problem (CVRP) in Kotlin

FSR
January 30, 2025

Timefold Case Study - Ecoprogram Flotte

FSR
Timefold AMA March 19 2024
January 30, 2025

Timefold AMA March 19 2024

Time Windows for Vehicle Routing
January 30, 2025

Time Windows for Vehicle Routing

Quarkus Insights #162: What is Timefold AI?
January 30, 2025

Quarkus Insights #162: What is Timefold AI?

Shift hours and overtime for the Vehicle Routing Problem
January 30, 2025
03:48
min

Shift hours and overtime for the Vehicle Routing Problem

Upgrade from OptaPlanner to Timefold in less than 1 minute
January 30, 2025

Upgrade from OptaPlanner to Timefold in less than 1 minute

January 30, 2025

Field Service Routing - Dealing with Timezones and Daylight Saving Time

FSR
Employee Shift Scheduling AI in Python
January 30, 2025

Employee Shift Scheduling AI in Python

Task dependencies for vehicle routing
January 30, 2025

Task dependencies for vehicle routing

The secret formula for fair scheduling AI
January 30, 2025

The secret formula for fair scheduling AI

PlanningAI: Solving what GenAI can't
January 30, 2025

PlanningAI: Solving what GenAI can't

January 30, 2025

CEO interview: Inside Timefold’s €6M funding & PlanningAI platform launch

Inside PlanningAI: Geoffrey De Smet on revolutionizing planning optimization
January 30, 2025

Inside PlanningAI: Geoffrey De Smet on revolutionizing planning optimization

July 3, 2025

The past, present and future of Timefold Solver

February 16, 2026
05:20
min

How to solve a VRP with AI

Building Smarter Planning & Scheduling UIs with Timefold and Bryntum
February 17, 2026

Building Smarter Planning & Scheduling UIs with Timefold and Bryntum

April 10, 2026

Solve a Vehicle Routing Problem with AI

Employee Shift Scheduling: Skills and Risk Factors
April 13, 2026

Employee Shift Scheduling: Skills and Risk Factors

ESS
Employee Shift Scheduling: Time Off
April 13, 2026

Employee Shift Scheduling: Time Off

ESS
April 17, 2026

Employee Shift Scheduling Priorities: Who Comes First

ESS
April 20, 2026
01:57
min

Employee Shift Scheduling: Travel Time and Location Constraints

ESS
April 20, 2026

Employee Shift Scheduling: Mandatory vs Optional Shifts

ESS
Alternative Shifts Explained: One Job, Multiple Time Windows
April 20, 2026

Alternative Shifts Explained: One Job, Multiple Time Windows

When scheduling works, everything works.

Less waste. More control. Teams that trust the plan.