OnBoardDepartPatternHop onBoardDepartPatternHop = new OnBoardDepartPatternHop(
onboardDepartVertex, v12, firstTripPattern.scheduledTimetable.getTripTimes(0), serviceDay, 0, 0.5);
// Traverse the path forward first
RoutingRequest forwardOptions = options.clone();
RoutingContext forwardContext = new RoutingContext(forwardOptions, graph, v0, v60);
forwardContext.serviceDays = new ArrayList<ServiceDay>(1);
forwardContext.serviceDays.add(serviceDay);
forwardOptions.rctx = forwardContext;
forwardOptions.dateTime = 0L;
forwardOptions.bikeRentalPickupTime = 4;
forwardOptions.bikeRentalDropoffTime = 2;
e53.visibleTo = forwardContext;
// Forward traversal of all edges
State s0Forward = new State(forwardOptions);
State s2Forward = e1.traverse(s0Forward);
State s4Forward = e3.traverse(s2Forward);
State s6Forward = e5.traverse(s4Forward);
State s8Forward = e7.traverse(s6Forward);
State s10Forward = e9.traverse(s8Forward);
State s12Forward = e11.traverse(s10Forward);
State s14Forward = e13.traverse(s12Forward);
State s16Forward = e15.traverse(s14Forward);
State s18Forward = e17.traverse(s16Forward);
State s20Forward = e19.traverse(s18Forward);
State s22Forward = e21.traverse(s20Forward);
State s24Forward = e23.traverse(s22Forward);
State s26Forward = e25.traverse(s24Forward);
State s28Forward = e27.traverse(s26Forward);
State s30Forward = e29.traverse(s28Forward);
State s32Forward = e31.traverse(s30Forward);
State s34Forward = e33.traverse(s32Forward);
State s36Forward = e35.traverse(s34Forward);
State s38Forward = e37.traverse(s36Forward);
State s40Forward = e39.traverse(s38Forward);
State s42Forward = e41.traverse(s40Forward);
State s44Forward = e43.traverse(s42Forward);
State s46Forward = e45.traverse(s44Forward);
State s48Forward = e47.traverse(s46Forward);
State s50Forward = e49.traverse(s48Forward);
State s52Forward = e51.traverse(s50Forward);
State s54Forward = e53.traverse(s52Forward);
State s56Forward = e55.traverse(s54Forward);
State s58Forward = e57.traverse(s56Forward);
State s60Forward = e59.traverse(s58Forward);
// Also traverse the path backward
RoutingRequest backwardOptions = options.clone();
RoutingContext backwardContext = new RoutingContext(backwardOptions, graph, v60, v0);
backwardContext.serviceDays = new ArrayList<ServiceDay>(1);
backwardContext.serviceDays.add(serviceDay);
backwardOptions.rctx = backwardContext;
backwardOptions.dateTime = 60L;
backwardOptions.bikeRentalPickupTime = 4;
backwardOptions.bikeRentalDropoffTime = 2;
backwardOptions.setArriveBy(true);
e53.visibleTo = backwardContext;
// Backward traversal of all edges
State s60Backward = new State(backwardOptions);
State s58Backward = e59.traverse(s60Backward);
State s56Backward = e57.traverse(s58Backward);
State s54Backward = e55.traverse(s56Backward);
State s52Backward = e53.traverse(s54Backward);
State s50Backward = e51.traverse(s52Backward);
State s48Backward = e49.traverse(s50Backward);
State s46Backward = e47.traverse(s48Backward);
State s44Backward = e45.traverse(s46Backward);
State s42Backward = e43.traverse(s44Backward);
State s40Backward = e41.traverse(s42Backward);
State s38Backward = e39.traverse(s40Backward);
State s36Backward = e37.traverse(s38Backward);
State s34Backward = e35.traverse(s36Backward);
State s32Backward = e33.traverse(s34Backward);
State s30Backward = e31.traverse(s32Backward);
State s28Backward = e29.traverse(s30Backward);
State s26Backward = e27.traverse(s28Backward);
State s24Backward = e25.traverse(s26Backward);
State s22Backward = e23.traverse(s24Backward);
State s20Backward = e21.traverse(s22Backward);
State s18Backward = e19.traverse(s20Backward);
State s16Backward = e17.traverse(s18Backward);
State s14Backward = e15.traverse(s16Backward);
State s12Backward = e13.traverse(s14Backward);
State s10Backward = e11.traverse(s12Backward);
State s8Backward = e9.traverse(s10Backward);
State s6Backward = e7.traverse(s8Backward);
State s4Backward = e5.traverse(s6Backward);
State s2Backward = e3.traverse(s4Backward);
State s0Backward = e1.traverse(s2Backward);
// Perform a forward traversal starting onboard
RoutingRequest onboardOptions = options.clone();
RoutingContext onboardContext = new RoutingContext(onboardOptions, graph,
onboardDepartVertex, v60);
onboardContext.serviceDays = new ArrayList<ServiceDay>(1);
onboardContext.serviceDays.add(serviceDay);