Skip to main content

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

Solver-internal, not request-configurable: activeCapacityCoefficient and capacityDiscountCoefficient are internal tuning constants used by the solver’s workload-balance scoring. They are not fields on OnRouteWeights and cannot be set from the request — there is no weights.activeCapacityCoefficient or weights.capacityDiscountCoefficient key to send.
Internally, the solver uses these coefficients (defaults activeCapacityCoefficient = 0.7, capacityDiscountCoefficient = 0.1) when scoring how efficiently vehicle capacity is being used, to prefer fuller vehicles over partially loaded ones.

How Active Capacity Works

The active capacity coefficient encourages the solver to:
  1. Use fewer vehicles by filling them more completely
  2. Reduce partial loads and empty space
  3. Consolidate deliveries when possible
Score Impact Formula (internal):

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:
  1. Reserve Buffer: Keep 10-15% capacity buffer for unexpected additions
  2. Dimension Selection: Only use dimensions that actually constrain your operations
  3. Load Accuracy: Ensure load estimates include packaging and handling equipment
  4. 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

  1. Simplify When Possible: If volume rarely constrains, use weight only
  2. Round Values: Round loads to reasonable precision (1kg vs 1.234kg)
  3. Group Similar Items: Combine small items into single jobs when feasible

Capacity in Response

The solution includes capacity tracking information: