ensemble.control.tactical package¶
Submodules¶
ensemble.control.tactical.gapcordinator module¶
Platoon Gap Coordinator
This module details the implementation of the Front Gap
and Rear Gap
Coordinators existing in each one of the vehicles created when running a platoon. The coordinators have access to a centralized information center called Data Query
to retrieve information in the vecinity of the vehicle.
- class ensemble.control.tactical.gapcordinator.GlobalGapCoordinator(vehicle_registry: ensemble.component.vehiclelist.VehicleList)[source]¶
Bases:
ensemble.logic.subscriber.Subscriber
- add_gapcoordinator(vgc: ensemble.control.tactical.vehcoordinator.VehGapCoordinator)[source]¶
Adds a single gap coordinator to the list
- apply_cacc(time: float)[source]¶
This method intends to apply the cacc over all vehicles within the platoon at specific time step
- property cacc¶
Returns the operational controller object
- iter_group_link(downtoup=True, group=False)[source]¶
Iteratorator by link ordered from largest ttd towards smaller
- Parameters
downtoup (bool, optional) – Downstream to upstream. Defaults to True.
group (bool, optional) – Returns without grouping per platoon. Defaults to False.
- Yields
vgc (VehicleGapCoordinator) – Vehicle gap coordinator or iterable.
- property nplatoons: int¶
Return the number of created platoons
- pandas_print(columns: Iterable = []) pandas.core.frame.DataFrame [source]¶
Transforms vehicle list into a pandas for rendering purposes
- Returns
Returns a table with pandas data.
- Return type
df (DataFrame)
- release_gapcoordinator(vgc: ensemble.control.tactical.vehcoordinator.VehGapCoordinator)[source]¶
Releases a single gap coordinator from the node list
- update_leader(vgc: ensemble.control.tactical.vehcoordinator.VehGapCoordinator)[source]¶
Add or creates leader for a specific gap coordinator
ensemble.control.tactical.vehcoordinator module¶
Vehicle Gap Coordinator
This module details the implementation of the Front Gap
and Rear Gap
Coordinators existing in each one of the vehicles created when running a platoon. The coordinators have access to a centralized information center called Data Query
to retrieve information in the vecinity of the vehicle.
- class ensemble.control.tactical.vehcoordinator.VehGapCoordinator(vehicle: ensemble.component.platoon_vehicle.PlatoonVehicle)[source]¶
Bases:
ensemble.metaclass.coordinator.AbsSingleGapCoord
- property acceleration¶
Acceleration
- comv2x: bool = True¶
- property control¶
Ego current control
- property dv¶
Ego current differential speed
- property dx¶
Ego current headway space
- dx_ref: float = 30¶
- property ego_data¶
Operational leader control data
- evolve_control(control: ensemble.metaclass.controller.AbsController, time: float, time_step: float = 0.1)[source]¶
Considers a one chunk of step evolution of the operational control layer
- Parameters
control (AbsController) – Operational controller
- property follower¶
Returns the follower vehicle in the platoon
- property history_control¶
Historical control
- property history_reference¶
Historical control
- property history_state¶
Historical status
- init_reference()[source]¶
Initializes the reference class for the gap coordinator. In particular the initial conditions should be already computed.
- property intruder¶
Returns true when the vehtype of my immediate leader is not platoon
- property is_head¶
Determines if the vehicle is head of the platoon
- property is_tail¶
Determines if the vehicle is tail of the platoon
- property joinable¶
Checks if a vehicle is joinable
- property last_control¶
- property last_reference¶
- property last_state¶
- property leader: ensemble.metaclass.coordinator.AbsSingleGapCoord¶
Returns the leader vehicle in the platoon
- property leader_data¶
Operational leader control data
- platoon: bool = False¶
- platoonid: int = 0¶
- property positionid¶
Platoon id 0-index notation to denote position on the platoon
- property reference¶
- solve_state() Union[ensemble.logic.platoon_states.StandAlone, ensemble.logic.platoon_states.Platooning, ensemble.logic.platoon_states.Joining, ensemble.logic.platoon_states.Splitting] [source]¶
Logic solver for the platoon state machine.
- property speed¶
Speed
- status: Union[ensemble.logic.platoon_states.StandAlone, ensemble.logic.platoon_states.Platooning, ensemble.logic.platoon_states.Joining, ensemble.logic.platoon_states.Splitting] = StandAlone()¶
- property ttd¶
Total travel time
- property vehid¶
Vehicle positions
- property x¶
Ego current position in link