Advanced Time & Scheduling Features
Beyond basic time windows, the VRP solver offers sophisticated time management capabilities for complex scheduling scenarios. This guide covers advanced features including multiple time windows, soft constraints, wait time optimization, and more.Multiple Time Windows
Jobs can have multiple valid time slots, giving the solver flexibility to choose the most efficient option:Soft Time Windows
Allow time window violations with penalties instead of hard constraints:When
false, the time window becomes a soft constraint that can be violated with a penaltyPenalty weight for violating the soft time window. Higher values make violations less likely.
Combining Hard and Soft Windows
Time Snapping (snapUnit)
Round arrival times to specific intervals for cleaner schedules:How snapUnit works:
- Arrival times are rounded UP to the nearest snapUnit
- Example: With
snapUnit: 300(5 minutes)- Arrival at 9:02 → Snapped to 9:05
- Arrival at 9:05 → Stays at 9:05
- Arrival at 9:07 → Snapped to 9:10
Use Cases for snapUnit
- Appointment Scheduling
- Dock Scheduling
- Public Transport
Job Padding
Add buffer time before and after jobs:Duration Squash
Reduce service time for consecutive jobs at the same location:1
First Job at Location
Full duration applies: 600 seconds (10 minutes)
2
Subsequent Jobs
If travel time < 1 minute, duration becomes durationSquash: 120 seconds (2 minutes)
Resumable Jobs
Allow breaks to interrupt long service jobs:With
resumable: true, the 4-hour job can be split:- 8:00-12:00: Work 4 hours
- 12:00-13:00: Lunch break
- 13:00-13:00: Resume and complete
Wait Time Optimization
Control how the solver handles waiting time at locations:Wait Time Scenarios
- Minimize Waiting
- Allow Strategic Waiting
- Balanced Approach
Overtime Management
Handle shift extensions with soft or hard constraints:Overtime Behavior:
- Regular shift: 8:00-17:00 (no penalty)
- Overtime zone: 17:00-19:00 (penalized but allowed)
- After overtimeEnd: Not allowed (hard constraint)
Multi-Day ASAP Scheduling
Optimize job scheduling across multiple days:Complex Example: Field Service
Combining multiple time features for realistic field service:Performance Tips
Related Features
- Time Windows - Basic time window configuration
- Break Management - Detailed break scheduling
- Resource Shifts - Multi-shift scheduling
- Job Relations - Time-based job dependencies