Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
    • Task Scheduling
  • Platform
Try models
  • Timefold Solver SNAPSHOT
  • Introduction
  • Edit this Page

Timefold Solver SNAPSHOT

    • Introduction
    • Getting started
      • Overview
      • Build as a service
      • Embed as a library
        • Hello World guide
        • Quarkus guide
        • Spring Boot guide
    • Domain modeling
      • Guide
      • Building blocks
      • Common patterns
    • Constraints and score
      • Overview
      • Score calculation
      • Understanding the score
      • Load balancing and fairness
      • Performance tips and tricks
    • Running the Solver
      • Overview
      • As a service
        • REST API
        • Model Enrichment
        • Constraint weights
        • Demo data
        • Exposing metrics
      • As a library
        • Configuring Timefold Solver
        • Constraint weights
        • Quarkus integration
        • Spring Boot integration
        • JPA/JAXB/JSON integration
    • Diagnosing the Solver
      • Benchmarking
      • Solver diagnostics
    • Optimization algorithms
      • Overview
      • Construction heuristics
      • Local search
      • Exhaustive search
      • Custom moves
        • Neighborhoods API
        • Move Selector reference
    • Responding to change
      • Continuous planning
      • Real-time planning
      • Non-disruptive replanning
      • Assignment Recommendation API
    • Example use cases
      • Vehicle routing (guide)
      • More examples on GitHub
    • FAQ
    • New and noteworthy
    • Upgrading Timefold Solver
      • Upgrading Timefold Solver: Overview
      • Upgrade from Timefold Solver 1.x to 2.x
      • Upgrading from OptaPlanner
      • Backwards compatibility
      • Migration guides
        • Variable Listeners to Custom Shadow Variables
        • Chained planning variable to planning list variable
    • Commercial editions
      • Overview
      • Installation
      • Performance improvements
      • Score analysis
      • Recommendation API
      • Nearby selection
      • Multithreaded solving
      • Partitioned search
      • Constraint profiling
      • Multistage moves
      • Throttling best solution events

Introduction

Every organization faces planning problems: providing products or services with a limited set of constrained resources (employees, assets, time, and money). Timefold Solver is a lightweight, embeddable constraint satisfaction engine that optimizes these problems to do more business with fewer resources.

This documentation provides guidance on using our open-source solver to build custom models from scratch. For common planning problems, we also offer ready-made models that can be seamlessly integrated via our REST API.

Explore our documentation and available models here

useCaseOverview
Figure 1. Timefold Solver’s use cases include vehicle routing, employee scheduling, rostering, bin packing, and equipment scheduling.

1. Planning problems

A planning problem arises from a need to achieve a goal by organizing available resources under a set of constraints:

  • Building a house, where workers and materials are the resources, and construction order and site hours are the constraints.

  • Staffing a hospital shift, where qualified personnel are the resources, and working hour rules and required specializations are the constraints.

  • Routing delivery vehicles, where vehicles and drivers are the resources, and time windows, capacity, and distance are the constraints.

Planning problems grow combinatorially as resources and constraints are added. Even a small field service problem with 4 vehicles and 8 visits produces over 19 million possible assignments for a brute-force algorithm to consider. Timefold Solver evaluates this space efficiently, finding good solutions in a fraction of the time it would take to do manually.

2. Constraints

Constraints can be classified as hard, medium, or soft:

  • Hard constraints are rules that must not be broken — for example, an employee can only be in one place at a time, or dependent tasks must complete in order. Violating a hard constraint produces an infeasible plan.

  • Medium constraints apply when resources are scarce — for instance, assign as many customer visits as possible when there aren’t enough technicians to cover all of them.

  • Soft constraints express business preferences — minimize travel time, assign employees to preferred shifts, and similar goals.

Solutions are scored to reflect how well they satisfy these constraints. For example: 0hard/-257medium/-6119520soft. A solution with zero hard constraint violations is always considered better than one that breaks even a single hard constraint, regardless of the soft score.

3. Technology

Timefold Solver is 100% pure JavaTM and runs on Java 21 or higher, on any JVM platform. It integrates natively with Quarkus and Spring Boot, and supports Kotlin.

You can use it to build an optimization service, or embed it into your software as a library.

Next

  • Follow the Quickstart to tackle your first planning problem.

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