Skip to content

Commit

Permalink
Merge pull request #3470 from moia-oss/fixOfferAcceptor
Browse files Browse the repository at this point in the history
drt: add back in max ride time to offer acceptor
  • Loading branch information
nkuehnel authored Sep 11, 2024
2 parents eb688d4 + 1cff083 commit 7a610be
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public Optional<AcceptedDrtRequest> acceptDrtOffer(DrtRequest request, double de
.newBuilder()
.request(request)
.earliestStartTime(request.getEarliestStartTime())
.maxRideDuration(request.getMaxRideDuration())
.latestArrivalTime(Math.min(updatedLatestStartTime + request.getMaxRideDuration(), request.getLatestArrivalTime()))
.latestStartTime(updatedLatestStartTime).build());
.latestStartTime(updatedLatestStartTime)
.build());
}
}

0 comments on commit 7a610be

Please sign in to comment.