The goal of this project was to create a postal management system that could create and simulate routes to deliver packages. While the project currently does not allow for switching the package data being input, such an implementation would not be difficult.
The project takes the given package data and determines, based on the package addresses and delivery constraints, which truck should take the package, in which order it should be delivered, and updates the package status every step of the way.
This project was designed to improve the current postal delivery service of WGUPS by decreasing the total miles driven by all trucks under a combined mileage of 140 miles. This was to be met while also delivering all packages on time.
Project Documentation: Link to Project:
In order to set up and run the project, an IDE and necessary packages to run the current versions of Python are needed. Screenshots of the project are included in the documentation of the left.
This project appeared simple at first but ended up being quite complicated when it got down to it. The first difficulty that I ran into was the implementation of advanced classes. This first began when I was attempting to make my data structure which would house the package data. I decided to use a hash table for this and created a class that included all the aspects of a hash table. This included bucket logic for saving data to the table, as well as hash logic for retrieving/updating the information within the table.
I also made a class for the packages, which needed to include the functionality of simulating delivery. While the basic functions of a package class were pretty easy, when it got down to tracking the specific truck a package was on, whether it had been delivered yet, and if it had even left the delivery hub yet. Writing the functions to update and track that information made up the bulk of the package class.
Finally, once it came down the main algorithm, I was faced yet again with another wall. While simply building an algorithm to solve the wandering salesman problem is fairly simple, this project had more difficult requirements than that. On top of just optimizing the route to be under 140 miles, the packages each had individual due times, some packages had to be delivered on the same truck, and others needed addresses to be updated and hour before they were do.
These hefty requirements turned the project from something easy into a logical nightmare. The nearest-neighbor algorithm continuously needed to be adjusted. first, it determined if all packages that had to be delivered together were. Then it had to determine if all the package data was correct. It then had to optimize the routes with those constraints in a way such as to not go over the distance requirements.
In all, I learned that even simple sounding projects can contain very complex requirements under the surface, and that it is best to always be prepared for them.