Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuehnel committed May 27, 2024
1 parent f029ca0 commit c81177c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ private boolean violatesMaxRideDuration(DrtRequest drtRequest, InsertionDetourTi
private boolean violatesLateDiversion(Insertion insertion, DetourTimeInfo detourTimeInfo,
VehicleEntry vEntry, double effectiveDropoffTimeLoss) {
if (detourTimeInfo.pickupDetourInfo.pickupTimeLoss > 0) {
if (checkStopsForDetour(vEntry, insertion.pickup.index, insertion.dropoff.index,
if (violatesLateDiversionBetweenStopIndices(vEntry, insertion.pickup.index, insertion.dropoff.index,
constraintsSet.lateDiversionthreshold)) {
return true;
}
}
if (effectiveDropoffTimeLoss > 0) {
if (checkStopsForDetour(vEntry, insertion.dropoff.index, vEntry.stops.size(),
if (violatesLateDiversionBetweenStopIndices(vEntry, insertion.dropoff.index, vEntry.stops.size(),
constraintsSet.lateDiversionthreshold)) {
return true;
}
}
return false;
}

private boolean checkStopsForDetour(VehicleEntry vehicleEntry, int start, int end, double lateDiversionThreshold) {
private boolean violatesLateDiversionBetweenStopIndices(VehicleEntry vehicleEntry, int start, int end, double lateDiversionThreshold) {
for (int s = start; s < end; s++) {
Waypoint.Stop stop = vehicleEntry.stops.get(s);
if (!stop.task.getDropoffRequests().isEmpty()) {
Expand Down

0 comments on commit c81177c

Please sign in to comment.