Inspiration

We developed this project to address the 123Leaderboard challenge. Moreover, we considered the situation in terms of its real-world application and added extra features accordingly.

What it does

The project's user interface first prompts the trucker to enter their unique truck ID, at which point they receive a CO2 fuel emission for the path, the length of the trip, and the total time for the trip. The front end was built using flask, with Html, CSS and Javascript, with the use of a map from OpenStreetMap and leaflet.js.

The algorithm we developed was designed to tackle the specific problem presented. Firstly, a Map API was used to calculate the deadhead time and distance. This provided an accurate measure of the time and distance of the path since it considered real-world conditions, including but not limited to the path not being a straight line, traffic, road types, speed limits, and vehicle types. Moreover, the GraphHopper API was selected since it used the A* algorithm and Dijkstra's algorithm, thereby ensuring that an accurate path could be acquired with limited running time. Considering the context of the problem, wherein there are multiple trucks with multiple different paths, it was important that running time was kept low.

The project also recognized that different truckers have different priorities and thus provided truckers with the option to enter their specific preferences for profit, path length preference, and deadhead time. The algorithm took these inputted preferences and accordingly calculated the score for each truck and load combination. Furthermore, to ensure that each preference was given the correct weightage in the score calculation, the algorithm used advanced statistical normalization techniques to ensure that the base score for each factor that contributed to the score would fall in the -1 to 1, range. If the calculated score is above the threshold value set, then a notification is sent to the truck driver for that load. Furthermore, recognizing that not all threshold values are optimal, our algorithm uses a feedback loop to change the threshold value each time the code runs to ensure that each truck is receiving the right amount of notifications. We are currently refining and improving the feedback loop technique.

Some things that we intended to implement but could not due to time restraints, were a mute notification button (the trucker could be sleeping or resting), a picking up the package button (by removing a load from the system when a trucker indicates that they are going to pick it up), and changing score based on idle time (to ensure that as the time without a notification for a truck increases there is a higher chance of receiving a notification). Moreover, we wanted to use a priority queue for the loads relative to each truck to further optimize the algorithm since we could remove the top element in the priority queue after a certain period of time when no notifications were received.

How we built it

We used Python to code the backend and flask to code the front end.

Challenges we ran into

We had difficulties in standardizing the different scoring factors for each truck-load combination. To solve this problem we had to research and choose the most effective technique to normalize the different scoring factors. We considered the Sigmoid Function and Z-Score Normalization, but we eventually decided on using Min-max normalization. Furthermore, we developed our own unique statistical technique for standardizing the trip length preference.

Accomplishments that we're proud of

We are proud of completing such a large project with limited time and in using unique and innovative techniques to not only solve the problem but also go above what was expected.

What we learned

We learned that any coding project that is being developed requires a comprehensive approach that effectively and efficiently targets all the goals of the project. Furthermore, we realized the importance of statistical techniques when attempting to compare different things within a coding context.

What's next

We are looking forward to any opportunity that 123Loaderboard provides us to improve our algorithm or to tackle any other challenge they may have.

Built With

Share this project:

Updates