Scoring System
The VRP solver uses a three-level scoring system: Hard, Medium, and Soft constraints.Score Levels
| Level | Purpose | Feasibility |
|---|---|---|
| Hard | Must be satisfied | hardScore = 0 required for feasible solution |
| Medium | Important but not mandatory | Minimized after hard constraints |
| Soft | Quality optimizations | Minimized for best solution |
Constraint Reference
Hard Constraints
| Constraint | Description |
|---|---|
TIME_WINDOW_CONFLICT | Job scheduled outside hard time window |
TRIP_CAPACITY | Vehicle capacity exceeded |
TAG_HARD | Missing required skill/tag |
SHIFT_END_CONFLICT | Work extends past shift end |
MAX_DRIVE_TIME | Driving limit exceeded |
DISALLOWED_RESOURCES | Job assigned to blacklisted resource |
Medium Constraints
| Constraint | Description |
|---|---|
OVERTIME_END_CONFLICT | Work extends into overtime |
DATE_TIME_WINDOW_CONFLICT_SOFT | Soft time window violated |
SAME_TRIP | Related jobs on different trips |
Soft Constraints
| Constraint | Description |
|---|---|
TRAVEL_TIME | Total travel time |
WAIT_TIME | Idle time at locations |
RESOURCE_ACTIVATION | Number of vehicles used |
RANKING_SOFT | Resource preference score |
FAIR_WORK | Workload balance across resources |