Real-Time Scheduling
Real-time scheduling enables you to maintain optimal routes throughout the day by combining comprehensive morning planning with rapid on-the-fly adjustments. This two-phase approach handles both strategic daily planning and tactical real-time responses to changing conditions.How Real-Time Scheduling Works
Real-time scheduling leverages two different solve endpoints to balance comprehensive optimization with speed:Phase 1: Morning Bulk Optimization
Start each day with comprehensive planning using the asynchronous solve endpoint:1
Bulk Problem Setup
Prepare your complete daily schedule with all known jobs, resources, and constraints.
2
Comprehensive Solve
Submit to the asynchronous solve endpoint for thorough optimization.This takes 2-5 minutes but produces the highest quality solution considering all constraints and optimization objectives.
3
Extract Schedule Foundation
Use the complete solution as your baseline schedule for the day.
Phase 2: Real-Time Adjustments
Throughout the day, use the synchronous endpoint for rapid schedule updates:1
Current State Capture
When changes occur, capture the current schedule state using
initialResource
and initialArrival
fields.2
Rapid Re-optimization
Submit to the synchronous solve endpoint for immediate results.Returns optimized solution in seconds, building on the initial state.
3
Deploy Updated Schedule
Immediately deploy the updated routes to your field teams.
Synchronous solve completes in under 5 seconds, enabling real-time responsiveness.
Key Schema Fields for Real-Time Scheduling
The VRP solver provides specific fields designed for real-time operations:Initial State Fields
Use these fields to provide the current schedule state to the solver:Planned State Fields
Use these fields to create soft constraints around customer commitments:Real-Time Scheduling Patterns
Pattern 1: New Job Insertion
Add urgent jobs to the current schedule:Pattern 2: Job Cancellation
Remove cancelled jobs and reoptimize remaining schedule:Pattern 3: Resource Unavailability
Handle driver breaks, vehicle issues, or other resource constraints:Pattern 4: Customer Rescheduling
Handle customer-requested appointment changes:Implementation Architecture
Backend Integration
Structure your real-time scheduling system with clear separation between bulk and real-time operations:Performance Optimization
Real-Time Performance Tips:
- Minimize Job Count: Only include jobs that could be affected by changes
- Use Initial State: Always provide
initialResource
andinitialArrival
for existing jobs - Batch Changes: Group multiple changes into single sync solve calls
- Cache Results: Store solutions to avoid redundant calculations
- Monitor Timing: Track sync solve response times to ensure sub-5-second performance
Error Handling and Resilience
Real-time systems require robust error handling:Fallback Strategies
Sync Solve Timeout
Sync Solve Timeout
If sync solve takes too long:
API Unavailability
API Unavailability
Invalid Solution
Invalid Solution
When optimization returns an infeasible solution:
Operational Considerations
Update Frequency
Update Frequency Guidelines:
- Maximum: 1 update per 30 seconds per resource
- Recommended: Batch changes and update every 2-5 minutes
- Emergency: Immediate updates for critical changes only
State Management
Track the current schedule state to enable effective real-time updates:Monitoring and Analytics
Track key metrics for real-time scheduling performance:Optimization Speed
Monitor sync solve response times and ensure they stay under 5 seconds
Schedule Stability
Track how often schedules change and the magnitude of disruptions
Customer Impact
Measure appointment changes and customer notification requirements
Resource Utilization
Monitor how real-time changes affect overall resource efficiency
Best Practices
Real-Time Scheduling Best Practices:
- Morning Foundation: Always start with comprehensive bulk optimization
- State Preservation: Maintain accurate current state with
initialResource
andinitialArrival
- Change Batching: Group multiple changes to minimize optimization calls
- Error Resilience: Implement fallback strategies for API failures
- Performance Monitoring: Track optimization times and schedule stability
- Customer Communication: Automate notifications when appointments change
- Resource Coordination: Ensure field teams receive updates immediately
- Data Integrity: Validate solutions before deployment