Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
    • Task Scheduling
  • Platform
Try models
  • Field Service Routing
  • Real-time planning
  • Real-time planning: focused replanning

Field Service Routing

    • Introduction
    • Getting started: Hello world
    • User guide
      • Terminology
      • Use case guide
      • Scheduling API concepts
      • Integration
      • Constraints
      • Using the API
        • Using the OpenAPI spec
        • API tooling
      • Demo datasets
      • Input datasets
        • Model configuration
        • Model input
        • Planning window
        • Time zones and daylight-saving time (DST)
      • Routing with Timefold’s maps service
      • Input validation
      • Model response
      • Output datasets
        • Metadata
        • Model output
        • Input metrics
        • Key performance indicators (KPIs)
      • Key performance indicators (KPIs)
      • Metrics and optimization goals
      • Score analysis
      • Visualizations
    • Vehicle resource constraints
      • Shift hours and overtime
      • Lunch breaks and personal appointments
      • Fairness
      • Route optimization
      • Technician costs
      • Technician ratings
      • Coverage area
    • Visit service constraints
      • Time windows and opening hours
      • Skills
      • Visit dependencies
      • Multi-vehicle visits
      • Multi-day schedules and movable visits
      • Priority visits and optional visits
      • Visit service level agreement (SLA)
      • Duration added for first visit on location
      • Visit profit
      • Visit requirements and tags
        • Visit requirements
        • Tags
    • Manual intervention
    • Recommendations
      • Visit time window recommendations
      • Visit group time window recommendations
      • Bulk time window recommendations
    • Real-time planning
      • Real-time planning: extended visit
      • Real-time planning: reassignment
      • Real-time planning: emergency visit
      • Real-time planning: focused replanning
      • Real-time planning: no show
      • Real-time planning: technician ill
      • Real-time planning: pinning visits
      • Real-time planning: minimizing disruption on replanning
      • Real-time planning: actual arrival and departure times
    • Scenarios
      • Configuring labor law compliance
      • Ferry connections
      • Long-running visits
    • Changelog
    • Upgrade to the latest version
    • Feature requests

Real-time planning: focused replanning

There are many situations where Real-time planning is necessary.

When planning is already over-constrained, ie, all shifts are at full capacity and many visits remain unassigned, adding important visits that must be assigned is challenging.

By default, the initial phase of solving tries to assign every unassigned visit, including lower-priority visits that a previous planning run left unassigned. Attempting to place these lower-priority visits takes a substantial amount of time and leaves less time for more promising optimizations.

To overcome this, you can specify which visits Timefold should focus on during replanning with the replanningFocus field:

{
  "modelInput": {
    "replanningFocus": {
      "visitIds": [
        "Visit A",
        "Visit B"
      ]
    }
  }
}

Timefold considers the visits listed in replanningFocus as candidates to be swapped with already assigned, but less important, visits. Visits that don’t match the replanning focus are not considered during the initial phase, which saves time.

In order for visits included in visitIds to be scheduled during replanning, their assignment must result in a better score than the current assignment they are swapped for. Giving the visits a higher priority or an earlier SLA will increase the impact they have on the score.

visitIds must contain at least one visit ID, and each ID must be unique.

Next

  • See the full API spec or try the online API.

  • Learn more about field service routing from our YouTube playlist.

  • Learn about real-time planning.

  • Real-time planning with pinned visits.

  • Real-time planning and emergency visits.

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