bcgov / ols-devkit

Developer Tool Kit using the BC Address Geocoder, BC Route Planner and the Geomark Web Service
Apache License 2.0
6 stars 5 forks source link

Create a route optimizer demo app that uses the JavaScript route stop optimization library #54

Open mraross opened 7 years ago

mraross commented 7 years ago
  1. Use betweenPairs to get distances between stops in the route. Use same points in To and From parameters.

  2. Call the route stop optimization library to solve TSP in the browser. This keeps it interactive instead of batch on the server.

  3. To get a displayable route, request a route from the route planner for stops in the order given by the route stop optimization library.

Allow user to add/remove stops, using betweenPairs to get any new distances required. This will require two requests to route/distances/betweenPairs, one for forward distances (1 x N, N x 1). For example, given an initial route of from = {1,2,3,4} and to={1,2,3,4}, to add stop 5, make the following two betweenPairs request:


from={1,2,3,4}, to={5}
from={5}, to={1,2,3,4}
cmhodgson commented 7 years ago

Note this is just the UI integration of #35 into the demo app

mraross commented 7 years ago

Add a Multiple Stop Route tab. In this tab, display a text box that a user can paste a list of CSV addresses into. Add a Geocode button that geocodes the list, Also display radio buttons for Shortest distance and Fastest time.

Display an Find Optimal Route button.

After geocoding is complete, display a scrollable list of all addresses. Rejected addresses should be shown in strikethrough.

After geocoded address list is displayed, start optimization and display ongoing optimization status in the form of Iterations and minimum route value so far. For example:

Iterations: 10 Route Length: 1234 km

Update this status in place each iteration

When optimization is complete, display optimized route on map and directions in a scrolling list.

mraross commented 7 years ago

Here is a ballpark estimate on evolutionary TSP runtimes:

the running time of the algorithm was reasonable:
below 3 seconds for problems with up to 100 cities, below 10 seconds for the test case of 144
cities, below 40 seconds for the test case with 280 cities.

Source: https://pdfs.semanticscholar.org/9757/3990337a3a26e3947488210dddc9a8d29de2.pdf

mraross commented 7 years ago

Drop support for importing and geocoding a list of addresses. Users can enter addresses one at a time or add a bunch of random addresses in one go using the random address tab. Random addresses are good enough to show off the spectacular performance of the optimizer and the wisdom of the client-side architecture

cmhodgson commented 7 years ago

How do you envision the random addresses tab interacting with the route optimization tab (I assume that the TSP would be in it's own tab? or perhaps a checkbox under the multi-stop routing addresses that says "optimize order"?) You had specified a CSV export of the random addresses, do we instead or in addition want a "transfer to routing" or "transfer to route optimization" button(s), or should the random addresses not even be a separate tab but just an additional function on the main routing tab? Furthermore, I envision the main routing tab to work similar to google or others where each address is listed, if we are talking about more than a dozen (even a half-dozen) this gets to be unruly, how do you think the UI should look for this?