Skip to content

Duration Objective

Overview

The Duration Objective minimizes the total time spent on routes, including travel and service time. It's ideal for operations where driver hours or schedule adherence are more critical than total distance.


When to Use

  • Labor costs or driver working hours are the main priority.
  • You need to ensure tighter time schedules or meet strict service windows.
  • Urban or high-traffic areas where time matters more than mileage.

Behavior

  • Only the per_hour value is used to evaluate and optimize routes.
  • Distance cost (per_km) and fixed cost (fixed) are ignored.
  • If per_hour is not specified for a vehicle, a default value (e.g., 3600) is applied.

General Validation

  • per_hour must be ≥ 0 for all vehicles.
  • Time windows (time_window) are valid and overlap with job constraints.
  • Travel and service times are properly defined or can be computed.
  • Coordinates are valid and reachable.