Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
    • Task Scheduling
  • Platform
Start Free Trial
  • Field Service Routing
  • Feature guides
  • Visit service constraints
  • Duration added for first visit on location
  • 1.40.x
    • latest
    • 1.40.x
    • 1.39.x

Field Service Routing

  • The basics
    • 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)
      • Maps service
      • Input validation
      • Model response
      • Output datasets
        • Metadata
        • Model output
        • Input metrics
        • Key performance indicators (KPIs)
      • Explaining unassigned visits
      • Key performance indicators (KPIs)
      • Metrics and optimization goals
      • Score analysis
      • Visualizations
      • Efficiency X-Ray
  • Feature guides
    • Vehicle resource constraints
      • Shift hours and overtime
      • Lunch breaks and personal appointments
      • Capacity reservation
      • 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
    • Scenarios
      • Configuring labor law compliance
      • Ferry connections
      • Long-running visits
  • Responding to change
    • 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
  • More information
    • FAQs
      • Constraints and weights
      • Modeling your planning problem
      • Planning horizon and replanning
    • Changelog
    • Upgrade to the latest version
    • Feature requests
Ask Claude Ask ChatGPT

Duration added for first visit on location

In field service routing, technicians often need extra time when visiting a location for the first time in their shift. This overhead can include time to find parking, walk from the vehicle to the property entrance, or set up equipment before starting work.

When a technician visits the same location consecutively (for instance, performing two tasks at the same address), this overhead is only incurred once on the first visit. Subsequent visits at the same location do not need the extra setup time.

  • 1. Use case
  • 2. How it works
  • 3. Configuration
  • 4. Interaction with skill multipliers
  • 5. Interaction with visit groups
  • 6. Duration added between sub-locations

1. Use case

A utility company dispatches technicians to perform multiple tasks at apartment buildings. When a technician arrives at a building for the first time, they need to find parking, check in with the building manager, and carry equipment to the correct floor. This overhead typically adds 15 minutes to the first visit. However, if the same technician performs a second task at the same building immediately after, they are already on site and no additional overhead applies.

By configuring durationAddedForFirstVisitOnLocation, the model automatically accounts for this overhead. The solver is also incentivized to schedule multiple visits at the same location consecutively, because doing so avoids the extra overhead on subsequent visits at the same address.

2. How it works

When durationAddedForFirstVisitOnLocation is set, the model checks whether the location of the current visit differs from the location of the previous stop in the technician’s route (either the shift start location or the previous visit’s location).

  • If the technician is arriving at a new location (different from the previous stop), the overhead duration is added to the visit’s effectiveServiceDuration.

  • If the technician is already at the same location (e.g. the previous visit was at the same address), no extra time is added.

The overhead duration is applied per visit, not per location per day. This means that if a technician leaves a location and returns later in the route, the overhead is applied again on the second arrival.

3. Configuration

The durationAddedForFirstVisitOnLocation can be set at two levels:

  • Global default (on RoutePlanConfigOverrides): applies to all visits that do not specify their own value.

  • Per-visit override (on Visit): overrides the global default for a specific visit.

3.1. Setting a global default

To apply the overhead to all visits in the plan, set durationAddedForFirstVisitOnLocation in the model configuration:

{
  "configuration": {
    "modelConfig": {
      "overrides": {
        "durationAddedForFirstVisitOnLocation": "PT15M"
      }
    }
  },
  "modelInput": {
    "visits": [
      {
        "id": "Visit A",
        "location": [33.77301, -84.43838],
        "serviceDuration": "PT1H"
      },
      {
        "id": "Visit B",
        "location": [33.77301, -84.43838],
        "serviceDuration": "PT1H"
      },
      {
        "id": "Visit C",
        "location": [33.78767, -84.43887],
        "serviceDuration": "PT1H"
      }
    ]
  }
}

In this example, Visit A and Visit B are at the same location. If the solver assigns them consecutively to the same technician:

  • Visit A (first arrival at the location): effectiveServiceDuration = 1 hour + 15 minutes = 1 hour 15 minutes.

  • Visit B (already at the same location): effectiveServiceDuration = 1 hour (no overhead added).

  • Visit C (different location): effectiveServiceDuration = 1 hour + 15 minutes = 1 hour 15 minutes.

3.2. Overriding per visit

To use a different overhead duration for a specific visit, or to disable it for a specific visit, set durationAddedForFirstVisitOnLocation directly on the visit:

