Truck Routing Made Easier: Utilizing ChatGPT for Driver Break and Fuel Stop Optimization
In my discussions on People, Process, and Technology related to Transportation and Logistics, I have been spending a lot of time reviewing and utilizing ChatGPT. For those that were present at recent conferences, ChatGPT has been spoken about frequently. ChatGPT, or Generative Pretrained Transformer is a Natural Language Processing (NLP) platform that enables machines to understand and respond to human conversations.
While ChatGPT is one of the leading platforms for Natural Language Processing (NLP), there are other platforms in the market with similar capabilities. For instance, IBM Watson and Google Cloud's AutoML are also noteworthy NLP platforms, among others. However, currently, ChatGPT enjoys the most prominence and visibility in this domain.
I have been exploring the impact of ChatGPT on Transportation and Logistics and how it can affect our daily lives. It's important to approach this topic with an open mind and evaluate the various available user interfaces. Interested individuals can access the platform at www.openai.com, where they can find a free version and a ChatGPT Plus version that requires a monthly subscription fee. The Plus version offers access to ChatGPT 4.0, an advanced version with faster response times and superior output quality, in contrast to the ChatGPT 3.5 version, which is available in the free version. Another benefit of the Plus version is guaranteed accessibility to the solution, whereas the free version may be limited based on usage levels.
In my initial exercise, I focused on exploring how ChatGPT can aid in truck routing without relying on integrated mainstream technology solutions. My goal is to provide ChatGPT with variables to generate an expected output, similar to an API call or integration. I began by formulating the following query:
I received several responses to my query. Unfortunately, some of them were inaccurate. ChatGPT seemed to become confused in its routing and redirected the route through Limon, CO, for no apparent reason. Consequently, I had to dedicate a substantial amount of time to ensure that the simple City to City parameter functioned accurately.
I finally resolved a city-to-city query to function the following way:
I received this answer back to this query.
In general, this route is acceptable, with one exception - section 5, which directs the truck through Panguitch, UT. I spent additional time refining the query to eliminate this routing. During this process, I discovered a severe accident in the area, causing significant delays and forcing the system to reroute through Panguitch, UT. While it may not be advisable to dispatch a truck through this route under current conditions, it was interesting to observe how this incident impacted the system's routing decisions. This discovery helped explain the anomalies that were previously observed while attempting to optimize the route through Las Vegas.
I then removed traffic to my routing adjustments, and I began to see stability in my responses. My query at this point looks like this:
I’ve established some level of baseline for OTR truck routing now. My confidence level in the output of ChatGPT is at least to a point now that I know I’m getting something back that I can predict. Overall, one might ask what does this do for me and where does this get me? There are plenty of tools that do this today in a user experience that’s much better than what we’re looking at here. That statement is correct. However, my theory behind this article is that I can begin to throw variables behind it with little to no programmatic background and begin to get outputs that are otherwise difficult to produce today.
Let’s have it give us routing based on each day with ChatGPT defining where we should stop each day. After some adjustment, I’ve come up with the following query.
Which results in the following routing:
As my final addition to this exercise, I’ve decided to in hours of service to the query and ask it to add Diesel fuel pricing at the Truck Stop at the end of the day. This is the statement that does so.
This resulted in the following output.
I’m happy with this result outside of the diesel price isn’t accurate compared to the published price on the truck stop’s website. I’ve determined that since most of this data comes from the GasBuddy website, it likely will require additional work to streamline the information.
After working to get our query correct, we’ve supplied the following variables.
Origin Location (this also works with an address)
Destination Location
11 Hour Rule Remaining Hours
14 Hour Rule Remaining Hours
70 Hour Rule Remaining Hours
Truck Departure Day
ChatGPT can recognize variables as well. It can be provided datasets. There are also APIs available to build too. While this was a lengthy exercise overall, there are ways to streamline this process over time, so the output is much faster. Please keep in mind that most of the above answers were provided in ChatGPT 4.0. The previous version provided routing but fell short of combining some of the data together in a streamlined manner. I’ll continue to pursue use cases for how AI solutions will impact our daily lives as time goes on. I’ve already begun researching several other topics and look forward to seeing what further challenges I can solve.
Written by: Nate Johnson, President of GLCS, Inc.