Skip to content

Commit

Permalink
fix: do not create ptOnly plan for only-inner-trips-plans
Browse files Browse the repository at this point in the history
  • Loading branch information
tschlenther committed Aug 29, 2023
1 parent 00dd447 commit 3559fee
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ static void prepareInputPlansForCarProhibitionWithPRLogic(Scenario scenario,

//create and add a plan, where all the trips to replace are NOT split up with P+R logic but are just replaced by a pt trip
if(extraPTPlan){
plansToAdd.add(createPTOnlyPlan(plan, enforceMassConservation, mainModeIdentifier, fac));
if(nrOfBorderCrossingCarTrips != 0){
// we have checked whether the plan contains only external trips, above. So if we have no border-crossing trips, here, the plan only consists of inner trips.
// if we have only inner trips, we do not want to create ptOnly plan because it will be the same as a pt plan (when pt is configured as replacing mode) and thus increase the chance of choosing pt naturally.
plansToAdd.add(createPTOnlyPlan(plan, enforceMassConservation, mainModeIdentifier, fac));
}
}

plan.setType(replacingMode);
Expand Down

0 comments on commit 3559fee

Please sign in to comment.