Dimensional Constraints: Length, Width, Height for Vehicles and Orders #187
shubham441996
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The VRP solver currently validates capacity constraints, but does not validate physical dimensions (length, width, height). This can result in infeasible solutions where orders are assigned to vehicles that cannot physically accommodate them.
Current Behavior
What works:
order.weight ≤ vehicle.weightCapacityorder.volume ≤ vehicle.volumetricCapacityWhat's missing:
order.length ≤ vehicle.lengthorder.width ≤ vehicle.widthorder.height ≤ vehicle.heightExample Problem
Input Data
Order:
{
"orderId": 12345,
"length": 3.5,
"width": 1.8,
"height": 2.2,
"weight": 200.0,
"volume": 13.86
}Vehicle:
{
"fleetId": "71269",
"length": 3.0,
"width": 1.5,
"height": 2.0,
"weightCapacity": 1000.0,
"volumetricCapacity": 20.0
}### Current Result (Incorrect)
The solver may assign this order to the vehicle because:
200.0 kg ≤ 1000.0 kg(weight constraint satisfied)13.86 m³ ≤ 20.0 m³(volume constraint satisfied)However, the order physically cannot fit:
3.5 m > 3.0 m(length exceeds vehicle capacity)1.8 m > 1.5 m(width exceeds vehicle capacity)2.2 m > 2.0 m(height exceeds vehicle capacity)Expected Result (Correct)
The solver should reject this assignment because the order exceeds the vehicle's dimensional limits.
Real-World Impact
Scenario 1: Furniture Delivery
Scenario 2: Multiple Orders
Solution Required
Implement dimensional validation to ensure:
Data Availability
Both orders and vehicles already have dimensional fields in the input JSON:
length(meters, can benull)width(meters, can benull)height(meters, can benull)These fields are currently not used during route optimization.
Goal: Prevent infeasible assignments where orders physically cannot fit in vehicles, even if weight/volume constraints are satisfied.
Beta Was this translation helpful? Give feedback.
All reactions