Skip to main content

Open Driver Waypoint Coordinator

Project description

Open Driver Waypoint Coordinator

Installation

This is a python3 library, so make sure to use pip for python3

python3 -m pip install ODWC

In your python project, include the library as follows:

import ODWC as odwc

Now, set your Google maps api key:

odwc.key = "<your key here>"

Usage

First, create a Coordinator (aka. router):

router = odwc.Coordinator(students, drivers)

The Coordinator constructor takes a list of students and a list of drivers. These are described in the Data Types section below.

Next, calculate the schedules.

schedules = router.calculate()

THis will return a dictionary with the names of the drivers as keys and their schedules as a list for the value.

A key with the name failed will also be returned. This may contain a list of Student objects (described below). These are the students that could not be automatically scheduled and require manual scheduling.

Data Types

These are the various types and formats that are used.

Student

Student is a class that contains info about each student. These are only returned. DO NOT pass them in to the Coordinator. They contain the following values:

pickup: str
dropoff: str
time: float

To convert the time to a human-readable time, use the floatToTime() function and pass in the time.

Student list

When passing in a list of students, use the following structure:

[
	{
	"pickup":"<address>",
	"dropoff":"<address>",
	"time":"<24 hour time>"
	},
	...
]

Here is an example:

[
	{
	"pickup":"525 Dundas St, London, ON N6B 1W5",
	"dropoff":"450 Dundas St, London, ON N6B 3K3",
	"time":"15:00"
	}
]

Driver list

Passing in a list of drivers works in a similar way.

[
	{
	"name":"<Unique name>",
	"location":"<Starting location of the car>"
	},
	...
]

Here is an example:

[
	{
	"name":"driver 1",
	"location":"600 Oxford St E, London, ON N5Y 3J1"
	}
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ODWC-1.0rc4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

ODWC-1.0rc4-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file ODWC-1.0rc4.tar.gz.

File metadata

  • Download URL: ODWC-1.0rc4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for ODWC-1.0rc4.tar.gz
Algorithm Hash digest
SHA256 2deb5e24a2ddc8e07c6a60297a1ae69a78f1a42c6a834e164547fa3ab182e149
MD5 c4a528e4253a8713ab418fdeed4297c4
BLAKE2b-256 7702caf1c0b30a4bac3a907a8b59ac1d4d2b94e65722129a098203a66919d065

See more details on using hashes here.

File details

Details for the file ODWC-1.0rc4-py3-none-any.whl.

File metadata

  • Download URL: ODWC-1.0rc4-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for ODWC-1.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 dd107eb8318310ea2930530863024946b97132e24356a1cac30eea7371aaaf65
MD5 7692de1e7d72fc2423275990c634499b
BLAKE2b-256 21c1ba0d61f7fc49957fe9a6e8412215473ea93af8f4c416c511475624208004

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page