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:Bulk Problem Setup
Prepare your complete daily schedule with all known jobs, resources, and constraints.
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.
Phase 2: Real-Time Adjustments
Throughout the day, use the synchronous endpoint for rapid schedule updates:Current State Capture
When changes occur, capture the current schedule state using
initialResource and initialArrival fields.Rapid Re-optimization
Submit to the synchronous solve endpoint for immediate results.Returns optimized solution in seconds, building on the initial state.
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:- initialResource
- initialArrival
Planned State Fields
Use these fields to create soft constraints around customer commitments:- plannedResource
- plannedArrival
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
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
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
initialResourceandinitialArrival - 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
Common Use Cases
Emergency Response
Handle urgent service requests that must be inserted into existing schedules with minimal disruption.Dynamic Demand
Adapt to changing customer demands throughout the day, such as same-day delivery requests or appointment changes.Resource Management
Respond to driver breaks, vehicle breakdowns, traffic delays, and other resource availability changes.Service Quality
Maintain optimal routes while respecting customer commitments and service windows.Related Topics
Sync Solve API
Fast synchronous optimization endpoint
Async Solve API
Comprehensive asynchronous optimization
Job Schemas
Complete job configuration options
Performance Guide
Optimize solving performance