{
  "modelInput": {
    "visits": [
      {
        "id": "Visit A",
        "location": [33.77301, -84.43838],
        "serviceDuration": "PT1H",
        "durationAddedForFirstVisitOnLocation": "PT30M"
      },
      {
        "id": "Visit B",
        "location": [33.78767, -84.43887],
        "serviceDuration": "PT1H",
        "durationAddedForFirstVisitOnLocation": "PT0M"
      }
    ]
  }
}
  • Visit A uses a 30-minute overhead, regardless of any global default.

  • Visit B has no overhead (explicitly disabled for this visit).

If a visit does not specify durationAddedForFirstVisitOnLocation and no global default is set, no overhead is applied to that visit.

4. Interaction with skill multipliers

The durationAddedForFirstVisitOnLocation duration is added after the skill multiplier is applied to the base serviceDuration. This means the overhead is always added in full, regardless of the technician’s proficiency.

For example, if a technician has a skill multiplier of 2.0 (working at half speed), and a visit has a serviceDuration of 1 hour with durationAddedForFirstVisitOnLocation of 15 minutes:

  • effectiveServiceDuration = (1 hour × 2.0) + 15 minutes = 2 hours 15 minutes.

5. Interaction with visit groups

When visits are part of a visit group, durationAddedForFirstVisitOnLocation is evaluated independently for each technician’s assigned group member. Each technician checks whether their preceding stop was at the same location as the group member they are assigned to.

This means:

  • If both technicians arrive at the location for the first time, both get the overhead.

  • If one technician has a preceding visit at the same location, only the other technician gets the overhead.

6. Duration added between sub-locations

Some locations contain several sub-locations that share the same coordinates, such as apartments in one building. When a technician moves from one apartment to another inside the same building, there is no parking overhead, but walking, taking the elevator, or using the stairs still takes time.

To model this internal travel, set subLocationId on each visit, for example the apartment number, and configure durationAddedBetweenSubLocations. The model adds durationAddedBetweenSubLocations to the visit’s effectiveServiceDuration only when all of the following are true:

  • The previous visit in the technician’s route is at the same location.

  • Both the visit and the previous visit have a subLocationId.

  • The two subLocationId values are different.

In the following scenarios, the model does not add durationAddedBetweenSubLocations:

  • The technician arrives from a different location (or from the shift start location). Only durationAddedForFirstVisitOnLocation applies, even though this is also the first visit at the sub-location. Include the time to reach the sub-location in durationAddedForFirstVisitOnLocation.

  • The previous visit is at the same sub-location: the technician is already there.

  • The visit or the previous visit has no subLocationId: the model cannot tell whether the technician moved.

The two durations never apply to the same visit.

Like durationAddedForFirstVisitOnLocation, durationAddedBetweenSubLocations is applied per visit. If a technician moves from apartment 101 to apartment 102 and back to apartment 101, both moves get the overhead. The model uses the value of the visit the technician moves to.

durationAddedBetweenSubLocations can be set as a global default on RoutePlanConfigOverrides and overridden per visit. Set it to PT0M on a visit to disable it for that visit. In a visit group, the model evaluates each technician’s previous visit independently, in the same way as durationAddedForFirstVisitOnLocation.

{
  "configuration": {
    "modelConfig": {
      "overrides": {
        "durationAddedForFirstVisitOnLocation": "PT15M",
        "durationAddedBetweenSubLocations": "PT5M"
      }
    }
  },
  "modelInput": {
    "visits": [
      {
        "id": "Visit A",
        "location": [33.77301, -84.43838],
        "subLocationId": "Apartment 101",
        "serviceDuration": "PT1H"
      },
      {
        "id": "Visit B",
        "location": [33.77301, -84.43838],
        "subLocationId": "Apartment 101",
        "serviceDuration": "PT1H"
      },
      {
        "id": "Visit C",
        "location": [33.77301, -84.43838],
        "subLocationId": "Apartment 102",
        "serviceDuration": "PT1H"
      }
    ]
  }
}

If the solver assigns these visits consecutively to the same technician, and the technician arrives from a different location:

  • Visit A (first arrival at the building): effectiveServiceDuration = 1 hour + 15 minutes = 1 hour 15 minutes. Only durationAddedForFirstVisitOnLocation applies.

  • Visit B (same apartment): effectiveServiceDuration = 1 hour.

  • Visit C (different apartment in the same building): effectiveServiceDuration = 1 hour + 5 minutes = 1 hour 5 minutes.

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