Delivery Route Generator

  • View Source
    • Screenshots of the program can be found here

delivery route program preview

About

  • This is my project submission for Data structures and algorithms course at WGU
  • It is a python program that calculates an optimal delivery route for the packages using Nearest Neighbor algorithm

Tech stack

  • Python

We were restricted to using only Python for this program. No 3rd party packages or libraries were allowed. As such, the program mainly runs in the command line

Features

  • Parse address, distance, and package data
  • Generate delivery route for packages that meets distance and time limitations
  • View delivery times for each package
  • View distance traveled for each driver

Challenges

This project required us to create a program that generates a delivery route for a list of packages while following time and distance constraints such as keeping the distanced traveled below a certain threshold.

We also had to follow other requirements, such as implementing our own custom hashmap and creating a user friendly menu system.

My first challenge was figuring out how to process the various data files we were given that consisted of addresses, packages, and distances. This required me to extract, transform, and clean data from multiple sources so that it could be used by the application to generate an optimal delivery route.

Another challenge was keeping the code organized and well structured. There were lots of moving parts in this project such as the menu system, delivery generation algorithm, data extractor, etc. In order to keep things clean and understandable, I took the time to organize and structure my code.

Lessons learned

I learned a great deal regarding greedy algorithms and hash maps as these were the focal points of the project. I also learned how to process CSV data with python.