bcgov / bcgov/ols-devkit

Create a Trip Length Calculator

Open
#126 1 comment 0 reactions 0 assignees View on GitHub
enhancement medium priority trip list processor
Dominant language
No language data
Stars
7
Forks
6
Avg merge
1d 16h
Merged PRs (30d)
1

Description

tripLengthCalculator takes a list of one or more trips and returns the shortest time/distance of each one.

The trip list can specify multiple trips and each trip can have a sequence of two or more addresses.

The trip list has two required columns: addressString and tripName.

addressString is a physical address in Single Line Address Format.
tripName is the name of a given trip or is empty. When it is not empty, it means the address is the starting place of a new trip; When it is empty, the address is a stop along the way in an existing trip.

Here’s an example trip list containing three trips with one start and one stop each:

addressString,tripName
“375 2nd Ave, Campbell River, BC”,“11 -> 12”
“2137 Comox Ave, Comox, BC”,
“375 2nd Ave, Campbell River, BC”,“11 -> 14”
“49 School Rd, Alert Bay, BC”,
“13750 96th Ave, Surrey, BC”,” 13 -> 15”
“600 W 10th Ave,Vancouver, BC”,

The first address in the list is always treated as a new trip even if tripName is empty. You can add more columns (e.g., fromPlace, fromType, toPlace, toType) and they will be preserved on output.

This trip list format has the following advantages:

1. A trip can have more than one stop.
2. If tripName is empty for every address, the list is treated as a single trip which is what most users would expect.
3. The same list can be fed into the Address List Editor or batch geocoder for QA before the tripListProcessor sees it.

An alternative trip list input format is one trip per record with start and stops columns. The stops column contains one or more addresses separated by an address separator (e.g., "|"). It has the disadvantage that the list can't be fed into the ALE or batch geocoder.

The trip list output format contains a list of trips with the following schema:
tripName,driveTime,distance[, user-defined columns]

Trip List Processor Parameters

mode = fastest | shortest

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the tripLengthCalculator or tripListProcessor entry point and reviewing how the Address List Editor, batch geocoder, and BC Route Planner represent address lists. Confirm how multi-stop trips and the fastest/shortest modes fit existing interfaces. Done means accepting the specified trip-list schema and producing tripName, driveTime, distance, and preserved user-defined columns.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.