Skip to content

Commit

Permalink
add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rewertvsp committed Feb 8, 2024
1 parent 4438381 commit 02c4773
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,12 @@ else if (population == null)
+ " for pickup is not part of the possible links for pickup. Please check!");

if (setLocationsOfDelivery != null)
for (String selectedLinkIdDelivery : setLocationsOfDelivery)
if (!possibleLinksDelivery.containsKey(Id.createLinkId(selectedLinkIdDelivery)))
throw new RuntimeException("The selected link " + selectedLinkIdDelivery
if (numberOfDeliveryLocations < setLocationsOfDelivery.length)
log.warn("You selected more certain locations than the set number of locations. Randomly selected locations will be used.");
else
for (String selectedLinkIdDelivery : setLocationsOfDelivery)
if (!possibleLinksDelivery.containsKey(Id.createLinkId(selectedLinkIdDelivery)))
throw new RuntimeException("The selected link " + selectedLinkIdDelivery
+ " for delivery is not part of the possible links for delivery. Please check!");

// distribute the demand over the network because no number of jobs is selected
Expand Down

0 comments on commit 02c4773

Please sign in to comment.