Timefold quickstarts
Get started with Timefold quickstarts here. Optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling and other planning problems.
This repository contains quickstarts for [Timefold Solver](https://github.com/TimefoldAI/timefold-solver), an AI constraint solver for Java and Kotlin. It shows different use cases and basic implementations to get you started on your PlanningAI journey. The project is written primarily in Java, distributed under the Apache License 2.0 license, first published in 2023. Key topics include: artificial-intelligence, constraint-programming, cvrp, employee-scheduling, gradle.
This repository contains quickstarts for Timefold Solver, an AI constraint solver for Java and Kotlin.
It shows different use cases and basic implementations to get you started on your PlanningAI journey.
Overview
| Use Case | Notable Solver Concepts |
|---|---|
| ๐ <a href="#-vehicle-routing">Vehicle Routing</a> | Chained Through Time, Shadow Variables |
| ๐งโ๐ผ <a href="#-employee-scheduling">Employee Scheduling</a> | Load Balancing |
| ๐ ๏ธ <a href="#-maintenance-scheduling">Maintenance Scheduling</a> | TimeGrain, Shadow Variable, Variable Listener |
| ๐ฆ <a href="#-food-packaging">Food Packaging</a> | Mixed Model, Shadow Variables, Pinning |
| ๐ <a href="#-order-picking">Order Picking</a> | Chained Planning Variable, Shadow Variables |
| ๐ซ <a href="#-school-timetabling">School Timetabling</a> | Timeslot |
| ๐ญ <a href="#-facility-location-problem">Facility Location Problem</a> | Shadow Variable |
| ๐ค <a href="#-conference-scheduling">Conference Scheduling</a> | Timeslot, Justifications |
| ๐๏ธ <a href="#-bed-allocation-scheduling">Bed Allocation Scheduling</a> | Allows Unassigned |
| ๐ซ <a href="#-flight-crew-scheduling">Flight Crew Scheduling</a> | |
| ๐ฅ <a href="#-meeting-scheduling">Meeting Scheduling</a> | TimeGrain |
| โ <a href="#-task-assigning">Task Assigning</a> | Bendable Score, Chained Through Time, Allows Unassigned |
| ๐ <a href="#-project-job-scheduling">Project Job Scheduling</a> | Shadow Variables, Variable Listener, Strenght Comparator |
| ๐ <a href="#-sports-league-scheduling">Sports League Scheduling</a> | Consecutive Sequences |
| ๐ <a href="#-tournament-scheduling">Tournament Scheduling</a> | Pinning, Load Balancing |
[!NOTE]
The implementations in this repository serve as a starting point and/or inspiration when creating your own application.
Timefold Solver is a library and does not include a UI. To illustrate these use cases a rudimentary UI is included in these quickstarts.
Use cases
๐ Vehicle Routing
Find the most efficient routes for vehicles to reach visits, considering vehicle capacity and time windows when visits are available. Sometimes also called "CVRPTW".

- View constraints
- Run quarkus-vehicle-routing (Java, Maven, Quarkus)
[!TIP]
<img src="https://docs.timefold.ai/_/img/models/field-service-routing.svg" align="right" width="50px" /> Check out our off-the-shelf model for Field Service Routing. This model goes beyond basic Vehicle Routing and supports additional constraints such as priorities, skills, fairness and more.
๐งโ๐ผ Employee Scheduling
Schedule shifts to employees, accounting for employee availability and shift skill requirements.

- View constraints
- Run quarkus-employee-scheduling (Java, Maven, Quarkus)
[!TIP]
<img src="https://docs.timefold.ai/_/img/models/employee-shift-scheduling.svg" align="right" width="50px" /> Check out our off-the-shelf model for Employee Shift Scheduling. This model supports many additional constraints such as skills, pairing employees, fairness and more.
๐ ๏ธ Maintenance Scheduling
Schedule maintenance jobs to crews over time to reduce both premature and overdue maintenance.

- View constraints
- Run quarkus-maintenance-scheduling (Java, Maven, Quarkus)
๐ฆ Food Packaging
Schedule food packaging orders to manufacturing lines to minimize downtime and fulfill all orders on time.

- View constraints
- Run quarkus-food-packaging (Java, Maven, Quarkus)
๐ Order Picking
Generate an optimal picking plan for completing a set of orders.

- View constraints
- Run quarkus-order-picking (Java, Maven, Quarkus)
๐ซ School Timetabling
Assign lessons to timeslots and rooms to produce a better schedule for teachers and students.

- View constraints
- Run quarkus-school-timetabling (Java, Maven or Gradle, Quarkus)
- Run spring-boot-integration (Java, Maven or Gradle, Spring Boot)
- Run kotlin-quarkus-school-timetabling (Kotlin, Maven, Quarkus)
Without a UI:
- Run hello-world-school-timetabling (Java, Maven or Gradle)
๐ญ Facility Location Problem
Pick the best geographical locations for new stores, distribution centers, COVID test centers, or telecom masts.

- View constraints
- Run quarkus-facility-location (Java, Maven, Quarkus)
๐ค Conference Scheduling
Assign conference talks to timeslots and rooms to produce a better schedule for speakers.

- View constraints
- Run quarkus-conference-scheduling (Java, Maven, Quarkus)
๐๏ธ Bed Allocation Scheduling
Assign beds to patient stays to produce a better schedule for hospitals.

- View constraints
- Run quarkus-bed-allocation-scheduling (Java, Maven, Quarkus)
๐ซ Flight Crew Scheduling
Assign crew to flights to produce a better schedule for flight assignments.

- View constraints
- Run quarkus-flight-crew-scheduling (Java, Maven, Quarkus)
๐ฅ Meeting Scheduling
Assign timeslots and rooms for meetings to produce a better schedule.

- View constraints
- Run quarkus-meeting-scheduling (Java, Maven, Quarkus)
โ Task Assigning
Assign employees to tasks to produce a better plan for task assignments.

- View constraints
- Run quarkus-task-assigning (Java, Maven, Quarkus)
๐ Project Job Scheduling
Assign jobs for execution to produce a better schedule for project job allocations.

- View constraints
- Run quarkus-project-job-scheduling (Java, Maven, Quarkus)
๐ Sports League Scheduling
Assign rounds to matches to produce a better schedule for league matches.

- View constraints
- Run quarkus-sports-league-scheduling (Java, Maven, Quarkus)
๐ Tournament Scheduling
Tournament Scheduling service assigning teams to tournament matches.

- View constraints
- Run quarkus-tournament-scheduling (Java, Maven, Quarkus)
Legal notice
Timefold Quickstarts was forked on 20 April 2023 from OptaPlanner Quickstarts, which was entirely Apache-2.0 licensed (a permissive license).
Timefold Quickstarts is a derivative work of OptaPlanner Quickstarts, which includes copyrights of the original creator, Red Hat Inc., affiliates, and contributors, that were all entirely licensed under the Apache-2.0 license.
Every source file has been modified.
Contributors
Showing top 12 contributors by commit count.
