Google Maps API - Union University

6 downloads 129 Views 121KB Size Report
Google Maps API. Papa John's Delivery. Kevin McDaniel. Union University – Scholarship Symposium. Computer Science. May 1, 2006 ...
Google Maps API Papa John’s Delivery Kevin McDaniel Union University – Scholarship Symposium Computer Science May 1, 2006

The Need   Outdated

paper map   Wasted time locating street   Drawing attention away from manager   Eliminate overlapping assignment of deliveries

The Solution   A

Geographic Information System (GIS)

 Google

Maps API  ArcView GIS  Yahoo Maps

Google Maps API   Application

Programming Interface (API)   Free to use with an agreement   Javascript


Calling My Geocode SELECT StreetNumber.*, Street.*, House.* FROM StreetNumber, Street, House WHERE StreetNumber.StreetName = Street.StreetName AND StreetNumber.StreetNumber = House.StreetNumber ORDER BY StreetNumber.StreetID

Setting Coordinate Variables

Displaying Coordinates on Map for(i=1; i 1) Allow 3 deliveries If (Ratio = 1) Allow 2 deliveries Else Assign 1

Rule #2 (Distance between Deliveries) Distance is calculated from geographical coordinates. (“Bird Miles”) If (Dist < .75 mi) Allow 3 If (Dist < 1 mi) Allow 2 Else Assign 1

Rule #3 Time span If (Time span < 10) Allow 3 If (Time span < 10) && (Time span > 6) Allow 2 Else Allow 1

Assignment Table #1 3 3 3 2 2 2 1

#2 3 3 2 2 2 1 1

#3 3 2 2 2 1 1 1

Assigned 3 2 2 2 1 1 1

If (Rule #1 > 1) . If (Rule #2 < .75 mi) . . If (Rule #3 < 10 min) . . . Assign 3 deliveries to top driver . . else if (Rule #3 < 10 && > 6min) . . . Assign 2 deliveries to top driver . . else . . Assign 1 delivery . If (Rule #2 < 1 mi) . . if (Rule #3 < 10 && > 6 min) . . . Assign 2 deliveries . . else . . Assign 1 . else . Assign 1 . If (Rule#1 = 1) . If (Rule #2 < 1 mi) . . if (Rule #3 < 10 && > 6 min) . . . Assign 2 deliveries . . else . . Assign 1 . else . Assign 1 . else Assign 1