We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da6e89a commit cc473ebCopy full SHA for cc473eb
1 file changed
wrappers/wrapper.rb
@@ -103,7 +103,9 @@ def assert_vehicles_no_force_start(vrp)
103
end
104
105
def assert_vehicles_no_duration_limit(vrp)
106
- vrp.vehicles.none?(&:duration)
+ vrp.vehicles.none?(&:duration) ||
107
+ vrp.vehicles.select(&:duration)
108
+ .all?{ |vehicle| vehicle.duration <= ((vehicle.timewindow&.end || 2**32) - (vehicle.timewindow&.start || 0)) }
109
110
111
def assert_no_quantity_pickup_and_delivery(vrp)
0 commit comments