Resource Management
Resources represent the vehicles, drivers, or teams that execute your routes. This guide covers advanced resource configuration including multi-shift scheduling, workload balancing, period constraints, and geographic restrictions.Basic Resource Configuration
Every resource requires at minimum a name and shift definition:Essential Resource Properties
string
required
Unique identifier for the resource
array
required
Working periods when the resource is available
array[integer]
Loading capacity in multiple dimensions (e.g., [weight, volume])
array[string]
Skills, certifications, or capabilities, as plain tag names
Location
Preferred geographic point for this resource, a soft preference
Multi-Shift Resources
Resources can work multiple shifts per day or across different days:Shift Properties
datetime
required
Shift start time (ISO 8601 format)
datetime
required
Shift end time
Location
Starting location for this shift
Location
Ending location for this shift
datetime
Latest possible end time when overtime is allowed (see
weights.overtimeWeight)array[Break]
Scheduled breaks during the shift
Period Constraints
Control resource utilization over explicit time windows using therules array. Each rule pairs a period (an explicit from/to date-time window — there is no "DAY"/"WEEK"/"MONTH" keyword) with one or more direct limit fields:
Available Rule Fields
- Work Time Limits
- Drive Time Limits
- Service Time Requirements
maxWorkTime/minWorkTime: service time + drive time within the periodFull field list on a rule:
period (optional {from, to}; omit it and the rule covers the whole planning period), minWorkTime/maxWorkTime, minServiceTime/maxServiceTime, minDriveTime/maxDriveTime, minJobComplexity/maxJobComplexity, jobTypeLimitations (map of job type to max count), groupTag (see Resource Period Rules for pooling). max* violations are enforced as hard constraints; min* violations are penalized as medium-tier (utilization) constraints — both scaled by the request-level weights.periodRuleWeight.Workload Balancing
Distribute work fairly across resources:Fair Workload Per Resource
Spread each resource’s own workload evenly across its available days.fairWorkloadPerResource is a boolean in options; the strength comes from the top-level weights.workloadSpreadWeight:
workloadSpreadWeight values make the solver push harder for an even distribution. options.workloadSensitivity also influences the effect.
Fair Workload Per Trip
Spread service time across all resources and all days/trips:Geographic Restrictions
Resource Region
A resource’sregion is a single location (latitude/longitude), not a named area. It is a soft preference for keeping that resource working near that point. Its strength is set by weights.regionMinimisationWeight. Jobs have no region field; their position comes from location.
Distance-Based Restrictions
Limit how far a resource drives withmaxDriveDistance (meters, on the resource):
Skill and Tag Management
Match resource capabilities with job requirements:Tag Matching Rules
1
Hard Tags Must Match
If a job has a hard tag, only resources that list that tag in their
tags can be assigned2
Soft Tags Preferred
Soft tags (
"hard": false on the job tag) create preference but aren’t required3
Weight Controls Strength
A higher
weight on a soft job tag makes that preference strongerPreferred Resources
Allow soft preferences for specific resource assignments with jobrankings (1 is most preferred, 100 least). Set weights.rankingWeight above 0 so rankings influence the plan:
Complex Example: Field Service Team
Here’s a comprehensive example combining multiple resource features:Performance Optimization
Resource Pool Size
Best Practices
1
Start Simple
Begin with basic resource definitions and add constraints incrementally
2
Use Appropriate Constraints
- Hard constraints for legal/safety requirements
- Soft constraints for preferences
- Period rules for compliance
3
Test Resource Utilization
Monitor these metrics:
- Average utilization per resource
- Overtime frequency
- Unassigned jobs due to resource constraints
4
Balance Flexibility and Control
Too many restrictions can make problems infeasible
Troubleshooting
Common Issues
Jobs Not Assigned to Preferred Resources
Jobs Not Assigned to Preferred Resources
Possible Causes:
- Preferred resource doesn’t have required tags
- Resource shift doesn’t cover job time window
- Capacity constraints prevent assignment
- Travel time makes assignment inefficient
- Verify resource has all required capabilities
- Check shift coverage and time windows
- Increase
weights.rankingWeightand check the jobrankings - Review overall constraint interactions
Uneven Workload Distribution
Uneven Workload Distribution
Possible Causes:
- Geographic clustering of jobs
- Skill requirements limiting options
- Time window constraints
- Different shift lengths
- Increase
weights.workloadSpreadWeight(withoptions.fairWorkloadPerResourceoroptions.fairWorkloadPerTripset totrue) - Adjust shift patterns for better coverage
- Add more flexible resources
Period Constraints Violated
Period Constraints Violated
Possible Causes:
- Constraints too restrictive
- Not enough resources for workload
- Poor shift distribution
- Review and adjust period rule values
- Add additional resources or shifts
- Enable partial planning
- Distribute work across more days
Related Features
Time Scheduling
Detailed shift configuration and time management
Cost Optimization
Resource costs and optimization strategies
Tag System
Advanced tag matching and ranking
Break Management
Configure breaks within shifts