best_length_diff: Time difference between 3 different travels

Description Usage Arguments Value Examples

Description

This function calculates the difference between the current travel and the best travel. It considers that the function best_travel has already been used to calculate the best_travel.

Usage

1
best_length_diff(prev_travel, curr_travel, next_travel, best_travel)

Arguments

prev_travel

length of the previous travel in minutes

curr_travel

length of the current travel in minutes

next_travel

length of the next travel in minutes

best_travel

best travel -1 or 0 or 1

Value

This function returns the difference between the current travel and the minimum of the 3 different travels.

Examples

1
2
3
best_length_diff(20,30,45,-1)
best_length_diff(35,30,25,1)
best_length_diff(35,30,31,0)

analytics-ufcg/bestBus documentation built on May 12, 2019, 2:38 a.m.