Skip to content

Algorithm For Generating Trips

Gregory Presser edited this page Apr 18, 2022 · 1 revision

Trip Generation Algorithm

Steps:

  1. Calculate the Min trip length to straight from Start -> End Location
  2. Generate a Bounding box around the Trip. Where if you were to drive along the perimeter of the box upwards or downwards it would take approximately the desired time to complete the trip.
  3. Slice the bounding area into slices where driving across the box would take approximately one day to drive
  4. Select Y Stops from the Curated BigStops (see Big Stops) from each slice
  5. Iterate through all Y*Days stops and determine the effect (See Effect Calculation) of removing the trip against a max delta. If delta is worse than max delta (it makes the trip worse by more than max delta ) remove it.
  6. Repeat (5) Until the trip meets the time and tag constraints designed by the user.

Big Stops

This is a curated list of cities and big locations where people would generally center a trip around. We will select various stops between these locations and every Big stop can have a bunch of small stops Ex: A big stop could be NYC and its small stops would be The Statue of Liberty and Central Park

Effect Calculation

This will calculate the current tag weight of a trip (the percentage stop type for each type) and the trip length To calculate the delta the trip before status will be known then the trip status will be calculated again without it having a given stop

Clone this wiki locally