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.

ChatGPT-transportation-logistics-technology-IT-consultants-Minneapolis

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:

Route a class 8 driver from Los Angeles, CA to Denver, CO.

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:

Route a class 8 truck from Los Angeles, CA 90001 to Denver, CO 80201. Utilize freeways and the shortest route. List the nearest city and the distance traveled until the next turn on each turn. List the total miles as a header.

I received this answer back to this query.

Total Miles: Approximately 1,015 miles
Here's a suggested route for a class 8 truck from Los Angeles, CA 90001 to Denver, CO 80201 using freeways and taking the shortest route, with the nearest city and distance traveled until the next turn:

  1. Begin at Los Angeles, CA 90001.
  2. Take I-10 East toward San Bernardino (nearest city: Los Angeles) - about 58 miles.
  3. Merge onto I-15 North toward Barstow/Las Vegas (nearest city: San Bernardino) - about 180 miles.
  4. Continue on I-15 North until you reach exit 58 in Utah for UT-20 East toward Panguitch (nearest city: Cedar City) - about 200 miles.
  5. Take UT-20 East to US-89 North (nearest city: Panguitch) - about 20 miles.
  6. Follow US-89 North and then merge onto I-70 East toward Grand Junction (nearest city: Salina) - about 170 miles.
  7. Continue on I-70 East across the Colorado state line and through the Rocky Mountains (nearest city: Grand Junction) - about 387 miles.
  8. Arrive at Denver, CO 80201.

Please note that this route is subject to change due to traffic, weather conditions, or road closures. Always consult a GPS or mapping service for the most up-to-date routing information.

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:

Route a class 8 truck from Los Angeles, CA 90001 to Denver, CO 80201. Do not use traffic to adjust routing. Utilize interstates as a priority and the shortest route. List the nearest city and the distance traveled until the next turn on each turn. List the total miles as a header.

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.

Route a class 8 truck from Los Angeles, CA 90001 to Denver, CO 80201 considering class 8 drivers hours of service. Use as much of the 11 hours driving as possible before stopping for the day. Do not use traffic to adjust routing. Utilize interstates as a priority and the shortest route. List the total miles as a header. The average speed of the truck is 55 miles per hour. The truck leaves on Monday. List days as days of the week. Find a truck stop at the end of each day to park at and list the address. Label the truck stop location as End Of Date Stop. This location must have Diesel Fuel.

Which results in the following routing:

Total miles: 1,016 miles
Day 1: Monday

  • Depart from Los Angeles, CA 90001
  • Take I-10 East towards San Bernardino
  • Continue onto I-15 North towards Las Vegas, NV
  • Drive approximately 545 miles (9 hours 55 minutes of driving)

End Of Day Stop: Whiskey Pete's Truck Stop

  • 100 W Primm Blvd, Jean, NV 89019
  • Diesel fuel available

Day 2: Tuesday

  • Continue on I-15 North towards St. George, UT
  • Take I-70 East towards Denver, CO
  • Drive approximately 471 miles (8 hours 35 minutes of driving)

Arrival: Denver, CO 80201

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.

Route a class 8 truck from Los Angeles, CA 90001 to Denver, CO 80201 considering class 8 drivers hours of service. Use as much of the 11 hours driving as possible before stopping for the day. The driver has 4 hours left to drive today and 64 hours left on their 70 hour rule and 4 hours left on their 14 hour rule. Do not use traffic to adjust routing. Utilize interstates as a priority and the shortest route. List the total miles as a header. The average speed of the truck is 55 miles per hour. The truck leaves on Monday. List days as days of the week. Below the day state the 70 hour recap. Find a truck stop at the end of each day to park at and list the address. Label the truck stop location as End Of Date Stop. This location must have Diesel Fuel. List total miles, driving hours as a footer. add in diesel fuel cost at each end of day stop.

This resulted in the following output.

Please note that diesel fuel prices change frequently and may vary depending on the location. The prices provided below are approximate and for reference purposes only.

Total Miles: 1,016 miles

Day 1: Monday 70-hour rule: 64 hours left
End of Day Stop: Barstow Travel Center 2930 Lenwood Rd, Barstow, CA 92311 Diesel Fuel: Available Approximate Diesel Fuel Price: $4.00 per gallon

Day 2: Tuesday 70-hour rule: 60 hours left
End of Day Stop: TA Express - Richfield 1020 UT-118, Richfield, UT 84701 Diesel Fuel: Available Approximate Diesel Fuel Price: $3.80 per gallon

Day 3: Wednesday 70-hour rule: 49 hours left
Destination: Denver, CO 80201

    Route:
  1. Start at Los Angeles, CA 90001
  2. Take I-10 E toward San Bernardino
  3. Merge onto I-15 N toward Barstow/Las Vegas
  4. Drive 4 hours (220 miles) and stop for the day at Barstow Travel Center in Barstow, CA
  5. On Day 2, continue on I-15 N
  6. Merge onto I-70 E toward Richfield/Salt Lake City
  7. Drive 11 hours (605 miles) and stop for the day at TA Express - Richfield in Richfield, UT
  8. On Day 3, continue on I-70 E
  9. Drive 7 hours (385 miles) to reach Denver, CO 80201

Total Driving Hours: 22 hours

Please note that the total driving time and hours may slightly vary depending on breaks, fuel stops, and other factors. Additionally, the diesel fuel prices provided are only estimates and may not accurately reflect the current prices at the time of your trip.

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.