Reference guide
This section describes the Field Service Routing data model.
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. |
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. |
5. Model configuration
Id | Required | Format | Description |
---|---|---|---|
overrides |
false |
object |
Overrides of the default model configuration. |
6. Model configuration overrides
Contains weights of soft constraint and additional constraint parameters, influencing whether these constraints trigger and how much they impact the solution’s score.
Id | Format | Description | Example |
---|---|---|---|
number |
A weight of the Max last visit departure time (soft) constraint. |
|
|
number |
A weight of the Max shift end time (soft) constraint. |
|
|
number |
A weight of the Minimize travel distance constraint. |
|
|
number |
A weight of the Minimize travel time constraint. |
|
|
number |
A weight of the Minimize scheduling vehicles with unnecessary skill levels constraint. |
|
|
number |
A weight of the Minimize the visit completion risk constraint. |
|
|
number |
A weight of the Prefer scheduling optional visits constraint. |
|
|
number |
A weight of the Prefer visits scheduled to the earliest day constraint. |
|
|
string |
A minimal priority of a visit to consider it for the risk evaluation. |
|
|
string (ISO 8601 duration) |
A length of the time window between the visit departure time and the vehicle shift end. If a visit ends in this time window, its completion is considered risky. |
|
7. Model Input
Represents the dataset to optimize.
It is a container for all the data necessary for optimizing the route plan, as the table below summarizes.
Id | Required | Format | Description |
---|---|---|---|
vehicles |
true |
array |
An array of all vehicles including their vehicle shifts. |
visits |
true |
array |
An array of all visits that should be scheduled, excluding multi-vehicle visits (see visitGroups). |
freezeDeparturesBeforeTime |
false |
string (ISO 8601 date, time and time zone offset) |
The date and time with offset to UTC before which all vehicle shifts are considered pinned ("frozen"). In other words, every visit assigned to a vehicle shift which the shift already completed or started travelling to before the Usable for real-time planning scenario, such as re-submitting a plan that contains already assigned visits which must be pinned, such as in the following scenario: 1. The plan A is submitted to the solver, the solution for A contains assigned visits to shifts. 2. A few hours later, the solution for A is used as a base for an updated plan B adding new visits to be assigned after a (user-chosen) time T. 3. The plan B contains visits already planned (assigned during A's planning) to a time before T that need to be preserved, since they already happened. 4. When the plan B is submitted for solving, it needs to have the When omitted, no pinning/freeze is in effect. |
locationSetName |
false |
string |
The optional name of the set of all locations contained in this plan, used for referencing a pre-calculated location time/distance matrix to speed up processing. If specified, all locations in the model must be a subset of the referenced pre-calculated location set. If unspecified, a new time/distance matrix will be calculated for the request. |
planningWindow |
false |
object |
The planning window is the time interval to schedule for. If omitted, the planning window interval is derived as follows: - Example: - Example: |
false |
array |
An array of all skill names (string) used by vehicle shifts to define the skills provided and by visits to define the skills required. |
|
false |
array |
An array of all tags to match by a vehicle shift with a visit. |
|
travelTimeAdjustment |
false |
object |
An optional Travel Time Adjustment to compensate for longer travel times due to high traffic (multiplier) or difficult parking (extra constant time). |
false |
array |
An array of all visit groups that should be scheduled. A visit group defines a multi-vehicle visit, i.e. a visit that needs to be serviced by multiple vehicle shifts at the same time. |
8. Planning window
The planning windows specified a time range to plan for.
Id | Required | Format | Description | Example |
---|---|---|---|---|
true |
string (ISO 8601 date, time and time zone offset) |
An end date of the planning window (exclusive). |
|
|
true |
string (ISO 8601 date, time and time zone offset) |
A start date of the planning window (inclusive). |
|
9. Vehicle
The vehicle represents a single vehicle visiting customers across the planning window.
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the vehicle. |
|
shifts |
true |
array |
A non-empty array of all vehicle shifts planned for this vehicle. |
|
vehicleType |
false |
string |
A type of the vehicle. If omitted, |
|
10. Vehicle shift
Vehicle shift is an instance of a vehicle projected to a time interval in which the vehicle operates. In a multi-day field service routing, a vehicle shift a typically a single working day of the vehicle crew. After the optimization process, each vehicle shift contains an ordered list of visits.
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the vehicle shift. |
|
startLocation |
true |
array (latitude, longitude) |
A start location coordinates of the vehicle shift. |
|
false (one of |
string (ISO 8601 date, time and time zone offset) |
A minimum date and time when the vehicle shift is supposed to arrive to its first visit. The value of |
|
|
false (one of |
string (ISO 8601 date, time and time zone offset) |
A minimum date and time when the vehicle shift can start. The value of |
|
|
endLocation |
false |
array (latitude, longitude) |
An end location coordinates of the vehicle shift. If omitted, the |
|
itinerary |
false |
array |
An array of itinerary items ordered by their scheduled arrival or start. |
See input itinerary item. |
false |
string (ISO 8601 date, time and time zone offset) |
A maximal arrival time to the end location (hard). |
|
|
false |
string (ISO 8601 date, time and time zone offset) |
A maximal departure time from the last visit (hard). |
|
|
false |
string (ISO 8601 date, time and time zone offset) |
A maximal arrival time to the end location (soft). |
|
|
false |
string (ISO 8601 date, time and time zone offset) |
A maximal departure time from the last visit (soft). |
|
|
false |
string (ISO 8601 duration) |
A maximal travel time limit per visit (hard). |
|
|
false |
number |
Influences the ratio between movable and non-movable visits to assigned to this vehicle shift. |
|
|
requiredBreaks |
false |
array |
An array of required breaks. |
|
false |
array |
An array of skill definitions which this vehicle shift provides. |
|
|
false |
array |
An array of tag references. |
|
|
false |
array |
Skills that are applicable within specified time intervals only. |
|
|
false |
array |
Tags that are applicable within specified time intervals. |
|
11. Input itinerary item
Represents a visit or a break in the vehicle shift itinerary. Use to define already scheduled visits or breaks from previous planning.
Id | Format | Required | Description | Example |
---|---|---|---|---|
id |
string |
true |
A reference to a visit or a break. |
|
kind |
string |
true |
Indicates the kind of the itinerary item. Either |
|
12. Visit
A visit represents an individual service job at customer location. For every visit, you can define the following attributes.
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the visit. |
|
location |
true |
array (latitude, longitude) |
A location coordinates of the visit. |
|
true |
string (ISO 8601 duration) |
The estimated duration of the service. |
|
|
minStartTravelTime |
false |
string (ISO 8601 date, time and time zone offset) |
The minimum time when a shift can start travelling to this visit. When set, it can postpone visit’s Important: The value is set automatically during solving, the user must only preserve the value when re-submitting a plan that contains already assigned pinned visits. For example, consider the following scenario: 1. The plan A is submitted to the solver, the solution for A contains assigned visits to shifts, including visits' 2. A few hours later, the solution for A is used as a base for an updated plan B adding new visits to be assigned after a (user-chosen) time T. 3. The plan B contains visits already planned (assigned during A's planning) to a time before T that need to be preserved, since they already happened. 4. When the plan B is submitted for solving with the |
|
name |
false |
string |
A name of the visit. If omitted, the value of |
|
pinningRequested |
false |
boolean |
Determines if the user requested to pin this particular visit (the visit must already be assigned). Setting Useful when pinning needs to be extended beyond freezeDeparturesBeforeTime only for a particular visit or visits. |
|
priority |
false |
string |
Visit priority. |
|
false |
string (ISO 8601 duration) |
The adjustment of the serviceDuration. Can be negative. Deprecated, will be removed in the next version. |
|
|
false |
array |
The visit serviceDuration breakdown by individual trades (skills). The sum of durations for all skills specified here must not be greater than the value of serviceDuration. It can be less which allows for leaving a part of the job duration uncategorized - please note that the uncategorized part will not be adjusted by skill multipliers, but it will be added to the result (with multiplier 1.0). |
|
|
timeWindows |
false |
array |
An array of time windows defining the time intervals when this visit can be performed by a vehicle shift. Please note that visit’s individual time windows must not overlap. If omitted, a single time window with default values is assumed. |
|
false |
array |
An array of skill requirements for this visit. |
|
|
false |
array |
An array of tag references required by this visit. |
|
|
false |
array |
An array of vehicle references (ids) required by this visit. In other words, this visit can be assigned only to a shift of one of the specified vehicles. If empty, the visit can be assigned to a vehicle shift of any vehicle (default). |
|
|
false |
array |
An array of visit dependencies. |
|
13. Visit Group
A visit group represents a multi-vehicle visit, i.e. a group of individual service jobs that need to be performed at customer location at the same time.
13.1. Visit Group scenarios
A visit group may be used to model different scenarios:
-
Multiple vehicles need to perform a service job
S
at the same customer at the same time. We do not care about their skills, or they have the same set of skills - all we need is to synchronize multiple vehicles over a single customer visit. How to model:-
Create a visit for each part of the service job that needs to be assigned to a single vehicle.
-
Set the created visit’s
serviceDuration
to the duration of the original service jobS
. -
Create a visit group with either omitted, or the default
serviceDurationStrategy = INDIVIDUAL
, containing all the visits created in the previous step. -
By default, the assigned vehicles start the service job at the same time. However, you can set the
alignment
toEND
to make the vehicles depart at the same moment instead.
-
-
Multiple vehicles with different skills (e.g. an electrician and a carpenter) and skill proficiency levels need to perform a service job at the same customer at the same time. How to model:
-
Create a visit for each part of the service job that needs to be assigned to a single vehicle.
-
Set the created visit’s
serviceDuration
to the duration of the corresponding part of the original service job only. -
Create a visit group with
serviceDurationStrategy = INDIVIDUAL
containing all the visits created in the previous step.
-
-
Multiple vehicles with different skills (e.g. an electrician and a carpenter) need to perform a service job at the same customer at the same time, while the best skill proficiency (among all vehicles) determines the effective service duration of each visit in the group. How to model:
-
Create a visit for each part of the service job that needs to be assigned to a single vehicle.
-
Set the created visit’s
serviceDuration
to the duration of the corresponding part of the original service job only. -
Create a visit group with
serviceDurationStrategy = BEST_PROFICIENCY
containing all the visits created in the previous step.
-
For every visit group, you can define the following attributes.
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the visit group. |
|
alignment |
false |
string |
The alignment of the visits in the visit group: START: aligns visits to the same |
|
serviceDurationStrategy |
false |
string |
The strategy to calculate the service duration of the visits in this visit group: INDIVIDUAL: The service duration of each visit in the group is calculated independently based on the service proficiency modifiers for the assigned vehicle shift. When multiple service proficiency modifiers match the visit’s requirements, their average is used to adjust the service duration. (default) BEST_PROFICIENCY: The service duration of each visit in the group is calculated using the best service proficiency modifiers (separately for each tag) from all vehicle shifts assigned to the visits in the visit group. When multiple service proficiency modifiers match the requirements of a visit in the group, their average is used to adjust the visit’s service duration. |
|
visits |
false |
array |
An array of visits that form together the visit group. Important: In scenarios 2 and 3, the visits' In other words, consider a single-resource visit taking one hour. When it is converted to a multi-vehicle visit (a visit group) formed by e.g. two visits, each of them is expected to have a shorter |
|
14. Skills
Skills connect visits with the right vehicle shift. For instance, a visit may require a plumber skill, which limits the range of vehicle shifts that can pick up the visit.
14.1. Skill definition
A skill definition specifies the skill name, its level and a potential service duration multiplier for a vehicle shift.
Id | Required | Format | Description | Example |
---|---|---|---|---|
name |
true |
string |
A unique string identifier of the skill. Must be declared in the input top-level skills attribute. |
"plumber" |
false |
number |
A positive integer >= 1 defining the skill level (the higher, the better). The skill can be matched only to a skill requirement which has a lower or equal minLevel. The default value is |
10 |
|
false |
float |
A float visit service duration multiplier, the assigned visit’s service duration is multiplied with this The default value is null meaning this skill will not affect any service duration calculations (the value of 1.0 can still affect calculation of average duration of visits in a visit group). |
0.8 |
14.2. Skill requirement
A skill requirement specifies the skill name and the minimum skill level required from the vehicle shift assigned to this visit.
Id | Required | Format | Description | Example |
---|---|---|---|---|
name |
true |
string |
A unique string identifier of the skill. Must be declared in the input top-level skills attribute. |
"plumber" |
false |
number |
A positive integer >= 1 defining the required skill level (the higher, the better).
The default value is |
10 |
15. Tag
Tags connect visits with the right vehicle shift. For instance, a visit may require a vehicle shift for specific region, which limits the range of vehicle shifts that can pick up the visit.
Id | Required | Format | Description | Example |
---|---|---|---|---|
name |
true |
string |
A unique string identifier of the tag. |
"emergency" |
16. Visit time window
A visit time window represents a continuous time interval when a visit can be performed. See Time windows and opening hours section for additional details.
Id | Required | Format | Description | Example |
---|---|---|---|---|
false |
string (ISO 8601 date, time and time zone offset) |
A maximum end time of the visit (exclusive). If omitted, the planning window end date is assumed. |
|
|
false |
string (ISO 8601 date, time and time zone offset) |
A maximum start time of the visit (exclusive). If omitted, |
|
|
false |
string (ISO 8601 date, time and time zone offset) |
A minimum start time of the visit (inclusive). If omitted, the planning window start date is assumed. |
|
17. Visit dependency
A visit can declare a dependency on some other visit, specifying a minimal delay or additional conditions to hold between them.
The minimal delay can be specified either as a duration (minDelay
attribute) or as a reference to future point in time (minDelayTo
attribute).
The conditions can be specified using the coordination
attribute.
For example:
-
(
minDelay
) a technological break between two maintenance tasks needs to last at least 12 hours. -
(
minDelayTo
) a follow-up task can be performed no sooner than on the first day of the next week due to specific customer requirements. -
(
coordination
) a follow-up task must be serviced by the same vehicle (not the same vehicle shift).
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the visit dependency. |
|
precedingVisit |
true |
string |
A reference to the preceding visit that must be completed first. |
|
false |
string |
Additional coordination requirements between the two visits. Supported values: |
|
|
minDelay |
false |
string (ISO 8601 duration) |
A minimal delay between the two visits expressed as duration. Mutually exclusive with |
|
minDelayTo |
false |
object |
A minimal delay between the two visits expressed as a reference to future point in time. Mutually exclusive with |
|
18. Visit dependency minDelayTo
A reference to a future point in time when a dependent visit can start at the earliest.
Id | Required | Format | Description | Example |
---|---|---|---|---|
minStartDateAdjuster |
true |
string |
The name of the adjuster function for the date part of the delayed visit minimum start. The following functions are supported:
|
|
minStartDateAdjusterIncrement |
false |
integer |
The increment which determines how many times minStartDateAdjuster is applied. The default value is 1. |
|
minStartTime |
false (ISO 8601 local time) |
string |
The time part (ISO 8601 local datetime) of the delayed visit minimum start (inclusive).
The timezone offset is taken either from the source date time, or from the The default value is midnight (start of day): |
|
timezone |
false |
string |
The optional region-based TZDB identifier of the timezone which rules apply to the If omitted, the zone offset of the source date time (i.e. the visit dependency |
|
19. Required break
Represents a break during a vehicle shift.
The break can either be fixed (minStartTime
and maxStartTime
are equal) or floating (maxStartTime
is not given).
Optionally, the break can specify a location
, in which case the solver will try to minimize the travel time to the location of the break.
A fixed break delays the arrival time to the visit after the break by the duration of the break.
A floating break is scheduled towards the next visit and does not delay the arrival time, assuming the break is taken after the travel.
The visit’s effective start time is used to determine if the floating break should be applied.
Thus, in case of waiting between the arrival and the effective start time, the break is applied even before its minStartTime
.
Id | Required | Format | Description | Example |
---|---|---|---|---|
id |
true |
string |
A unique string identifier of the break. |
|
duration |
true |
string (ISO 8601 duration) |
A duration of the break. |
|
true |
string (ISO 8601 date, time and time zone offset) |
The earliest time to schedule the break at. |
|
|
false |
array (latitude, longitude) |
The location coordinates of the break |
|
|
maxEndTime |
false |
string (ISO 8601 date, time and time zone offset) |
The latest time the break should end at. |
|
maxStartTime |
false |
string (ISO 8601 date, time and time zone offset) |
The latest time to schedule the break at. |
|
20. Travel Time Adjustment
Travel time adjustment can be defined to implement a "buffer" allowing for unexpected traffic delays or long parking time when travelling.
The travel time adjustment is configured as a function for every route between any two locations as follows:
adjustedTravelTime = multiplier * mapTravelTime + extraTime
,
where:
-
mapTravelTime
is the travel time obtained from a map service, -
multiplier
andextraTime
are the travel time adjustment attributes described below.
Id | Required | Format | Description | Example |
---|---|---|---|---|
extraTime |
false |
string (ISO 8601 duration) |
The additional time to add to the original travel time obtained from a map service. Must be positive or zero duration. The default value is |
|
multiplier |
false |
float |
The coefficient to multiply the original travel time obtained from a map service with. Must be greater than zero (typically will be greater than The default value is |
|
21. Model response
The response to the model request is the optimized route plan, metadata about the model run, and key performance indicators (KPIs).
Id | Format | Description | Example |
---|---|---|---|
kpis |
object |
Overall KPIs of the vehicle route plan. |
See KPIs. |
modelOutput |
object |
The model output containing the optimized route plan. |
See model output. |
run |
object |
The model run metadata. |
See model run. |
22. Model run
Contains metadata about the model solving run.
Id | Format | Description | Example |
---|---|---|---|
id |
string |
Unique identifier of the solver run |
|
completeDateTime |
string (ISO 8601 date, time and time zone offset) |
The time solving the model request completed. |
|
name |
string |
Name of the solver run |
|
score |
string |
The current score of the route plan, as calculated by the solver. |
|
startDateTime |
string (ISO 8601 date, time and time zone offset) |
The time solving the model request started. |
|
solverStatus |
string (one of: "NOT_SOLVING", "SOLVING_SCHEDULED", "SOLVING_ACTIVE", "SOLVING_COMPLETED", "SOLVING_FAILED", "SOLVING_DISABLED") |
The status of the solver. |
|
submitDateTime |
string (ISO 8601 date, time and time zone offset) |
The time the model request was accepted. |
|
23. Model output
The model output is a counterpart to the model input and represents the optimized route plan. The model output contains only the assignments of visits to vehicle shifts and does not repeat the input data.
Id | Format | Description | Example |
---|---|---|---|
vehicles |
array |
The list of plans per vehicle. |
See vehicle plan. |
24. Vehicle plan
The vehicle plan groups plans for individual vehicle shifts of a single vehicle.
Id | Format | Description | Example |
---|---|---|---|
id |
String |
ID of the vehicle from the model input. |
See vehicle. |
shifts |
array |
The list of plans per vehicle shift. |
See vehicle shift plan. |
25. Vehicle shift plan
The vehicle shift plan contains the optimized route plan (itinerary) for a single vehicle shift, as well as metrics of the route plan.
Id | Format | Description | Example |
---|---|---|---|
id |
String |
ID of the vehicle shift from the model input. |
See vehicle shift. |
itinerary |
array |
An array of itinerary items ordered by their scheduled arrival or start. |
|
metrics |
object |
Metrics of the vehicle shift route. |
|
startTime |
string (ISO 8601 date, time and time zone offset) |
The planned start date and time of the vehicle shift. |
|
27. Output itinerary item (visit)
Represents a scheduled visit in the vehicle shift itinerary.
Id | Format | Description | Example |
---|---|---|---|
arrivalTime |
string (ISO 8601 date, time and time zone offset) |
The arrival time of the vehicle at the customer location. |
|
id |
string |
A reference to a visit. |
|
departureTime |
string (ISO 8601 date, time and time zone offset) |
The end of the service at the customer location. |
|
effectiveServiceDuration |
string (ISO 8601 duration) |
The effective duration of the service after applying the |
|
kind |
string |
Indicates the kind of the itinerary item. |
|
startServiceTime |
string (ISO 8601 date, time and time zone offset) |
The beginning of the service at the customer location. |
|
travelDistanceMetersFromPreviousStandstill |
integer |
The travel distance either from the previous visit or from the start location of the assigned vehicle shift. |
|
travelTimeFromPreviousStandstill |
string (ISO 8601 duration) |
The travel time either from the previous visit or from the start location of the assigned vehicle shift. |
|
28. Output itinerary item (break)
Represents a scheduled break in the vehicle shift itinerary.
Id | Format | Description | Example |
---|---|---|---|
id |
string |
A reference to a break. |
|
endTime |
string (ISO 8601 date, time and time zone offset) |
The end time of the scheduled break. |
|
kind |
string |
Indicates the kind of the itinerary item. |
|
startTime |
string (ISO 8601 date, time and time zone offset) |
The start time of the scheduled break. |
|
travelDistanceMetersFromPreviousStandstill |
integer |
The travel distance either from the previous visit or from the start location of the vehicle shift. Applies only to breaks with a location. |
|
travelTimeFromPreviousStandstill |
string (ISO 8601 duration) |
The travel time either from the previous visit or from the start location of the vehicle shift. Applies only to breaks with a location. |
|
29. Vehicle shift metrics
The vehicle shift metrics capture the performance of a single vehicle shift route plan.
Id | Format | Description | Example |
---|---|---|---|
endLocationArrivalTime |
string (ISO 8601 date, time and time zone offset) |
The arrival time of the vehicle shift at the endLocation. |
|
totalTravelDistanceMeters |
integer |
The total travel distance by the vehicle shift in meters. |
|
totalTravelTime |
string (ISO 8601 duration) |
The total travel time by the vehicle shift. |
|
travelDistanceBetweenVisitsMeters |
integer |
The total travel distance in meters between visits excluding the distances from the start location to the first visit and from the last visit to the end location. |
|
travelDistanceFromLastVisitToEndLocationMeters |
integer |
The travel distance from the last visit to the end location in meters. |
|
travelDistanceFromStartLocationToFirstVisitMeters |
integer |
The travel distance from the start location to the first visit in meters. |
|
travelTimeBetweenVisits |
string (ISO 8601 duration) |
The total travel time between visits excluding the travel time from the start location to the first visit and the travel time from the last visit to the end location. |
|
travelTimeFromLastVisitToEndLocation |
string (ISO 8601 duration) |
The travel time from the last visit to the end location. |
|
travelTimeFromStartLocationToFirstVisit |
string (ISO 8601 duration) |
The travel time from the start location to the first visit. |
|
30. Key performance indicators (KPIs)
The key performance indicators (KPIs) of the entire route plan. These top-level metrics provide an overview of the route plan quality.
Id | Format | Description | Example |
---|---|---|---|
totalTravelDistanceMeters |
integer |
The total travel distance by the vehicle shift in meters summed for all vehicle shifts. |
|
totalTravelTime |
string (ISO 8601 duration) |
The total travel time by all the vehicle shifts. |
|
totalUnassignedVisits |
number |
The total amount of visits that were not assigned in the route plan. |
|
travelDistanceBetweenVisitsMeters |
integer |
The total travel distance in meters between visits excluding the distances from the start location to the first visit and from the last visit to the end location, summed for all vehicle shifts. |
|
travelDistanceFromLastVisitToEndLocationMeters |
integer |
The travel distance from the last visit to the end location in meters summed for all vehicle shifts. |
|
travelDistanceFromStartLocationToFirstVisitMeters |
integer |
The travel distance from the start location to the first visit in meters summed for all vehicle shifts. |
|
travelTimeBetweenVisits |
string (ISO 8601 duration) |
The total travel time between visits excluding the travel time from the start location to the first visit and the travel time from the last visit to the end location, summed for all vehicle shifts. |
|
travelTimeFromLastVisitToEndLocation |
string (ISO 8601 duration) |
The travel time from the last visit to the end location summed for all vehicle shifts. |
|
travelTimeFromStartLocationToFirstVisit |
string (ISO 8601 duration) |
The travel time from the start location to the first visit summed for all vehicle shifts. |
|
31. Recommend Visit Time Windows API input
Description of Recommend Visit Time Windows API input.
Name | Required | Format | Description | Example |
---|---|---|---|---|
fitVisitId |
true |
string |
Identifier of the visit to get the time window recommendations for. The visit with given identifier needs
to be a part of the |
|
maxNumberOfRecommendationsPerTimeWindow |
true |
int |
Upper limit for a number of vehicle shifts to recommend for a new visit, per each time window. |
|
modelInput |
true |
array |
Input route plan that contains visit with identifier specified by |
`"modelInput": { "name": "BASIC", "vehicles": [ { "id": "1", "vehicleType": "VAN" }, ` |
timeWindows |
true |
array |
Time windows to get the vehicle shift recommendations for ( |
`"timeWindows": [ { "startTime":"2024-01-23T08:00:00+01:00", "endTime":"2024-01-23T18:00:00+01:00" }, { "startTime":"2024-01-24T08:00:00+01:00", "endTime":"2024-01-24T12:00:00+01:00" } ] ` |
includeDependencies |
false |
string |
Which dependencies should be included in the response of the recommendation. Possible values are: |
|
32. Recommend Visit Time Windows API output
Description of Recommend Visit Time Windows API output.
Name | Format | Description | Example |
---|---|---|---|
constraintDiffs |
array |
Per-constraint score difference between the new solution with the fitted visit and the solution without the fitted visit. |
`"constraintDiffs": [ { "score": "0hard/0medium/-386soft", "constraintName": "Minimize travel time" }, … ` |
dependentVehicleShifts |
array |
Dependent vehicle shifts for the time window and the visit to fit. These shifts might be influenced by the recommendation. |
See vehicle shift plan. |
scoreDiff |
string |
Total score difference between the new solution with the fitted visit and the solution without the fitted visit. |
|
statistics |
object |
KPIs of the route plan with the fitted visit as per this recommendation. |
See KPIs. |
timeWindow |
object |
Time window that the recommendation ties to. |
|
vehicleShifts |
array |
Vehicle shift recommendations for the time window and the visit to fit. |
See vehicle shift plan. |
33. Recommend Visit Group Time Windows API input
Description of Recommend Visit Group Time Windows API input.
Name | Required | Format | Description | Example |
---|---|---|---|---|
fitVisitGroupId |
true |
string |
Identifier of the visit group to get the time window recommendations for. The visit group with given identifier needs
to be a part of the |
|
maxNumberOfRecommendationsPerTimeWindow |
true |
int |
Upper limit for a number of vehicle shifts to recommend for a new visit group, per each time window. |
|
modelInput |
true |
array |
Input route plan that contains a visit group with identifier specified by |
`"modelInput": { "name": "BASIC", "vehicles": [ { "id": "1", "vehicleType": "VAN" }, … ` |
timeWindows |
true |
array |
Time windows to get the vehicle shift recommendations for ( |
`"timeWindows": [ { "startTime":"2024-01-23T08:00:00+01:00", "endTime":"2024-01-23T18:00:00+01:00" }, { "startTime":"2024-01-24T08:00:00+01:00", "endTime":"2024-01-24T12:00:00+01:00" } ] ` |
includeDependencies |
false |
string |
Which dependencies should be included in the response of the recommendation. Possible values are: |
|
34. Recommend Visit Group Time Windows API output
Description of Recommend Visit Group Time Windows API output.
Name | Format | Description | Example |
---|---|---|---|
constraintDiffs |
array |
Per-constraint score difference between the new solution with the fitted visit group and the solution without the fitted visit group. |
`"constraintDiffs": [ { "score": "0hard/0medium/-386soft", "constraintName": "Minimize travel time" }, … ` |
dependentVehicleShifts |
array |
Dependent vehicle shifts for the time window and the visit group to fit. These shifts might be influenced by the recommendation. |
See vehicle shift plan. |
scoreDiff |
string |
Total score difference between the new solution with the fitted visit group and the solution without the fitted visit group. |
|
statistics |
object |
KPIs of the route plan with the fitted visit as per this recommendation. |
See KPIs. |
timeWindow |
object |
Time window that the recommendation ties to. |
|
vehicleShifts |
array |
Vehicle shift recommendations for the time window and the visit group to fit. |
See vehicle shift plan. |