drone_cab.package

Package (or parcel) class.

This class implements the packages / parcels that need to be delivered to the residences that have requested them from the warehouse.

Classes

Package(destination_id)

Packages (or parcels) that get transported by cabs (vehicles) and drones.

class drone_cab.package.Package(destination_id: str)

Packages (or parcels) that get transported by cabs (vehicles) and drones.

Parameters:

destination_id (str) – SUMO ID of residence where this package needs to be delivered.

Note

self.center has to be named this way to be compatiple with drone.center for christofides_route()

destination_id

SUMO ID of destination residence.

center

2-D coordinates of the centroid of destination residence’s polygon.

assigned_pickup

Pickup object that this package has been assigned to.

reached_pickup

True if package has reached its assigned pickup point.

reached_destination

True if package has reached its destination residence.

distance_drone

Total distance by drone that this package has travelled.

distance_vehicle

Total distance by vehicle (cab) that this package has travelled.

__init__(destination_id: str) None
Parameters:

destination_id (str)

Return type:

None

mark_delivered(distance_drone: float)

Mark package as delivered to destination residence.

Parameters:

distance_drone (float)

set_pickup(pickup: Pickup) None

Set assigned pickup point for this package.

Parameters:

pickup (Pickup) – Pickup object that this package has been assigned to.

Return type:

None