Skip to content

A python module that calculates delivery routes and displays them in Google Maps.

License

Notifications You must be signed in to change notification settings

herrsmitty8128/DeliveryLogistics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeliveryLogistics

A python module that calculates efficient delivery routes and displays them in Google Maps so you can review, edit, print, and share them with delivery truck drivers.

License

DeliveryLogistics is licensed under the Apache License. Version 2.0, January 2004. Please see the attched LICENSE.txt file.

Installation

The first step to installing and running DeliveryLogistics is to be sure that Python 3 is installed on your computer. If you are planning to use this program on your work computer, then please consult your system administrator or IT department for assistance installing Python 3.

To determine if Python 3 is already installed on your computer, open a command line terminal, type the following, and press Enter:

python3 --version

If Python 3 is already installed then you will see the following displayed (the actual numbers may be different, depending upon the version of Python that is installed on your computer):

Python 3.10.6

Otherwise, please proceed to https://www.python.org/downloads/ to download a copy of Python 3 and obtain installation instructions for Python.

Once Python is installed on your computer you can download DeliveryLogistics by navitating to this repository https://github.com/herrsmitty8128/DeliveryLogistics, clicking on the green Code drop-down menu, and then clicking on Download Zip.

How to download DeliveryLogistics

Then download the zip file to a local directory of your choosing, where you should then extract everything in the zip file. Once the files are extracted and Python 3 is installed. You should proceed to the Dependencies section below.

Dependencies

Most of the Python modules required by DeliveryLogistics are included with Python. However, there is a short list of exceptions below:

These modules must be installed to use DeliveryLogistics. You can install these packages by opening a command line terminal, typing the following command, and pressing Enter:

python3 -m pip install numpy googlemaps

On Linux, if you are not logged in as a root user then be sure to prepend the commands above with sudo.

Instructions for use

DeliveryLogistics is designed to be used in one of two ways:

  1. Obtain distances and drive times from the Google Maps API and calculate efficient routes.
  2. Recalculate drive times from a previously saved file.

Step 1: Obtain a Google API Key.

DeliveryLogistics uses Google Maps to obtain the driving time between every combination of delivery location and distribution center(s). In order for the program to access the Google Maps API online, you must give it your Google Maps API Key. If you do not already have one, then you can obtain one here https://developers.google.com/maps/documentation/javascript/get-api-key.

Step 2: Make a list of customer orders in CSV file format.

In order to calculate efficient delivery routes, DeliveryLogistics must know the full address and number of packages for each customer. This information is provided to the program at run-time through the use of a file in CSV format. The CSV file must contain all of the following fields:

  • "address": The customer's full delivery address. The address must be surrounded by quotation marks.
  • "bags": The number of packages to deliver to the customer's address. Quotation marks are not needed.

An example of a properly formated CSV file is below. Most popular spreadsheet applications support CSV format and can be used to create the file.

address,bags
"123 Main Street, City Name, State 12345", 15
"321 Maple Lane, City Name, State 09384", 5
"4321 My Street, City Name, State 54321", 9

Releases

No releases published

Packages

 
 
 

Languages