Skip to content

Commit

Permalink
Fix: Make pass-trough override transit-group-priority
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Jan 23, 2024
1 parent 77c8307 commit 31a621b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ private RaptorRequest<TripSchedule> doMap() {
builder.withMultiCriteria(mcBuilder -> {
var pt = preferences.transit();
var r = pt.raptor();
if (!pt.relaxTransitGroupPriority().isNormal()) {
mcBuilder.withTransitPriorityCalculator(TransitGroupPriority32n.priorityCalculator());
mcBuilder.withRelaxC1(mapRelaxCost(pt.relaxTransitGroupPriority()));
} else {

// Note! If a pass-through-point exists, then the transit-group-priority feature is disabled
if (!request.getPassThroughPoints().isEmpty()) {
mcBuilder.withPassThroughPoints(mapPassThroughPoints());
r.relaxGeneralizedCostAtDestination().ifPresent(mcBuilder::withRelaxCostAtDestination);
} else if (!pt.relaxTransitGroupPriority().isNormal()) {
mcBuilder.withTransitPriorityCalculator(TransitGroupPriority32n.priorityCalculator());
mcBuilder.withRelaxC1(mapRelaxCost(pt.relaxTransitGroupPriority()));
}
});

Expand Down

0 comments on commit 31a621b

Please sign in to comment.