|
| 1 | +<p align="center"> |
| 2 | + <a href="https://timefold.ai"> |
| 3 | + <img src="/timefold-logo.png" width="400px" alt="Timefold Solver" /> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +[](https://github.com/TimefoldAI/timefold-solver/discussions) |
| 8 | + |
| 9 | +This repository contains quickstarts for [Timefold Solver](https://github.com/TimefoldAI/timefold-solver), an AI constraint solver for Java, Python, and Kotlin. |
| 10 | +It shows different use cases and basic implementations to get you started on your PlanningAI journey. |
| 11 | + |
| 12 | +## Overview |
| 13 | + |
| 14 | +| Use Case <img width="341" height="1"> | Notable Solver Concepts <img width="541" height="1"> | |
| 15 | +|-----------------------------------------------------------------------|----------------------------------------------------------| |
| 16 | +| 🚚 <a href="#-vehicle-routing">Vehicle Routing</a> | Chained Through Time, Shadow Variables | |
| 17 | +| 🧑💼 <a href="#-employee-scheduling">Employee Scheduling</a> | Load Balancing | |
| 18 | +| 🛠️ <a href="#-maintenance-scheduling">Maintenance Scheduling</a> | TimeGrain, Shadow Variable, Variable Listener | |
| 19 | +| 📦 <a href="#-food-packaging">Food Packaging</a> | Chained Through Time, Shadow Variables, Pinning | |
| 20 | +| 🛒 <a href="#-order-picking">Order Picking</a> | Chained Planning Variable, Shadow Variables | |
| 21 | +| 🏫 <a href="#-school-timetabling">School Timetabling</a> | Timeslot | |
| 22 | +| 🏭 <a href="#-facility-location-problem">Facility Location Problem</a> | Shadow Variable | |
| 23 | +| 🎤 <a href="#-conference-scheduling">Conference Scheduling</a> | Timeslot, Justifications | |
| 24 | +| 🛏️ <a href="#-bed-allocation-scheduling">Bed Allocation Scheduling</a> | Allows Unassigned | |
| 25 | +| 🛫 <a href="#-flight-crew-scheduling">Flight Crew Scheduling</a> | | |
| 26 | +| 👥 <a href="#-meeting-scheduling">Meeting Scheduling</a> | TimeGrain | |
| 27 | +| ✅ <a href="#-task-assigning">Task Assigning</a> | Bendable Score, Chained Through Time, Allows Unassigned | |
| 28 | +| 📆 <a href="#-project-job-scheduling">Project Job Scheduling</a> | Shadow Variables, Variable Listener, Strenght Comparator | |
| 29 | +| 🏆 <a href="#-sports-league-scheduling">Sports League Scheduling</a> | Consecutive Sequences | |
| 30 | +| 🏅 <a href="#-tournament-scheduling">Tournament Scheduling</a> | Pinning, Load Balancing | |
| 31 | + |
| 32 | +> [!IMPORTANT] |
| 33 | +> The implementations in this repository are not production ready. |
| 34 | +> They serve as a starting point and/or inspiration when creating your own application. |
| 35 | +> Timefold Solver is a library and does not include a UI. To illustrate these use cases a rudimentary UI is included in these quickstarts. |
| 36 | +
|
| 37 | +## Use cases |
| 38 | + |
| 39 | +### 🚚 Vehicle Routing |
| 40 | + |
| 41 | +Find the most efficient routes for vehicles to reach visits, considering vehicle capacity and time windows when visits are available. Sometimes also called "CVRPTW". |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +- [Run quarkus-vehicle-routing](java/vehicle-routing/README.MD) (Java, Maven, Quarkus) |
| 46 | +- [Run python-vehicle-routing](python/vehicle-routing/README.MD) (Python, FastAPI) |
| 47 | + |
| 48 | +> [!TIP] |
| 49 | +> <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](https://app.timefold.ai/models/field-service-routing). This model goes beyond basic Vehicle Routing and supports additional constraints such as priorities, skills, fairness and more. |
| 50 | +
|
| 51 | +--- |
| 52 | + |
| 53 | +### 🧑💼 Employee Scheduling |
| 54 | + |
| 55 | +Schedule shifts to employees, accounting for employee availability and shift skill requirements. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +- [Run quarkus-employee-scheduling](java/employee-scheduling/README.MD) (Java, Maven, Quarkus) |
| 60 | +- [Run python-employee-scheduling](python/employee-scheduling/README.MD) (Python, FastAPI) |
| 61 | + |
| 62 | +> [!TIP] |
| 63 | +> <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](https://app.timefold.ai/models/employee-scheduling). This model supports many additional constraints such as skills, pairing employees, fairness and more. |
| 64 | +
|
| 65 | +--- |
| 66 | + |
| 67 | +### 🛠️ Maintenance Scheduling |
| 68 | + |
| 69 | +Schedule maintenance jobs to crews over time to reduce both premature and overdue maintenance. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +- [Run quarkus-maintenance-scheduling](java/maintenance-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +### 📦 Food Packaging |
| 78 | + |
| 79 | +Schedule food packaging orders to manufacturing lines to minimize downtime and fulfill all orders on time. |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +- [Run quarkus-food-packaging](java/food-packaging/README.adoc) (Java, Maven, Quarkus) |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +### 🛒 Order Picking |
| 88 | + |
| 89 | +Generate an optimal picking plan for completing a set of orders. |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +- [Run quarkus-order-picking](java/order-picking/README.adoc) (Java, Maven, Quarkus) |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +### 🏫 School Timetabling |
| 98 | + |
| 99 | +Assign lessons to timeslots and rooms to produce a better schedule for teachers and students. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +- [Run quarkus-school-timetabling](java/school-timetabling/README.adoc) (Java, Maven or Gradle, Quarkus) |
| 104 | +- [Run spring-boot-school-timetabling](java/spring-boot-integration/README.adoc) (Java, Maven or Gradle, Spring Boot) |
| 105 | +- [Run kotlin-quarkus-school-timetabling](kotlin/school-timetabling/README.adoc) (Kotlin, Maven, Quarkus) |
| 106 | +- [Run python-school-timetabling](python/school-timetabling/README.adoc) (Python, FastAPI) |
| 107 | + |
| 108 | +Without a UI: |
| 109 | + |
| 110 | +- [Run hello-world-school-timetabling](java/hello-world/README.adoc) (Java, Maven or Gradle) |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +### 🏭 Facility Location Problem |
| 115 | + |
| 116 | +Pick the best geographical locations for new stores, distribution centers, COVID test centers, or telecom masts. |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +- [Run quarkus-facility-location](java/facility-location/README.adoc) (Java, Maven, Quarkus) |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +### 🎤 Conference Scheduling |
| 125 | + |
| 126 | +Assign conference talks to timeslots and rooms to produce a better schedule for speakers. |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | +- [Run quarkus-conference-scheduling](java/conference-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +### 🛏️ Bed Allocation Scheduling |
| 135 | + |
| 136 | +Assign beds to patient stays to produce a better schedule for hospitals. |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +- [Run quarkus-bed-allocation-scheduling](java/bed-allocation/README.adoc) (Java, Maven, Quarkus) |
| 141 | + |
| 142 | +--- |
| 143 | + |
| 144 | +### 🛫 Flight Crew Scheduling |
| 145 | + |
| 146 | +Assign crew to flights to produce a better schedule for flight assignments. |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | +- [Run quarkus-flight-crew-scheduling](java/flight-crew-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 151 | +- [Run python-flight-crew-scheduling](python/flight-crew-scheduling/README.adoc) (Python, FastAPI) |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +### 👥 Meeting Scheduling |
| 156 | + |
| 157 | +Assign timeslots and rooms for meetings to produce a better schedule. |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | +- [Run quarkus-meeting-scheduling](java/meeting-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 162 | + |
| 163 | +--- |
| 164 | + |
| 165 | +### ✅ Task Assigning |
| 166 | + |
| 167 | +Assign employees to tasks to produce a better plan for task assignments. |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | +- [Run quarkus-task-assigning](java/task-assigning/README.adoc) (Java, Maven, Quarkus) |
| 172 | + |
| 173 | +--- |
| 174 | + |
| 175 | +### 📆 Project Job Scheduling |
| 176 | + |
| 177 | +Assign jobs for execution to produce a better schedule for project job allocations. |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | +- [Run quarkus-project-job-scheduling](java/project-job-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 182 | + |
| 183 | +--- |
| 184 | + |
| 185 | +### 🏆 Sports League Scheduling |
| 186 | + |
| 187 | +Assign rounds to matches to produce a better schedule for league matches. |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | +- [Run quarkus-sports-league-scheduling](java/sports-league-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 192 | +- [Run python-sports-league-scheduling](python/sports-league-scheduling/README.adoc) (Python, FastAPI) |
| 193 | + |
| 194 | +--- |
| 195 | + |
| 196 | +### 🏅 Tournament Scheduling |
| 197 | + |
| 198 | +Tournament Scheduling service assigning teams to tournament matches. |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | +- [Run quarkus-tournament-scheduling](java/tournament-scheduling/README.adoc) (Java, Maven, Quarkus) |
| 203 | +- [Run python-tournament-scheduling](python/tournament-scheduling/README.adoc) (Python, FastAPI) |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +## Legal notice |
| 208 | + |
| 209 | +Timefold Quickstarts was [forked](https://timefold.ai/blog/2023/optaplanner-fork/) on 20 April 2023 from OptaPlanner Quickstarts, which was entirely Apache-2.0 licensed (a permissive license). |
| 210 | + |
| 211 | +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. |
| 212 | +Every source file has been modified. |
0 commit comments