Synchronous solve operation for low latency results
curl --request POST \
--url https://api.solvice.io/v2/vrp/sync/solve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"jobs": [
{
"name": "1",
"duration": 3600
},
{
"name": "2",
"duration": 3600
}
],
"resources": [
{
"name": "1"
}
]
}'
{
"id": "0000-00000-00000-0000",
"status": "SOLVED",
"score": {
"hard": 0,
"soft": -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"
]
}
Api Key based authentication (apikey)
OnRoute Request for solving, evaluating
Solution
OnRoute response from solve
Was this page helpful?
curl --request POST \
--url https://api.solvice.io/v2/vrp/sync/solve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"jobs": [
{
"name": "1",
"duration": 3600
},
{
"name": "2",
"duration": 3600
}
],
"resources": [
{
"name": "1"
}
]
}'
{
"id": "0000-00000-00000-0000",
"status": "SOLVED",
"score": {
"hard": 0,
"soft": -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"
]
}