Synchronous Change and Re-evaluate
Changed onApply manual changes to an existing VRP solution and re-evaluate synchronously. Fetches the original request and solution, applies your changes by setting plannedArrival/plannedResource, and returns the modified solution immediately. Use for 'what-if' scenario testing and dispatcher overrides.
Request
- Base URLhttps://api.solvice.io
- URLhttps://api.solvice.io/v2/vrp/jobs/{id}/change
- AuthAPI key in header Authorization
Path parameters
Query parameters
Request body
Example request
{
"changes": [
{
"job": "job-A",
"after": "job-F",
"resource": "vehicle-1",
"arrival": "2025-01-15T14:30:00Z"
}
],
"operation": "evaluate"
}Response
Modified solution with changes applied
Example response
{
"id": "0000-00000-00000-0000",
"status": "SOLVED",
"score": {
"hardScore": 0,
"mediumScore": 0,
"softScore": -12345,
"feasible": true
},
"trips": [
{
"resource": "vehicle-1",
"date": "2023-01-13T00:00:00Z",
"departureTime": "2023-01-13T08:00:00Z",
"visits": [
{
"job": "Job-1",
"arrival": "2023-01-13T08:30:00Z",
"serviceTime": 600,
"travelTime": 1800,
"distance": 15000,
"location": {
"latitude": 51.0543,
"longitude": 3.7174
},
"waitTime": 0
}
],
"waitTime": 0,
"travelTime": 3600,
"distance": 30000,
"workTime": 4200,
"serviceTime": 600,
"occupancy": 0.47
}
],
"totalWaitTimeInSeconds": 0,
"totalTravelTimeInSeconds": 3600,
"totalTravelDistanceInMeters": 30000,
"totalServiceTimeInSeconds": 600,
"occupancy": 0.47,
"workloadFairness": 0.95,
"unserved": [],
"suggestions": [],
"messages": [
"Solution found in 2.5 seconds"
]
}Changes
- breaking
the
queryrequest parametermillisbecame required - breaking
the response property
became optional for the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
from the response with the status - warning
added the new
DEPOT_CAPACITYenum value to the//////response property for the response status - warning
added the new
DEPOT_COSTenum value to the//////response property for the response status - warning
added the new
DEPOT_TIME_WINDOWenum value to the//////response property for the response status - warning
added the new
END_DEPOTenum value to the//////response property for the response status - warning
added the new
LOAD_COMPATIBILITYenum value to the//////response property for the response status - warning
added the new
MAX_DRIVE_DISTANCEenum value to the//////response property for the response status - warning
added the new
SAME_DAYenum value to the//////response property for the response status - info
the request property
became optional - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
////to the response with the status - info
added the optional property
////to the response with the status - info
the response property
////became required for the status - info
the response property
////became required for the status - info
the response property
//became required for the status
- breaking
- info
added the optional property
////////////to the response with the status - info
added the optional property
////////////to the response with the status - info
added the optional property
////////////to the response with the status - info
added the optional property
////////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status
- info