Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
  • Platform
Try models
  • Field Service Routing
  • User guide
  • Model configuration

Field Service Routing

    • Introduction
    • Planning AI concepts
    • Metrics and optimization goals
    • Getting started with field service routing
    • Understanding the API
    • User guide
      • User guide
      • Terms
      • Constraints
      • Planning window
      • Model configuration
      • Configuration overrides
      • Time zones and daylight-saving time (DST)
      • Routing with Timefold’s maps service
      • Validation
      • Model response
      • Key performance indicators (KPIs)
    • Vehicle resource constraints
      • Vehicle resource constraints
      • Shift hours and overtime
      • Lunch breaks and personal appointments
      • Fairness
      • Route optimization
      • Technician coverage area
      • Technician costs
      • Technician ratings
    • Visit service constraints
      • Visit service constraints
      • Time windows and opening hours
      • Skills
      • Visit dependencies
      • Visit requirements
      • Multi-vehicle visits
      • Movable visits and multi-day schedules
      • Priority visits and optional visits
      • Visit service level agreement (SLA)
    • Recommendations
      • Recommendations
      • Visit time window recommendations
      • Visit group time window recommendations
    • Real-time planning
      • Real-time planning
      • Real-time planning: extended visit
      • Real-time planning: reassignment
      • Real-time planning: emergency visit
      • Real-time planning: no show
      • Real-time planning: technician ill
      • Real-time planning: pinning visits
    • Scenarios
      • Long-running visits
    • Changelog
    • Upgrade to the latest version
    • Feature requests

Model configuration

1. Model request

The model request is the top-level object of the Field Service Routing API. It contains the configuration of the model and the dataset to optimize.

Id Required Format Description

modelInput

true

object

The modelInput is the dataset to optimize.

config

false

object

Configuration of the model and its run.

2. Configuration

The configuration object contains parameters influencing the optimization process.

Id Required Format Description

model

false

object

Configuration of the model, e.g. its constraints weights.

run

false

object

Configuration of the requested model run, e.g. its termination.

3. Run configuration

Id Required Format Description

name

false

string

Optional model run name. If omitted, a default name is generated.

termination

false

object

Model run termination configuration.

maxThreadCount

false

number

The maximum number of threads to be used for solving, must be greater than or equal to 1. The default is 1. The maximum allowed value for this model is 4.

4. Termination configuration

Id Required Format Description

spentLimit

false

string (ISO 8601 duration)

Maximum duration (e.g. PT1H) to keep the solver running.

unimprovedSpentLimit

false

string (ISO 8601 duration)

Maximum unimproved score duration. If the score has not improved during this period (e.g. PT5M), terminate the solver.

Warning: using this option will disable the default diminished returns termination which is recommended for most use cases.

Diminished returns terminates the solver early if expected improvements are minimal, saving on CPU costs. This termination is desirable since it terminates based on the relative rate of improvement, and behaves similarly on different hardware and different problem instances. You can find more details in the documentation.
  • © 2025 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default