Distance Matrix Integration
The VRP solver integrates with Solvice Maps to generate high-quality distance matrices before optimization begins. This integration ensures that routing solutions are based on real-world travel times and distances rather than simple geographic calculations.Why Distance Matrices Matter
Accurate distance and travel time data is fundamental to creating realistic routing solutions: Without accurate distance data, optimization would be based on:- Euclidean (straight-line) distances
- Uniform travel speeds
- No traffic considerations
- No route restrictions
How It Works
Pre-Processing Phase
Before the VRP solver begins optimization, it analyzes your request to identify all unique locations and generates distance matrices through Solvice Maps:1
Location Extraction
The solver scans all jobs and resources to create a comprehensive list of unique coordinates that need distance calculations.
2
Matrix Request Generation
Creates optimized distance matrix requests to Solvice Maps, automatically handling:
- Request splitting for large location sets
- Vehicle category mapping (CAR, TRUCK, BICYCLE, etc.)
- Routing engine selection based on data availability
3
Distance Matrix Creation
Generates distance matrices containing:
- Durations: Travel time between all location pairs in seconds
- Distances: Road network distances in meters
- Time-dependent data: Traffic-aware matrices when applicable
Available Routing Options
The VRP solver provides several options for distance calculation:Euclidean vs Real Road Networks
- Fast prototyping and testing
- Scenarios where road networks don’t matter significantly
- Performance-critical applications with acceptable accuracy trade-offs
- Instant calculation
- No external dependencies
- Less accurate for real-world scenarios
Routing Engine Selection
The VRP solver supports multiple routing engines through Solvice Maps:- OSM: OpenStreetMap data - comprehensive global coverage
- TOMTOM: Commercial routing with traffic data for enhanced accuracy
Routing engine selection is typically handled automatically based on your region and requirements. TomTom routing provides traffic-aware matrices that can vary throughout the day.
Traffic-Aware Routing
For time-sensitive routing, the system can leverage traffic data to create time-dependent distance matrices:Traffic Multiplier
Simple traffic adjustment for all routes:Time-Dependent Matrices
Advanced traffic-aware routing uses SplineMatrix technology to provide smooth time-dependent travel times:- MIDWEEK: Monday through Friday traffic patterns
- WEEKEND: Saturday and Sunday traffic patterns
Vehicle Categories
Different vehicle types have different routing characteristics:- CAR: Standard vehicle routing with full road access
- TRUCK: Heavy vehicle routing with restrictions and regulations
- Additional categories available based on regional requirements
Integration with VRP Solving
The distance data seamlessly integrates with the optimization process:Constraint Evaluation
Constraint Evaluation
Time Window Constraints: Use real travel times to determine if jobs can be reached within their time windows.Resource Availability: Factor in actual travel times when evaluating resource shift compatibility.Capacity Planning: Consider route distances for fuel consumption and range planning.
Optimization Objectives
Optimization Objectives
Minimize Travel Time: Optimize based on actual road network travel times instead of straight-line estimates.Minimize Resources: Balance resource usage against real travel distances.Workload Distribution: Distribute actual travel time and service time fairly across resources.
Solution Quality
Solution Quality
All generated routes are based on realistic distance data ensuring:
- Routes are physically possible on real road networks
- Travel time estimates are accurate
- Vehicle restrictions are respected
Performance Considerations
Matrix Size Impact
Problem Size | Locations | Matrix Pairs | Typical Generation Time |
---|---|---|---|
Small | < 50 | 2,500 | < 2 seconds |
Medium | 50-200 | 40,000 | 5-15 seconds |
Large | 200-500 | 250,000 | 30-60 seconds |
Enterprise | 500+ | 500,000+ | 1-5 minutes |
Performance Optimization Tips:
- Use
euclidian: true
for rapid prototyping and testing - Enable real routing only for production scenarios
- Consider geographic clustering for very large problems
- Monitor matrix generation time as part of total solve time
Configuration Examples
Basic Configuration
Most common setup for real-world routing:Traffic-Aware Configuration
For time-sensitive routing with traffic considerations:Fast Prototyping Configuration
For quick testing and development:Error Handling
The VRP solver includes robust fallback mechanisms when distance matrix generation encounters issues:Automatic Fallback
If real routing data is unavailable, the system automatically falls back to euclidean calculations:Validation Checks
Before optimization begins, the system validates:- All job and resource locations have valid coordinates
- Selected routing engine is available for the request region
- Matrix generation completed successfully
- Fallback options are properly configured
Best Practices
Distance Matrix Best Practices:
- Development: Use
euclidian: true
for fast iteration and testing - Production: Always use real road networks (
euclidian: false
) for accurate results - Traffic-Sensitive: Use TomTom routing engine for time-critical deliveries
- Large Problems: Monitor matrix generation time and consider geographic clustering
- Reliability: Implement proper error handling for matrix generation failures
- Testing: Validate solutions with known routes to verify distance accuracy
Real-World Impact
Using Solvice Maps for distance matrices typically results in:Accuracy Improvement
20-40% more accurate travel time estimates compared to euclidean calculations
Route Feasibility
Higher solution quality with routes that work on actual road networks
Traffic Awareness
Better timing by considering rush hour and traffic patterns
Operational Efficiency
Reduced delivery delays through realistic route planning