Skip to content

Commit

Permalink
reject when unknow vehicle in relation
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsecadeline committed Feb 12, 2021
1 parent 46cd2b4 commit d25659d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions models/vrp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@ def check_relations
)
end

if relation_vehicles.include?(nil)
raise OptimizerWrapper::DiscordantProblemError.new(
'Unknown vehicle in relation'
)
end

check_vehicle_trips_stores_consistency(relation_vehicles)
check_vehicle_trips_timewindows_consistency(relation_vehicles)
check_vehicle_trips_force_start_consistency(relation_vehicles)
Expand Down

0 comments on commit d25659d

Please sign in to comment.