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

Timefold Solver SNAPSHOT

    • Introduction
    • PlanningAI concepts
    • Getting started
      • Overview
      • Hello World Quick Start Guide
      • Quarkus Quick Start Guide
      • Spring Boot Quick Start Guide
      • Vehicle Routing Quick Start Guide
    • Using Timefold Solver
      • Using Timefold Solver: Overview
      • Configuring Timefold Solver
      • Modeling planning problems
      • Running Timefold Solver
      • Benchmarking and tweaking
      • Building a service (Preview)
        • REST API
        • Service Model and Enricher
        • Constraint weights (optional)
        • Demo data (optional)
        • Exposing metrics (optional)
    • Constraints and score
      • Constraints and Score: Overview
      • Score calculation
      • Understanding the score
      • Adjusting constraints at runtime
      • Load balancing and fairness
      • Performance tips and tricks
    • Optimization algorithms
      • Optimization Algorithms: Overview
      • Construction heuristics
      • Local search
      • Exhaustive search
      • Neighborhoods: A new way to define custom moves
      • Move Selector reference
    • Responding to change
    • Integration
    • Design patterns
    • 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
    • Plus/Enterprise Editions
      • Installation
      • Performance improvements
      • Score analysis
      • Recommendation API
      • Nearby selection
      • Multithreaded solving
      • Partitioned search
      • Constraint profiling
      • Multistage moves
      • Throttling best solution events

Overview

This documentation covers our Open Source solver to build a model from scratch. We also provide off-the-shelf models to solve common planning problems. These can be found here.

Timefold Solver can be used in two ways. Pick the approach that best fits your architecture:

Embed as a library

Add the solver as a dependency and wire it into your application however you like. Use Spring Boot, Quarkus…​ or no framework at all.

Run as a service (Preview)

Deploy a fully isolated optimization service. This oppinionated approach reduces the amount of boilerplate code needed to get to a running application.

Table 1. Comparison
Embed as a library Run as a service

Best for

Embedding the solver into an existing application

Running optimization as a standalone, isolated service

Ease of use

Requires manual wiring: you manage configuration, lifecycle, and integration

Minimal setup: the framework handles REST endpoints and lifecycle for you

Integration

You control how the solver is wired into your application. Integrations for Spring Boot and Quarkus available.

Opinionated, ready-to-run service built on Quarkus

Flexibility

Use any framework or no framework at all

Constrained by design, the service only runs optimization

Status

Stable

Preview

Embed as a library

The library approach gives you the solver core as a dependency. You integrate it into your application however you see fit. There are no constraints on your application framework or architecture.

The following getting started guides demonstrate the library approach:

  • Hello World

    • The simplest starting point. Build a plain Java or Kotlin application with no additional framework.

  • Quarkus

    • Build a REST application with Java or Kotlin on top of Quarkus, a popular Java platform that supports native compilation.

  • Spring Boot

    • Build a REST application with Java or Kotlin on top of Spring Boot, a popular Java platform that supports native compilation.

All three guides optimize a school timetable for students and teachers:

schoolTimetablingInputOutput
The timefold-quickstarts repository contains the source code for all these guides.

For additional use cases using the library approach, take a look at the timefold-quickstarts GitHub repository.

Run as a service (Preview)

The service approach is currently in preview. It is the recommended path going forward, but the API may still change before it reaches general availability.

The service approach takes an opinionated stance: it builds a fully independent optimization service on top of Quarkus. The service has a single responsibility, running optimization, and exposes it over a well-defined API. You do not need to manage solver lifecycle, thread pools, or result handling yourself.

This approach is the right choice when you want to:

  • Decouple optimization from the rest of your application

  • Scale the optimization service independently

  • Adopt a clean service boundary without boilerplate

To get started with the service approach, see Getting started: building a service.

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