Basic Routing
This example demonstrates how to solve a simple vehicle routing problem with real road distances using OpenStreetMap (OSM) data. We’ll route a single vehicle to visit 5 delivery locations in Berlin, Germany.Business Scenario
A local courier company needs to deliver packages to 5 customers in Berlin. They want to:- Find the most efficient route visiting all customers
- Use actual road distances, not straight-line distances
- Start and end at their depot
- Complete all deliveries in one trip
Complete Request
Key Configuration Choices
Routing Engine
Distance Calculation Methods:
"routingEngine": "OSM"
- Uses OpenStreetMap for real road distances"euclidian": true
- Would use straight-line distances (faster but less accurate)- Other engines:
"TOMTOM"
,"GOOGLE"
,"ANYMAP"
Location Details
Each location includes:- Name: Human-readable identifier for clarity
- Coordinates: Latitude/longitude for geocoding
- Duration: Service time at each stop (5 minutes)
- Load: Package size/weight
Vehicle Configuration
- Shift: 10-hour working day (8 AM - 6 PM)
- Start/End: Same depot location (round trip)
- Capacity: 50 units (sum of all loads = 30 units)
Expected Response
Understanding the Results
Route Sequence
The optimized route visits customers in this order:- Depot → Customer E (Berlin Cathedral)
- → Customer A (Alexanderplatz)
- → Customer D (Checkpoint Charlie)
- → Customer B (Potsdamer Platz)
- → Customer C (Brandenburger Tor)
- → Depot
Distance Comparison
To see the difference real distances make, compare with Euclidean distances:Real road distances are typically 20-50% longer than straight-line distances in urban areas due to the road network structure.
Try It Yourself
1
Get API Access
Obtain your API key from the Solvice Dashboard
2
Send Request
3
Check Status
4
Get Solution