drone_cab.pickup¶
Pickup class.
This class implements the pickup points that store packages temporarily after being dropped off by a vehicle, until a drone picks them up for completion of their delivery.
Classes
|
Pickup points stroe packages after being dropped off by vehicles, until a drone picks them up. |
- class drone_cab.pickup.Pickup(pickup_center: tuple[float, float], pickup_capacity: int = 3)¶
Pickup points stroe packages after being dropped off by vehicles, until a drone picks them up.
- Parameters:
pickup_center (tuple[float, float]) – 2-D coordinates of the center of the pickup point polyon.
pickup_capacity (optional) – Maximum number of packages that this pikcup point can store. Defaults to tunable constant.
- center¶
2-D coordinates of the center of the pickup point polyon.
- capacity¶
Maximum number of packages that this pikcup point can store.
- id¶
SUMO ID of the pickup point.
- assigned_package_set¶
Packages expected to be delivered to this pickup point by vehicles.
- received_package_set¶
Packages currently being stored at this pickup point.
- drone¶
Drone object that services (sits at) this pickup point.
- nearest_edge_id¶
SUMO ID of the raod edge closest to this pickup point polygon.
- __init__(pickup_center: tuple[float, float], pickup_capacity: int = 3) None¶
- Parameters:
pickup_center (tuple[float, float])
pickup_capacity (int)
- Return type:
None
- add_package(package: Package) None¶
Add a package to this pickup point’s storage.
- Parameters:
package (Package) – Package object to add to this pickup point’s storage.
- Raises:
AssertionError – If addition of package would exceed capacity of this pickup point.
- Return type:
None
- assign_package(package: Package) None¶
Assign a package to this pickup point for storage after being dropped off by a vehicle.
- Parameters:
package (Package) – Package object to assign to this pickup point.
- Return type:
None
- static create_pickup_list() list[Pickup]¶
Produce pickup object list created with preset tunable pickup_center values.
- Returns:
List of pickup objects.
- Return type:
list[Pickup]
- init_tsp()¶
- step(int) bool¶
After adding a StepListener ‘listener’ with traci.addStepListener(listener), TraCI will call listener.step(t) after each call to traci.simulationStep(t) The return value indicates whether the stepListener wants to stay active.
- Parameters:
t (int)