Capacity Management
The VRP solver provides comprehensive capacity management features to handle real-world loading constraints. From simple weight limits to complex multi-dimensional capacity tracking, this guide covers all capacity-related features.Overview
Capacity management ensures that vehicles don’t exceed their loading limits while optimizing resource utilization. The solver supports:- Multi-dimensional capacity (weight, volume, pallets, etc.)
- Dynamic capacity tracking for pickup/delivery operations
- Capacity utilization optimization
- Soft capacity constraints with violations
Basic Capacity Configuration
Single-Dimension Capacity
The simplest form uses a single capacity value:Always ensure that job loads and resource capacities have the same number of dimensions. If a resource has
capacity: [1000, 50]
, all jobs must have loads like load: [weight, volume]
.Multi-Dimensional Capacity
Handle multiple capacity constraints simultaneously:The solver tracks all capacity dimensions independently. A vehicle can only accept a job if ALL capacity dimensions have sufficient remaining space.
Dimension Limit: The solver supports a maximum of 5 capacity dimensions. If you need to track more than 5 different capacity types, consider combining related dimensions or using multiple optimization runs.
Pickup and Delivery Capacity
For pickup and delivery operations, capacity changes dynamically during the route:Capacity Flow Example
1
Initial State
Vehicle starts empty:
0 / 500 kg
2
After Pickup
Load increases:
50 / 500 kg
3
After Delivery
Load decreases:
0 / 500 kg
Active Capacity Coefficient
TheactiveCapacityCoefficient
optimizes vehicle utilization by preferring fuller vehicles:
Controls preference for using vehicle capacity efficiently. Higher values (0.8-1.0) strongly prefer fuller vehicles, while lower values (0.3-0.5) allow more distributed loading.
Discount factor for capacity utilization scoring. Helps balance between filling vehicles completely vs. other objectives.
How Active Capacity Works
The solver calculates a capacity utilization score for each vehicle:The active capacity coefficient encourages the solver to:
- Use fewer vehicles by filling them more completely
- Reduce partial loads and empty space
- Consolidate deliveries when possible
Dynamic Capacity Tracking for PDP
Pickup and Delivery Problems (PDP) require sophisticated capacity tracking as vehicle loads change throughout the route:Real-Time Capacity Updates
1
Track Current Load
The solver maintains real-time load state for each vehicle:
2
Validate Each Stop
Before adding a job, the solver checks:
- Can the vehicle handle the pickup load?
- Will future deliveries free enough space?
- Does the route respect capacity at all times?
3
Optimize Load Sequence
The solver may reorder stops to manage capacity:
- Group pickups early when possible
- Schedule deliveries to free space for later pickups
- Balance load throughout the route
Complex PDP Example
Here’s a real-world scenario with multiple pickups and deliveries:Capacity Timeline Visualization
The solver tracks how capacity changes throughout the route:The solver ensures that at no point does the current load exceed the vehicle’s capacity in any dimension.
Common Use Cases
1. Last-Mile Delivery
Standard parcel delivery with weight and volume constraints:2. Waste Collection
Vehicles that fill up and need to visit disposal sites:3. Mixed Fleet Optimization
Different vehicle types with varying capacities:Best Practices
Capacity Planning Guidelines:
- Reserve Buffer: Keep 10-15% capacity buffer for unexpected additions
- Dimension Selection: Only use dimensions that actually constrain your operations
- Load Accuracy: Ensure load estimates include packaging and handling equipment
- Mixed Units: Keep units consistent (all kg or all lbs, not mixed)
Handling Overloading
When capacity constraints make problems infeasible:1
Enable Partial Planning
2
Check Unassigned Jobs
Review the response for jobs that couldn’t be assigned due to capacity:
3
Add Resources or Adjust Loads
Either add more vehicles or review if load estimates are accurate.
Performance Considerations
Multi-dimensional capacity impact:
- Each additional capacity dimension increases computation complexity
- Use 1-3 dimensions for best performance
- More than 5 dimensions may significantly slow solving
Optimization Tips
- Simplify When Possible: If volume rarely constrains, use weight only
- Round Values: Round loads to reasonable precision (1kg vs 1.234kg)
- Group Similar Items: Combine small items into single jobs when feasible
Capacity in Response
The solution includes capacity tracking information:Related Features
- Pickup and Delivery - Complex paired job handling
- Vehicle Types - Different capacity per vehicle type
- Job Relations - Capacity-aware job sequencing