Rounds travel and dwell offsets to integer seconds, clamps negative values to zero, and makes a stop pattern monotone with a forward pass.
Value
A list with integer vectors arrival and departure. Each
departure is its arrival plus its dwell, and each arrival is at least the
previous departure.
Details
Inputs must be finite numeric vectors of equal length. Values are
rounded with base::round() before negative values are clamped to zero.
For each stop, the returned arrival is the larger of its clamped travel
offset and the previous returned departure. This satisfies GTFS along-trip
monotonicity even when independently estimated offsets are out of order.