Update tracking for in route to hub

This commit is contained in:
derek.holloway
2026-01-15 10:16:38 -08:00
parent 929a836645
commit 02812eb804
6 changed files with 16 additions and 4 deletions
+4 -3
View File
@@ -26,6 +26,7 @@ class DeliveryObject:
class deliveryStatus(Enum):
NO_STATUS = 0
AT_THE_HUB = 1
IN_ROUTE = 2
DELIVERED = 3
IN_ROUTE_TO_HUB = 1
AT_THE_HUB = 2
IN_ROUTE = 3
DELIVERED = 4
BIN
View File
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.
+12 -1
View File
@@ -14,7 +14,10 @@ def main():
package_hash = DerekHashTable() # Init the hash table
for pkg in AssignmentData.packages: # Load the packages into the hash table
pkg.status = deliveryStatus.AT_THE_HUB
if "Delayed" in pkg.notes:
pkg.status = deliveryStatus.IN_ROUTE_TO_HUB
else:
pkg.status = deliveryStatus.AT_THE_HUB
package_hash.addItem(pkg.id, pkg)
truck1 = Truck("1") # Init truck 1 starting at 8:00
@@ -66,8 +69,16 @@ def main():
debounce2 = True
debounce3 = True
truck3LoadDebounce = True
arrivalDebounce = True
while True:
# check if packages have arrived to the hub
if arrivalDebounce and globalTime >= datetime.time(9, 5):
arrivalDebounce = False
for v in package_hash:
if v.status == deliveryStatus.IN_ROUTE_TO_HUB:
v.status = deliveryStatus.AT_THE_HUB
# check for pause time
if globalTime >= pauseTime:
pauseTime = UserUI.TimePrompt(globalTime, truck1, truck2, truck3, package_hash)