Skip to content

Optimal route to ride every state avenue in DC: RPP optimization with OSM visualization

License

Notifications You must be signed in to change notification settings

brooksandrew/postman_problems_examples

Repository files navigation

Summary

Side projects solving applications of the Rural Postman Problem using the postman_problems library. Current examples leverage OSM (Open Street Maps) for building, optimizing and visualizing graphs. Examples include:

  1. 50 States Ride: Required edges are the state named avenues in DC. Optional edges are all others roads and trails. Many more details in the accompanying blog post here.

  2. Sleeping Giant: Required edges are the named trails in Sleeping Giant State Park (see Giant master program). Optional edges are the non-required trails and roads. More examples in the accompanying blog post here.

1. 50 States Ride

Graph

Derived from Open Street Maps data. Edges are contracted to ease computation. There are ~400 required edges in the final edgelist.

  • required state avenues: 112 miles
  • connectors between required components: 12 miles

Solution

The optimal route covers 160 miles: 124 miles of required road and 36 miles of optional roads and doublebacking.

See the blog post for more visualizations and details on the approach.

Here is the route (geojson map).

Here is the solution edgelist CSV with lat and lon and street names.

pic

Contents

  • 50states/50states-blogpost.ipynb: notebook solving and visualizing the problem
  • 50states/rpp_solution.csv: eulerian circuit solution solution to RPP

2. Sleeping Giant

Graph

For more details on the Sleeping Giant problem and graph, check out the blog post here.

Solution

The optimal route covers 30.7 miles: 25.6 of required trails and 5.1 miles of optional trails and doublebacking.

pic

Project

Contents

  • environment.yml: environment used to produce 50states-blogpost.ipynb.
  • graph.py: module consolidating heavy lifting for blog post

Resources

About

Optimal route to ride every state avenue in DC: RPP optimization with OSM visualization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages