---
title: "Evaluate"
method: POST
path: "/v2/vrp/evaluate"
tags: ["Actions"]
---

# Evaluate

`POST /v2/vrp/evaluate`

Will trigger the evaluation run asynchronously.

## Request body

- OnRouteRequest — OnRoute Request for solving, evaluating
  - `resources` Resource[], required — List of Resources
    - `name` string, required — Unique name
    - `shifts` Shift1[], nullable, required — Shift definition of a Resource over course of planning period
      - `from` string, ISO8601 datetime string, required — Start of the shift datetime
      - `to` string, ISO8601 datetime string, required — End of the shift datetime
      - `start` Location — Geographical Location in WGS-84
        - `latitude` number, double — Latitude
        - `longitude` number, double — Longitude
      - `end` Location — Geographical Location in WGS-84
        - `latitude` number, double — Latitude
        - `longitude` number, double — Longitude
      - `ignoreTravelTimeToFirstJob` boolean, nullable — Ignore the travel time from the start location to the first order
      - `ignoreTravelTimeFromLastJob` boolean, nullable — Ignore the travel time from the last order to the optional end location
      - `overtime` unknown
      - `overtimeEnd` string, ISO8601 datetime string, nullable — Maximum overtime time.
      - `breaks` BreakDto1[], nullable — Windowed breaks definitions.
        - `type` 'WINDOWED' | 'DRIVE' | 'UNAVAILABILITY', required — Type of break that can be defined for a resource
      - `tags` string[], nullable — Shift tags will ensure that this resource can only do Jobs of this tag during this shift. This allows for tag based availability.
    - `start` Location — Geographical Location in WGS-84
      - `latitude` number, double — Latitude
      - `longitude` number, double — Longitude
    - `end` Location — Geographical Location in WGS-84
      - `latitude` number, double — Latitude
      - `longitude` number, double — Longitude
    - `maxDriveTimeInSeconds` unknown
    - `region` Location — Geographical Location in WGS-84
      - `latitude` number, double — Latitude
      - `longitude` number, double — Longitude
    - `tags` string[], nullable — Tag requirements
    - `category` 'CAR' | 'BIKE' | 'TRUCK' — Transportation type for the resource
    - `rules` Rule[], nullable — Periodic Rules
      - `period` PeriodDto — Subset of the planning period
        - `from` string, date-time, required
        - `end` string, required — End date-time
        - `to` string, date-time, required
      - `minWorkTime` integer, nullable — Minimum work time in seconds. Work time is service time + drive/travel time.
      - `maxWorkTime` integer, nullable — Maximum work time in seconds. Work time is service time + drive/travel time.
      - `minServiceTime` integer, nullable — Minimum service time in seconds
      - `maxServiceTime` integer, nullable — Maximum service time in seconds
      - `minDriveTime` integer, nullable — Minimum drive time in seconds
      - `maxDriveTime` integer, nullable — Maximum drive time in seconds
      - `minJobComplexity` integer, nullable — Sum of the complexity of the jobs completed by this resource should reach this value
      - `maxJobComplexity` integer, nullable — Sum of the complexity of the jobs completed by this resource should not go over this value
    - `capacity` integer[], nullable — Capacity
    - `hourlyCost` integer, nullable — Financial cost per hour per resource. Only calculated when working (driving, servicing or waiting)
    - `maxDriveTime` integer, nullable
    - `maxDriveTimeJob` integer, nullable
  - `jobs` Job[], required — List of Jobs
    - `name` string, required — Unique description
    - `duration` integer, nullable — Service duration of the job
    - `location` Location — Geographical Location in WGS-84
      - `latitude` number, double — Latitude
      - `longitude` number, double — Longitude
    - `priority` integer, nullable — Priority of the job will ensure that it is included in the planning over other lower priority jobs. We evaluate the priority multiplied with the duration of the job. The higher the priority, the more likely it is that the job will be included in the planning. Defaults to 1.
    - `urgency` integer, nullable — Urgency of the job will ensure that it is likely to be scheduled before jobs with a lower urgency.
    - `tags` Tag[], nullable — A tag is a string that can be used to link jobs to resources.
      - `name` string, required — Tag restriction name which can force some Jobs to be scheduled by Resources with the same tag
      - `hard` boolean, nullable — Hard or soft constraint.
      - `weight` integer, nullable — Value of the weight. This will be on the same level as travel time in the case of soft constraint.
    - `rankings` Ranking[], nullable — Rankings define resource preferences for this job, where lower values indicate stronger preference for specific resources.
      - `name` string, required — The name of the Resource
      - `ranking` integer, nullable — Resource ranking for this tag (1-100). Lower ranking means more preferred resource. When a job is assigned to a resource, the score is penalised based on the ranking.
    - `windows` DateWindow[], nullable — List of start/end date/time combinations.
      - `from` string, ISO8601 datetime string, required — Date time start of window
      - `to` string, ISO8601 datetime string, required — Date time end of window
      - `weight` integer, nullable — Weight constraint modifier
      - `hard` boolean, nullable — Hard constraint violation of DateWindow
    - `durationSquash` integer, nullable — When a job is performed at the same location as another job, `durationSquash` ensures that the 2nd job' service time is reduced to this value. Example: `duration=600` and `durationSquash=30` means that the 2nd job will only take 30 seconds to perform.
    - `plannedDate` string, Date string, nullable — Fixed date on which this order is already planned and should hence be taken into account in the planning.
    - `plannedResource` string, nullable — Name of the resource to which this order is already planned and should hence be taken into account in the next planning.
    - `plannedArrival` string, ISO8601 datetime string, nullable — Planned arrival time The second of day at which the order is planned to complete. The difference with the actual arrival time is scaled in the score with plannedWeight.
    - `hard` boolean, nullable — In the case of partialPlanning planning, this indicates whether this order should be integrated into the planning or not.
    - `hardWeight` integer, nullable — In the case of partialPlanning planning, this indicates the weight of this order.
    - `padding` integer, nullable — Padding time before and after the job. In seconds
    - `load` integer[], nullable — Load
    - `allowedResources` string[], nullable — List of vehicle names that are allowed to be assigned to this order.
    - `initialResource` string, nullable — Warm start for the assigned resource: name of the vehicle to which this job is planned. Use this to speed up the solver and to start from an initial solution.
    - `initialArrival` string, ISO8601 datetime string, nullable — Warm start for the arrival time. Use this to speed up the solver and to start from an initial solution.
    - `disallowedResources` string[], nullable — List of vehicle names that are allowed to be assigned to this order.
    - `complexity` integer, nullable — Complexity of the job
    - `resumable` boolean, nullable — Enables job interruption by resource unavailability breaks. When true, the job can start before a break, pause during the break, and resume afterward. Default: false.
  - `options` Options — Options to tweak the routing engine
    - `euclidian` boolean, nullable — Use euclidian distance for travel time. Default false.
    - `routingEngine` 'OSM' | 'TOMTOM' | 'GOOGLE' | 'ANYMAP' — The routing engine to use for distance and travel time calculations
    - `partialPlanning` boolean, nullable — We will try to assign as many jobs as possible and create a partial schedule unless `partial` is set to `false`. Default set to true.
    - `minimizeResources` boolean, nullable — Minimise the vehicle useage or minimise total travel time. Two different objective functions.
    - `traffic` number, double, nullable — Modifier to travel time for traffic. If you want actual traffic information, use HERE or TomTom map integration.
    - `polylines` boolean, nullable — Let our map server calculate the actual polylines for connecting the visits. Processing will take longer.
    - `fairWorkloadPerTrip` boolean, nullable — If true, the workload (service time) will be spread over all resources and all days. (interacts with `Weights.workloadSpreadWeight` and `options.workloadSensitivity`)
    - `fairWorkloadPerResource` boolean, nullable — If true, the workload (service time) will be spread over all days of one resource. (interacts with `Weights.workloadSpreadWeight` and `options.workloadSensitivity`)
    - `snapUnit` integer, nullable — The smallest steps in arrival time to which results will be snapped. The snapping policy is round-up and is used at runtime, implying it influences the score calculation. Unless a post-calculation feature such as order padding is used, any calculated arrival time in `[391, 395]` with a `snapUnit` of `5` will yield `395`. Fallback value for `Options.use_snapUnit_for_waitRange`.
    - `maxSuggestions` integer, nullable — If the request is submitted to the suggestion end point it indicates the maximum number of suggestions the solver should return (default is 0 which means return all)
    - `onlyFeasibleSuggestions` boolean, nullable — If the request is a suggestion then if the initial plan is feasible the solver will return only feasible suggestions otherwise it will return only suggestions that do not worsen the infeasibility (default is true)
    - `workloadSensitivity` number, double, nullable
    - `explanation` ExplanationOptions — Options to manage the explanation of the solution
      - `enabled` boolean, nullable — When enabled the explanation will contain a map of all the alternative positions for each job
      - `filterHardConstraints` boolean, nullable — When true the map of alternative positions will contain only feasible alternatives
      - `onlyUnassigned` boolean, nullable
    - `fairComplexityPerTrip` boolean, nullable
    - `fairComplexityPerResource` boolean, nullable
  - `weights` Weights — OnRoute Weights
    - `priorityWeight` integer, nullable — Weight modifier for `job.priority` that ensures that priority orders are scheduled. Note that this does not make sure that they are scheduled sooner.
    - `workloadSpreadWeight` integer, nullable — Weight modifier for service time per vehicle day.
    - `travelTimeWeight` integer, nullable — Weight modifier for travel time.
    - `plannedWeight` integer, nullable — Weight modifier for planned vehicle and planned date requirement.
    - `asapWeight` integer, nullable — Weight modifier scheduling jobs as soon (on day basis) as possible.
    - `minimizeResourcesWeight` integer, nullable — Weight modifier for minimizing activating another resource on a day trip. The weight is put on the same balance as travel time. So setting this weight to 3600 (1hour) will make sure that the solver will try to minimize the number of resources used on a day trip compared to 1 extra hour of travel time.
    - `allowedResourcesWeight` integer, nullable — Weight modifier for the resources allowed constraint.
    - `waitTimeWeight` integer, nullable — Weight modifier for wait time constraint.
    - `urgencyWeight` integer, nullable — Weight modifier for the urgency constraint.
    - `driveTimeWeight` integer, nullable — Weight modifier for the drive time constraint.
    - `rankingWeight` integer, nullable — Weight modifier for tag ranking preference. Higher weight increases the importance of assigning jobs to higher-ranked resources.
  - `hook` string, uri, nullable — Webhook endpoint to receive POST request with the id.
  - `label` string, nullable
  - `relations` Relation[], nullable
    - `type` 'SAME_TRIP' | 'SEQUENCE' | 'DIRECT_SEQUENCE' | 'SAME_TIME' | 'NEIGHBOR' | 'PICKUP_AND_DELIVERY' | 'SAME_RESOURCE' | 'SAME_DAY' | 'GROUP_SEQUENCE', required — Type of relation between jobs
    - `jobs` string[], required — List of job names. This can be sequence dependent.
    - `resource` string, nullable — Optional resource
    - `minTimeInterval` integer, nullable — Minimum seconds between two jobs in a SEQUENCE relation.
    - `maxTimeInterval` integer, nullable — Maximum seconds between two jobs in a SEQUENCE relation.
    - `partialPlanning` boolean — Allows the solver to plan a subset of the jobs in the job relation when overconstrained
    - `maxWaitingTime` integer, nullable — In case of a `SAME_TIME` relation, the maximum waiting time in seconds between the jobs. Defaults to `1200` seconds or `20` minutes.
    - `timeInterval` 'FROM_ARRIVAL' | 'FROM_DEPARTURE', required — Determines if the time interval between jobs should be measured from arrival or departure
    - `tags` string[], nullable — When using the GROUP_SEQUENCE relation it is used to define the job groups by inserting the tags that differentiate them

## Response `200`

Status

- SolviceStatusJob — Status of a solve job
  - `id` string, required — Job ID
  - `status` 'QUEUED' | 'SOLVING' | 'SOLVED' | 'ERROR', nullable — Status of the solve.
  - `solveDuration` integer, nullable — Duration of the solve in seconds
  - `errors` Message[], nullable — List of errors
    - `code` integer — Error code
    - `message` string, required — Error message
  - `warnings` Message[], nullable — List of warnings
    - `code` integer — Error code
    - `message` string, required — Error message

## Other responses

- `400` — Bad request
- `427` — Too many requests.
- `500` — Internal error

---

[API](https://skmtc.dev/solvice/apis/vrp-api.md) · [All operations](https://skmtc.dev/solvice/apis/vrp-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/solvice/vrp-api/revisions/ab22101f5a38/schema)
