Package casa.lepton.walk
Interface BusJourney.PauseDurationGenerator
- Enclosing class:
- BusJourney
public static interface BusJourney.PauseDurationGenerator
Interface that defines a pause duration generator to calculate pause
durations at each stop node.
-
Method Summary
Modifier and TypeMethodDescriptionlong
pathPauseDuration
(int nbStops) Give the sum of the pauses durations at all the stops of a path.long
stopPauseDuration
(int nbStops) Give the pause duration at a stop.
-
Method Details
-
pathPauseDuration
long pathPauseDuration(int nbStops) Give the sum of the pauses durations at all the stops of a path. A path is a journey between two bus stops having fixed arrival times, crossing intermediate stops. This duration is used to evaluate the speed of the bus between each stop in order to arrive at the end of the path at a fixed time. It is called at each bus stop. It can be reevaluated- Parameters:
nbStops
- the number of stops in the path (the last stop excluded)- Returns:
- the total duration of the pauses in the path
-
stopPauseDuration
long stopPauseDuration(int nbStops) Give the pause duration at a stop. This stop is either the first bus stop in a path or an intermediate bus stop.- Parameters:
nbStops
- the number of stops that remain in the path (this stop included)- Returns:
- the pause duration at the stop
-