init commit

This commit is contained in:
derek.holloway
2026-01-13 16:03:37 -08:00
parent 2841c55e14
commit 2301ac357e
9 changed files with 622 additions and 0 deletions
+138
View File
@@ -0,0 +1,138 @@
from DeliveryObject import DeliveryObject
# Names from the Data Tables provided
xyNames = [
"Western Governors University 4001 South 700 East, Salt Lake City, UT 84107",
"International Peace Gardens 1060 Dalton Ave S",
"Sugar House Park 1330 2100 S",
"Taylorsville-Bennion Heritage City Gov Off 1488 4800 S",
"Salt Lake City, Division of Health Services 177 W Price Ave",
"South Salt Lake Public Works 195 W Oakland Ave",
"Salt Lake City, Streets and Sanitation 2010 W 500 S",
"Deker Lake 2300 Parkway Blvd",
"Salt Lake City,Ottinger Hall 233 Canyon Rd",
"Columbus Library 2530 S 500 E",
"Taylorsville City Hall 2600 Taylorsville Blvd",
"South Salt Lake Police 2835 Main St",
"Council Hall 300 State St",
"Redwood Park 3060 Lester St",
"Salt Lake County Mental Health 3148 S 1100 W",
"Salt Lake County/United Police Dept 3365 S 900 W",
"West Valley Prosecutor 3575 W Valley Central Sta bus Loop",
"Housing Auth. of Salt Lake County 3595 Main St",
"Utah DMV Administrative Office 380 W 2880 S",
"Third District Juvenile Court 410 S State St",
"Cottonwood Regional Softball Complex 4300 S 1300 E",
"Holiday City Office 4580 S 2300 E",
"Murray City Museum 5025 State St",
"Valley Regional Softball Complex 5100 South 2700 West",
"City Center of Rock Springs 5383 South 900 East #104",
"Rice Terrace Pavilion Park 600 E 900 South",
"Wheeler Historic Farm 6351 South 900 East",
]
# Names from the Data Tables provided
xyNames2 = [
"HUB",
"1060 Dalton Ave S (84104)",
"1330 2100 S (84106)",
"1488 4800 S (84123)",
"177 W Price Ave (84115)",
"195 W Oakland Ave (84115)",
"2010 W 500 S (84104)",
"2300 Parkway Blvd (84119)",
"233 Canyon Rd (84103)",
"2530 S 500 E (84106)",
"2600 Taylorsville Blvd (84118)",
"2835 Main St (84115)",
"300 State St (84103)",
"3060 Lester St (84119)",
"3148 S 1100 W (84119)",
"3365 S 900 W (84119)",
"3575 W Valley Central Station bus Loop (84119)",
"3595 Main St (84115)",
"380 W 2880 S (84115)",
"410 S State St (84111)",
"4300 S 1300 E (84117)",
"4580 S 2300 E (84117)",
"5025 State St (84107)",
"5100 South 2700 West (84118)",
"5383 S 900 East #104 (84117)",
"600 E 900 South (84105)",
"6351 South 900 East (84121)"
]
# Data provided from assignment info
distanceChart = [
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[7.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[3.8, 7.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[11.0, 6.4, 9.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[2.2, 6.0, 4.4, 5.6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[3.5, 4.8, 2.8, 6.9, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[10.9, 1.6, 8.6, 8.6, 7.9, 6.3, 0.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0.0, 0.0, 0.0],
[2.4, 8.3, 6.1, 4.7, 2.5, 4.2, 10.0, 7.8, 7.8, 4.3, 4.1, 3.4, 7.8, 5.5, 4.6, 4.2, 9.4, 2.3, 3.9, 6.8, 2.9, 4.4, 0.0, 0.0, 0.0, 0.0],
[6.4, 6.9, 9.7, 0.6, 6.0, 9.0, 8.2, 4.2, 11.5, 7.8, 0.4, 6.9, 11.5, 4.4, 4.8, 5.6, 7.5, 5.5, 6.5, 11.4, 6.4, 7.9, 4.5, 0.0, 0.0, 0.0],
[2.4, 10.0, 6.1, 6.4, 4.2, 5.9, 11.7, 9.5, 9.5, 4.8, 4.9, 5.2, 9.5, 7.2, 6.3, 5.9, 11.1, 4.0, 5.6, 8.5, 2.8, 3.4, 1.7, 5.4, 0.0, 0.0],
[5.0, 4.4, 2.8, 10.1, 5.4, 3.5, 5.1, 6.2, 2.8, 3.2, 11.0, 3.7, 2.8, 6.4, 6.5, 5.7, 6.2, 5.1, 4.3, 1.8, 6.0, 7.9, 6.8, 10.6, 7.0, 0.0],
[3.6, 13.0, 7.4, 10.1, 5.5, 7.2, 14.2, 10.7, 14.1, 6.0, 6.8, 6.4, 14.1, 10.5, 8.8, 8.4, 13.6, 5.2, 6.9, 13.1, 4.1, 4.7, 3.1, 7.8, 1.3, 8.3]
]
# Data provided from assignment info [ wrapped in DeliveryObject's ]
packages = [
DeliveryObject(1, "195 W Oakland Ave", "Salt Lake City", "UT", 84115, "10:30 AM", 21),
DeliveryObject(2, "2530 S 500 E", "Salt Lake City", "UT", 84106, "EOD", 44),
DeliveryObject(3, "233 Canyon Rd", "Salt Lake City", "UT", 84103, "EOD", 2, "Can only be on truck 2"),
DeliveryObject(4, "380 W 2880 S", "Salt Lake City", "UT", 84115, "EOD", 4),
DeliveryObject(5, "410 S State St", "Salt Lake City", "UT", 84111, "EOD", 5),
DeliveryObject(6, "3060 Lester St", "West Valley City", "UT", 84119, "10:30 AM", 88, "Delayed on flight---will not arrive to depot until 9:05 am"),
DeliveryObject(7, "1330 2100 S", "Salt Lake City", "UT", 84106, "EOD", 8),
DeliveryObject(8, "300 State St", "Salt Lake City", "UT", 84103, "EOD", 9),
DeliveryObject(9, "300 State St", "Salt Lake City", "UT", 84103, "EOD", 2, "Wrong address listed"),
DeliveryObject(10, "600 E 900 South", "Salt Lake City", "UT", 84105, "EOD", 1),
DeliveryObject(11, "2600 Taylorsville Blvd", "Salt Lake City", "UT", 84118, "EOD", 1),
DeliveryObject(12, "3575 W Valley Central Station bus Loop", "West Valley City", "UT", 84119, "EOD", 1),
DeliveryObject(13, "2010 W 500 S", "Salt Lake City", "UT", 84104, "10:30 AM", 2),
DeliveryObject(14, "4300 S 1300 E", "Millcreek", "UT", 84117, "10:30 AM", 88, "Must be delivered with 15, 19"),
DeliveryObject(15, "4580 S 2300 E", "Holladay", "UT", 84117, "9:00 AM", 4),
DeliveryObject(16, "4580 S 2300 E", "Holladay", "UT", 84117, "10:30 AM", 88, "Must be delivered with 13, 19"),
DeliveryObject(17, "3148 S 1100 W", "Salt Lake City", "UT", 84119, "EOD", 2),
DeliveryObject(18, "1488 4800 S", "Salt Lake City", "UT", 84123, "EOD", 6, "Can only be on truck 2"),
DeliveryObject(19, "177 W Price Ave", "Salt Lake City", "UT", 84115, "EOD", 37),
DeliveryObject(20, "3595 Main St", "Salt Lake City", "UT", 84115, "10:30 AM", 37, "Must be delivered with 13, 15"),
DeliveryObject(21, "3595 Main St", "Salt Lake City", "UT", 84115, "EOD", 3),
DeliveryObject(22, "6351 South 900 East", "Murray", "UT", 84121, "EOD", 2),
DeliveryObject(23, "5100 South 2700 West", "Salt Lake City", "UT", 84118, "EOD", 5),
DeliveryObject(24, "5025 State St", "Murray", "UT", 84107, "EOD", 7),
DeliveryObject(25, "5383 South 900 East #104", "Salt Lake City", "UT", 84117, "10:30 AM", 7, "Delayed on flight---will not arrive to depot until 9:05 am"),
DeliveryObject(26, "5383 South 900 East #104", "Salt Lake City", "UT", 84117, "EOD", 25),
DeliveryObject(27, "1060 Dalton Ave S", "Salt Lake City", "UT", 84104, "EOD", 5),
DeliveryObject(28, "2835 Main St", "Salt Lake City", "UT", 84115, "EOD", 7, "Delayed on flight---will not arrive to depot until 9:05 am"),
DeliveryObject(29, "1330 2100 S", "Salt Lake City", "UT", 84106, "10:30 AM", 2),
DeliveryObject(30, "300 State St", "Salt Lake City", "UT", 84103, "10:30 AM", 1),
DeliveryObject(31, "3365 S 900 W", "Salt Lake City", "UT", 84119, "10:30 AM", 1),
DeliveryObject(32, "3365 S 900 W", "Salt Lake City", "UT", 84119, "EOD", 1, "Delayed on flight---will not arrive to depot until 9:05 am"),
DeliveryObject(33, "2530 S 500 E", "Salt Lake City", "UT", 84106, "EOD", 1),
DeliveryObject(34, "4580 S 2300 E", "Holladay", "UT", 84117, "10:30 AM", 2),
DeliveryObject(35, "1060 Dalton Ave S", "Salt Lake City", "UT", 84104, "EOD", 88),
DeliveryObject(36, "2300 Parkway Blvd", "West Valley City", "UT", 84119, "EOD", 88, "Can only be on truck 2"),
DeliveryObject(37, "410 S State St", "Salt Lake City", "UT", 84111, "10:30 AM", 2),
DeliveryObject(38, "410 S State St", "Salt Lake City", "UT", 84111, "EOD", 9, "Can only be on truck 2"),
DeliveryObject(39, "2010 W 500 S", "Salt Lake City", "UT", 84104, "EOD", 9),
DeliveryObject(40, "380 W 2880 S", "Salt Lake City", "UT", 84115, "10:30 AM", 45)
]