Performance Optimization Guide
The VRP solver’s performance depends on multiple factors including problem size, constraint complexity, and configuration choices. This guide helps you understand and optimize solver performance for your specific use cases.Performance Fundamentals
What Affects Solve Time?
Performance Scaling
The solver’s time complexity increases with:- Linear Factors
- Quadratic Factors
- Exponential Factors
- Number of jobs (O(n))
- Number of resources
- Number of time windows
- Basic constraints
Problem Size Guidelines
Small Problems (< 100 jobs)
Medium Problems (100-500 jobs)
Large Problems (500-2000 jobs)
Very Large Problems (> 2000 jobs)
Configuration for Performance
Essential Options
integer
Maximum solve time in milliseconds, passed as a query parameter on
POST /v2/vrp/solve (and the /suggest and sync-solve endpoints) — not a body field. Balance between quality and speed.The solver doesn’t expose separate construction-heuristic or local-search algorithm selection options — solve strategy is managed internally based on the problem.
Performance-Oriented Settings
- Speed Priority
- Quality Priority
- Balanced
Request
Body
Distance Matrix Performance
Distance calculations significantly impact performance:Matrix Types by Speed
1
Euclidean (Fastest)
- No external API calls
- Instant calculation
- Lower accuracy
2
Routing Engine (Slower, most accurate)
- Calls an external routing engine (
OSM,TOMTOM,GOOGLE, orANYMAP) - Real road distances and travel times
- Most accurate
3
Pre-computed Custom Matrices (No calculation)
- Skips on-the-fly distance calculation entirely
- Best for stable location sets or multi-profile/time-sliced scenarios
Distance Matrix Optimization
Constraint Impact on Performance
Low Impact Constraints
- Basic time windows
- Simple capacity checks
- Fixed assignments
- Priority values
Medium Impact Constraints
- Multiple time windows
- Multi-dimensional capacity
- Skill/tag matching
- Soft time preferences
High Impact Constraints
- Complex job relations
- Many-to-many dependencies
- Dynamic time calculations
- Alternative evaluations
Hardware Requirements
Minimum Requirements
- CPU: 2 cores
- Memory: 4GB RAM
- Network: 10 Mbps
- Storage: 1GB free
Recommended Specifications
- Small Fleet (< 10 vehicles)
- Medium Fleet (10-50 vehicles)
- Large Fleet (> 50 vehicles)
- CPU: 4 cores
- Memory: 8GB RAM
- Network: 50 Mbps
- Storage: 5GB free
Performance Monitoring
The solver doesn’t expose internal solve telemetry (score-calculation counts, move-evaluation counts, time-to-first-feasible, or memory usage) through the API — there’s no built-in solve-performance endpoint. The response only reports the outcome of the solve; use these fields to gauge solution quality after the fact:score across runs.
Optimization Strategies
1. Problem Decomposition
For very large problems, consider:1
Geographic Clustering
Divide by regions or zones
2
Temporal Splitting
Separate by time periods
3
Resource Grouping
Partition by vehicle types
4
Priority Batching
Process high-priority first
2. Incremental Solving
POST /v2/vrp/solve?millis=60000 for phase 1, then POST /v2/vrp/solve?millis=120000 for phase 2. There’s no separate warmStart/solutionId field — warm-start the solver from a previous solution by setting each already-placed job’s initialResource (and optionally initialArrival/initialDepot) to what it resolved to last time.
3. Parallel Processing
When possible, run multiple scenarios:4. Feature Toggling
Disable non-essential features for speed:- Maximum Speed
- Balanced
- Full Features
Common Performance Issues
Issue: Slow Initial Solutions
Symptoms
Symptoms
- Long time to first feasible solution
- Many jobs unassigned initially
- Poor construction heuristic performance
Solutions
Solutions
- Relax hard constraints temporarily
- Enable partial planning
- Reduce initial problem size
Issue: Plateau in Optimization
Symptoms
Symptoms
- Score stops improving
- Move count remains high
- No better solutions found
Solutions
Solutions
- Increase solve time (raise the
millisquery parameter) - Adjust weight balance
- Add solution diversity
Issue: Memory Exhaustion
Symptoms
Symptoms
- Out of memory errors
- Slow garbage collection
- System thrashing
Solutions
Solutions
- Reduce problem size
- Disable explanation
- Use geographic filtering
Best Practices
Performance Optimization Checklist:
- Start Simple: Begin with minimal constraints and features
- Measure Baseline: Record initial performance metrics
- Profile Problems: Identify specific bottlenecks
- Iterative Tuning: Make one change at a time
- Cache Aggressively: Reuse distance calculations
- Right-size Time: Don’t over-allocate solve time
- Monitor Production: Track real-world performance
- Document Settings: Record what works for your use case
Performance Benchmarks
Typical performance for well-configured problems:Actual performance varies based on geographic distribution, constraint complexity, and hardware. Use these as rough guidelines only.
Related Topics
Constraint System
Understand constraint impact
Solution Quality
Balance speed vs quality
Cost Optimization
Optimize operational costs
Advanced Constraints
Complex constraint features