plafosim.platooning_vehicle module
- class plafosim.platooning_vehicle.CF_Model(value)[source]
Bases:
Enum
Car Following models that vehicles can use for their mobility.
- ACC = 1
- CACC = 2
- HUMAN = 0
- class plafosim.platooning_vehicle.Dummy(owner: object, dummy: int = -1, **kw_args)[source]
Bases:
FormationAlgorithm
Dummy Platoon Formation Algorithm.
- __init__(owner: object, dummy: int = -1, **kw_args)[source]
Initialize an instance of this formation algorithm to be used in a vehicle or an infrastructure.
- Parameters:
owner (object) – The owning object that is execution this algorithm. This can be either a PlatooningVehicle or an Infrastructure.
dummy (int, optional) – The value for the dummy parameter
- classmethod add_parser_argument_group(parser: ArgumentParser) _ArgumentGroup [source]
Create and return specific argument group for this algorithm to use in global argument parser.
- Parameters:
parser (argparse.ArgumentParser) – The global argument parser
- Returns:
The specific argument group for this algorithm
- Return type:
argparse._ArgumentGroup
- do_formation()[source]
Run platoon formation algorithm to search for a platooning opportunity and perform the corresponding join maneuver.
- finish()[source]
Clean up the instance of the formation algorithm.
This includes mostly statistic recording.
- _abc_impl = <_abc_data object>
- property name
Print the name of the formation algorithm.
- class plafosim.platooning_vehicle.FormationAlgorithm(owner: object)[source]
Bases:
ABC
Abstract base class for any type of platoon formation algorithm (i.e., assignment calculation).
Implementing sub-classes need to override the do_formation() method.
- __init__(owner: object)[source]
Initialize an instance of a formation algorithm.
- Parameters:
owner (object) – The owning object that is execution this algorithm. This can be either a PlatooningVehicle or an Infrastructure.
- abstract add_parser_argument_group(parser: ArgumentParser) _ArgumentGroup [source]
Abstract method for performing any type of platoon formation (i.e., assignment calculation).
This methods needs to be overridden in implementing sub-classes.
- Returns:
The specific argument group for this algorithm.
- Return type:
argparse._ArgumentGroup
- abstract do_formation()[source]
Abstract method for performing any type of platoon formation (i.e., assignment calculation).
This methods needs to be overridden in implementing sub-classes.
- _abc_impl = <_abc_data object>
- property name
Print the name of the formation algorithm.
- class plafosim.platooning_vehicle.Platoon(platoon_id: int, formation: list, desired_speed: float)[source]
Bases:
object
A collection of parameters for a specific platoon.
- __init__(platoon_id: int, formation: list, desired_speed: float)[source]
Initialize a platoon instance.
- Parameters:
platoon_id (int) – The id of the platoon
formation (list) – The list of PlatooningVehicles within the platoon
desired_speed (float) – The platoon’s desired driving speed
- get_back(vehicle: PlatooningVehicle)[source]
Return the PlatooningVehicle in the back.
- Parameters:
vehicle (PlatooningVehicle) – The considered vehicle within the platoon.
- Returns:
PlatooningVehicle
- Return type:
The member in the back
- get_front(vehicle: PlatooningVehicle)[source]
Return the PlatooningVehicle in the front.
- Parameters:
vehicle (PlatooningVehicle) – The considered vehicle within the platoon.
- Returns:
PlatooningVehicle
- Return type:
The member in the front
- get_member_index(vehicle: PlatooningVehicle) int [source]
Return the index of a member within the platoon.
- Parameters:
vehicle (PlatooningVehicle) – The considered vehicle within the platoon.
- Returns:
int
- Return type:
The index of the member within the platoon
- update_desired_speed()[source]
Update the desired driving speed of the platoon.
This is based on the desired driving speed of all members.
- update_max_acceleration()[source]
Update the maximum acceleration of the platoon.
The maximum acceleration is based on the slowest vehicle within the platoon.
- update_max_deceleration()[source]
Update the maximum deceleration of the platoon.
The maximum deceleration is based on the slowest vehicle within the platoon.
- update_max_speed()[source]
Update the maximum speed of the platoon.
The maximum speed is based on the slowest vehicle within the platoon.
- property desired_speed: float
Return the desired driving speed of the platoon.
- property formation: list
Return the complete formation of the platoon.
- property lane: int
Return the current lane of the platoon.
- property last: PlatooningVehicle
Return the last PlatooningVehicle of the platoon.
- property leader: PlatooningVehicle
Return the leading PlatoonVehicle of the platoon.
- property length: float
Return the length of the platoon.
- property max_acceleration: float
Return the maximum acceleration of the platoon.
The maximum acceleration is based on the slowest vehicle within the platoon.
- property max_deceleration: float
Return the maximum deceleration of the platoon.
The maximum deceleration is based on the slowest vehicle within the platoon.
- property max_speed: float
Return the maximum speed of the platoon.
The maximum speed is based on the slowest vehicle within the platoon.
- property member_ids: list
Return the ids of all platoon members.
- property platoon_id: int
Return the id of the platoon.
- property position: int
Return the current position of the platoon.
- property rear_position: int
Return the current rear position of the platoon.
- property size: int
Return the size of the platoon.
- property speed: float
Return the current driving speed of the platoon.
- class plafosim.platooning_vehicle.PlatoonRole(value)[source]
Bases:
Enum
A collection of available platoon roles.
- FOLLOWER = 2
- JOINER = 3
- LEADER = 1
- LEAVER = 4
- NONE = 0
- class plafosim.platooning_vehicle.PlatooningVehicle(simulator: Simulator, vid: int, vehicle_type: VehicleType, depart_position: int, arrival_position: int, desired_speed: float, depart_lane: int, depart_speed: float, depart_time: float, depart_delay: float = 0, communication_range: int = 1000, acc_headway_time: float = 1.0, cacc_spacing: float = 5.0, formation_algorithm: str = None, execution_interval: int = 1, pre_filled: bool = False, **kw_args)[source]
Bases:
Vehicle
A vehicle that has platooning functionality.
- __init__(simulator: Simulator, vid: int, vehicle_type: VehicleType, depart_position: int, arrival_position: int, desired_speed: float, depart_lane: int, depart_speed: float, depart_time: float, depart_delay: float = 0, communication_range: int = 1000, acc_headway_time: float = 1.0, cacc_spacing: float = 5.0, formation_algorithm: str = None, execution_interval: int = 1, pre_filled: bool = False, **kw_args)[source]
Initialize a platooning vehicle instance.
- Parameters:
simulator (Simulator) – The global simulator object
vid (int) – The id of the vehicle
vehicle_type (VehicleType) – The vehicle type of the vehicle
depart_position (int) – The departure position of the vehicle
arrival_position (int) – The arrival position of the vehicle
desired_speed (float) – The desired driving speed of the vehicle
depart_lane (int) – The departure lane of the vehicle
depart_speed (float) – The departure speed of the vehicle
depart_time (float) – The actual departure time of the vehicle
depart_delay (float) – The time the vehicle had to wait before starting its trip
communication_range (int) – The maximum communication range of the vehicle
acc_headway_time (float) – The headway time for the ACC
cacc_spacing (float) – The constant spacing for the CACC
formation_algorithm (str) – The platoon formation algorithm to use
execution_interval (int) – The interval for executing the formation algorithm
pre_filled (bool) – Whether this vehicle was pre-filled
- _action(step: float)[source]
Triggers specific actions of a PlatooningVehicle.
- Parameters:
step (float) – The current simulation step
- _calculate_emission(a: float, v: float, f: list, scale: float) float [source]
Calculate the emitted pollutant amount using the given speed and acceleration.
- Parameters:
a (float) – The current acceleration
v (float) – The current speed
f (list) – The emission factors to use for current emission variable to be calculated
scale (float) – The scale to normalize the calculated value
- Returns:
float
- Return type:
The calculcated emission in ml/mg per s
- _calculate_emissions()
Calculate the emitted pollutant amount using the given speed and acceleration based on the HBEFA3 model.
As the functions are defining emissions in g/hour, the function’s result is normed by 3.6 (seconds in an hour/1000) yielding mg/s. For fuel ml/s is returned. Negative acceleration results directly in zero emission.
The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s]
- _get_available_platoons() list [source]
Return the available platoon candidates of the vehicle.
This imitates neighbor maintenance by using a neighbor table.
- Returns:
list(PlatooninVehicle)
- Return type:
The list of available platoons
- _join(platoon_id: int, leader_id: int)[source]
Lets a vehicle join a platoon.
Communication and fine-grained maneuver control is out-of-scope and thus omitted.
- Parameters:
platoon_id (int) – The id of the target platoon
leader_id (int) – The id of the leader of the target platoon
- _join_teleport(leader: PlatooningVehicle, last: PlatooningVehicle, new_position: float)[source]
Perform the actual teleporting of the join maneuver.
- Parameters:
leader (PlatooningVehicle) – The leader of the target platoon
last (PlatooningVehicle) – The last vehicle of the target platoon
new_position (float) – The new position for joining the target platoon
- _leave()[source]
Lets a vehicle leave a platoon.
Communication and fine-grained maneuver control is out-of-scope and thus omitted.
- _left_lane_blocked() bool [source]
Check whether a vehicle can move to the left lane in order to leave its current platoon.
- Returns:
bool
- Return type:
Whether the left lane is blocked
- _start()
Start this Vehicle.
- _teleport(new_position: float, new_lane: int, new_speed: float)[source]
Teleport a vehicle to a given position.
- Parameters:
new_position (float) – The new position
new_lane (int) – The new lane
new_speed (float) – The new speed
- action(step: int)
Triggers actions of a vehicle.
- Parameters:
step (int) – The current simulation step
- calculate_approaching_time(target_position: float, target_speed: float) float [source]
Calculate approximate time to approach the target position at target speed.
- Parameters:
target_position (float) – The target position to approach
target_speed (float) – The target speed after approaching
- Returns:
float
- Return type:
The calculated approaching time
- finish()[source]
Clean up the instance of the PlatooningVehicle.
This includes leaving the platoon and mostly statistics recording.
- get_front_gap() float [source]
Return the gap to the vehicle in the front.
This imitates a measurement of the front radar sensor.
- get_front_speed() float [source]
Return the speed to the vehicle in the front.
This imitates a measurement of the front radar sensor.
- is_in_platoon() bool [source]
Return whether the vehicle currently is in a platoon.
This is based on the current PlatoonRole. A joining or leaving vehicle is either not yet or still part of a platoon, thus the returned value should be true.
- property acc_headway_time: float
Return the ACC headway time of the vehicle.
- property arrival_position: int
Return the arrival position of the vehicle.
- property blocked_front: bool
Return whether the vehicle is currently blocked by a slow vehicle in the front.
- property color: tuple
Return the current color of the vehicle.
- property depart_lane: int
Return the departure lane of the vehicle.
- property depart_position: int
Return the departure position of the vehicle.
- property depart_speed: float
Return the departure speed of the vehicle.
- property depart_time: float
Return the departure time of the vehicle.
- property desired_gap: float
Return the desired gap of the vehicle.
This is based on the currently active car following model.
- property desired_headway_time: float
Return the desired headway time of the vehicle.
This is based on the currently active car following model.
- property desired_speed: float
Return the desired driving speed of the vehicle.
If the vehicle is in a platoon, it returns the desired driving speed of the entire platoon.
- property distance_in_platoon: float
Return the travelled distance within platoons.
- property headway_time: float
Return the human headway time of the vehicle.
This is based on the vehicle type.
- property in_maneuver: bool
Return whether the vehicle is currently in a maneuver.
- property lane: int
Return the current lane of the vehicle.
- property length: int
Return the length of the vehicle.
This is based on the vehicle type.
- property max_acceleration: float
Return the maximum acceleration of the vehicle.
This is based on the vehicle type.
- property max_deceleration: float
Return the maximum deceleration of the vehicle.
This is based on the vehicle type.
- property max_speed: float
Return the maximum speed of the vehicle.
This is based on the vehicle type.
- property min_gap: float
Return the minimum safety gap to the vehicle in front of the vehicle.
This is based on the vehicle type.
- property platoon_role: PlatoonRole
Return the current platoon role of the vehicle.
- property position: float
Return the current position of the vehicle.
- property rear_position: int
Return the current rear position of the vehicle.
- property speed: float
Return the current driving speed of the vehicle.
- property time_in_platoon: int
Return the travelled time within platoons.
- property travel_distance: float
Return the current traveled distance of the vehicle.
- property travel_time: float
Return the current traveled time of the vehicle.
- property vehicle_type: VehicleType
Return the VehicleType of the vehicle.
- property vid: int
Return the id of the vehicle.
- class plafosim.platooning_vehicle.SpeedPosition(owner: object, alpha: float = 0.5, speed_deviation_threshold: float = 0.2, position_deviation_threshold: int = 1000, formation_centralized_kind: str = 'greedy', solver_time_limit: int = 60, record_solver_traces: bool = False, record_infrastructure_assignments: bool = False, **kw_args)[source]
Bases:
FormationAlgorithm
Platoon Formation Algorithm based on Similarity, considering Speed and Position.
See papers
Julian Heinovski and Falko Dressler, “Where to Decide? Centralized vs. Distributed Vehicle Assignment for Platoon Formation,” arXiv, cs.MA, 2310.09580, October 2023. https://www.tkn.tu-berlin.de/bib/heinovski2023where-preprint/
and
Julian Heinovski and Falko Dressler, “Platoon Formation: Optimized Car to Platoon Assignment Strategies and Protocols,” Proceedings of 10th IEEE Vehicular Networking Conference (VNC 2018), Taipei, Taiwan, December 2018. https://www.tkn.tu-berlin.de/bib/heinovski2018platoon/
- __init__(owner: object, alpha: float = 0.5, speed_deviation_threshold: float = 0.2, position_deviation_threshold: int = 1000, formation_centralized_kind: str = 'greedy', solver_time_limit: int = 60, record_solver_traces: bool = False, record_infrastructure_assignments: bool = False, **kw_args)[source]
Initialize an instance of this formation algorithm to be used in a vehicle or an infrastructure.
- Parameters:
owner (object) – The owning object that is execution this algorithm. This can be either a PlatooningVehicle or an Infrastructure.
alpha (float) – The weighting factor alpha
speed_deviation_threshold (float) – The threshold for speed deviation
position_deviation_threshold (int) – The threshold for position deviation
formation_centralized_kind (str) – TODO
solver_time_limit (int) – The time limit in s to apply to the solver
record_solver_traces (bool) – Whether to record continuous solver traces
record_infrastructure_assignments (bool) – Whether to record infrastructure assignments
- _do_formation_centralized()[source]
Run centralized greedy formation approach.
This selects candidates and triggers join maneuvers.
- _do_formation_distributed()[source]
Run distributed greedy formation approach.
This selects a candidate and triggers a join maneuver.
- _do_formation_optimal()[source]
Run centralized optimal formation approach.
This selects candidates and triggers join maneuvers.
- _record_infrastructure_assignments(basename: str)[source]
Record infrastructure assignments.
- Parameters:
basename (str) – The basename of the result file
- classmethod add_parser_argument_group(parser: ArgumentParser) _ArgumentGroup [source]
Create and return specific argument group for this algorithm to use in global argument parser.
- Parameters:
parser (argparse.ArgumentParser) – The global argument parser
- Returns:
The specific argument group for this algorithm
- Return type:
argparse._ArgumentGroup
- cost_speed_position(ds: float, dp: float) float [source]
Return the overall cost (i.e., the weighted deviation) for a candidate.
- Parameters:
ds (float) – The deviation in speed
dp (int) – The deviation in position
- Returns:
The weighted relative deviation
- Return type:
float
- do_formation()[source]
Run platoon formation algorithms to search for a platooning opportunity and perform the corresponding join maneuver.
- dp(vehicle: PlatooningVehicle, platoon: Platoon) float [source]
Return the deviation in position from a given platoon.
NOTE: In the original version of the paper, the deviation calculated here was not normalized.
- Parameters:
vehicle (PlatooningVehicle) – The vehicle for which the deviation is calculated
platoon (Platoon) – The platoon to which the deviation is calculated
- Returns:
The relative deviation in position
- Return type:
float
- ds(vehicle: PlatooningVehicle, platoon: Platoon) float [source]
Return the deviation in speed from a given platoon.
NOTE: In the original version of the paper, the deviation calculated here was not normalized.
- Parameters:
vehicle (PlatooningVehicle) – The vehicle for which the deviation is calculated
platoon (Platoon) – The platoon to which the deviation is calculated
- Returns:
The relative deviation in speed
- Return type:
float
- finish()[source]
Clean up the instance of the formation algorithm.
This includes mostly statistic recording.
- _abc_impl = <_abc_data object>
- property name
Print the name of the formation algorithm.
- class plafosim.platooning_vehicle.Vehicle(simulator: Simulator, vid: int, vehicle_type: VehicleType, depart_position: int, arrival_position: int, desired_speed: float, depart_lane: int, depart_speed: float, depart_time: float, depart_delay: float, communication_range: int, pre_filled: bool = False)[source]
Bases:
object
A collection of state information for a vehicle in the simulation.
A vehicle can really be anything that can move and can be defined by a vehicle type. It does not necessarily be driven by a computer (i.e., autonomous). However, by default it does have V2X functionality.
- __init__(simulator: Simulator, vid: int, vehicle_type: VehicleType, depart_position: int, arrival_position: int, desired_speed: float, depart_lane: int, depart_speed: float, depart_time: float, depart_delay: float, communication_range: int, pre_filled: bool = False)[source]
Initialize a vehicle instance.
- Parameters:
simulator (Simulator) – The global simulator object
vid (int) – The id of the vehicle
vehicle_type (VehicleType) – The vehicle type of the vehicle
depart_position (int) – The departure position of the vehicle
arrival_position (int) – The arrival position of the vehicle
desired_speed (float) – The desired driving speed of the vehicle
depart_lane (int) – The departure lane of the vehicle
depart_speed (float) – The departure speed of the vehicle
depart_time (float) – The actual departure time of the vehicle
depart_delay (float) – The time the vehicle had to wait before starting its trip
communication_range (int) – The maximum communication range of the vehicle
pre_filled (bool) – Whether this vehicle was pre-filled
- _action(step: float)[source]
Triggers specific actions of a vehicle.
- Parameters:
step (float) – The current simulation step
- _calculate_emission(a: float, v: float, f: list, scale: float) float [source]
Calculate the actual emission of the vehicle.
- Parameters:
a (float) – The current acceleration
v (float) – The current speed
f (list) – The emission factors to use for current emission variable to be calculated
scale (float) – The scale to normalize the calculated value
- Returns:
float
- Return type:
The calculcated emission in ml/mg per s
- _calculate_emissions()[source]
Calculate the emitted pollutant amount using the given speed and acceleration based on the HBEFA3 model.
As the functions are defining emissions in g/hour, the function’s result is normed by 3.6 (seconds in an hour/1000) yielding mg/s. For fuel ml/s is returned. Negative acceleration results directly in zero emission.
The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s]
- action(step: int)[source]
Triggers actions of a vehicle.
- Parameters:
step (int) – The current simulation step
- property arrival_position: int
Return the arrival position of the vehicle.
- property blocked_front: bool
Return whether the vehicle is currently blocked by a slow vehicle in the front.
- property color: tuple
Return the current color of the vehicle.
- property depart_lane: int
Return the departure lane of the vehicle.
- property depart_position: int
Return the departure position of the vehicle.
- property depart_speed: float
Return the departure speed of the vehicle.
- property depart_time: float
Return the departure time of the vehicle.
- property desired_gap: float
Return the desired gap to the vehicle in front of the vehicle.
This is based on the desired headway time and the current driving speed.
- property desired_headway_time: float
Return the desired headway time of the vehicle.
- property desired_speed: float
Return the desired driving speed of the vehicle.
- property headway_time: float
Return the human headway time of the vehicle.
This is based on the vehicle type.
- property lane: int
Return the current lane of the vehicle.
- property length: int
Return the length of the vehicle.
This is based on the vehicle type.
- property max_acceleration: float
Return the maximum acceleration of the vehicle.
This is based on the vehicle type.
- property max_deceleration: float
Return the maximum deceleration of the vehicle.
This is based on the vehicle type.
- property max_speed: float
Return the maximum speed of the vehicle.
This is based on the vehicle type.
- property min_gap: float
Return the minimum safety gap to the vehicle in front of the vehicle.
This is based on the vehicle type.
- property position: float
Return the current position of the vehicle.
- property rear_position: int
Return the current rear position of the vehicle.
- property speed: float
Return the current driving speed of the vehicle.
- property travel_distance: float
Return the current traveled distance of the vehicle.
- property travel_time: float
Return the current traveled time of the vehicle.
- property vehicle_type: VehicleType
Return the VehicleType of the vehicle.
- property vid: int
Return the id of the vehicle.
- class plafosim.platooning_vehicle.VehicleType(name: str, length: int, max_speed: float, max_acceleration: float, max_deceleration: float, min_gap: float, headway_time: float, emission_class: str)[source]
Bases:
object
A collection of parameters for a concrete vehicle type.
- __init__(name: str, length: int, max_speed: float, max_acceleration: float, max_deceleration: float, min_gap: float, headway_time: float, emission_class: str)[source]
Initialize a specific vehicle type.
- Parameters:
name (str) – The name of the vehicle type
length (int) – The length of the vehicle type
max_speed (float) – The maximum speed of the vehicle type
max_acceleration (float) – The maximum acceleration of the vehicle type
max_deceleration (float) – The maximum deceleration of the vehicle type
min_gap (float) – The minimum safety gap to the vehicle in front of the vehicle type
headway_time (float) – The human headway time of the vehicle type
emission_class (EmissionClass) – The emission class of the vehicle type
- property emission_class: EmissionClass
Return the emission class of a vehicle type.
- property emission_factors: dict
Return the emission factors of a vehicle type.
- property headway_time: float
Return the desired human headway time of a vehicle type.
- property length: int
Return the length of a vehicle type.
- property max_acceleration: float
Return the maximum acceleration of a vehicle type.
- property max_deceleration: float
Return the maximum deceleration of a vehicle type.
- property max_speed: float
Return the maximum speed of a vehicle type.
- property min_gap: float
Return the minimum gap of a vehicle type.
- property name: str
Return the name of a vehicle type.
- plafosim.platooning_vehicle.attribute()
perf_counter() -> float
Performance counter for benchmarking.
- plafosim.platooning_vehicle.change_gui_vehicle_color(vid: int, color: tuple)[source]
Change the color of a vehicle in the GUI.
- Parameters:
vid (int) – The id of the vehicle to change
color (tuple) – The color (R, G, B) to use for the vehicle
- plafosim.platooning_vehicle.import_module(name, package=None)[source]
Import a module.
The ‘package’ argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import.
- plafosim.platooning_vehicle.is_gap_safe(front_position: float, front_speed: float, front_max_deceleration: float, front_length: float, back_position: float, back_speed: float, back_max_acceleration: float, back_min_gap: float, step_length: float) bool [source]
Return whether the gap between the front and back vehicle is safe.
Safe means: - the front vehicle can decelerate as hard as possible for one step - the back vehicle can accelerate as hard as possible for one step - the vehicle will not crash
Assumes euclidean/non-ballistic position updates.
- Parameters:
front_position (float) – The position of the front vehicle in m
front_speed (float) – The speed of the front vehicle in m/s
front_max_deceleration (float) – The maximum deceleration of the front vehicle in m/s2
front_length (length) – The length of the front vehicle in m
back_position (float) – The position of the back vehicle in m
back_speed (float) – The speed of the back vehicle in m/s
back_max_acceleration (float) – The maximum acceleration of the back vehicle in m/s2
back_min_gap (float) – The minimum gap of the back vehicle in m
step_length (float) – The length of a simulation step in s
- Returns:
bool
- Return type:
Whether the gap between the two vehicles is safe
- plafosim.platooning_vehicle.isclass(object)[source]
Return true if the object is a class.
- Class objects provide these attributes:
__doc__ documentation string __module__ name of module in which this class was defined
- plafosim.platooning_vehicle.iter_modules(path=None, prefix='')[source]
Yields ModuleInfo for all submodules on path, or, if path is None, all top-level modules on sys.path.
‘path’ should be either None or a list of paths to look for modules in.
‘prefix’ is a string to output on the front of every module name on output.
- plafosim.platooning_vehicle.record_platoon_formation(basename: str, vehicle: PlatooningVehicle, candidates_found_avg: float, candidates_found_individual_avg: float, candidates_found_platoon_avg: float, candidates_filtered_avg: float)[source]
- plafosim.platooning_vehicle.record_platoon_trace(basename: str, step: float, vehicle: PlatooningVehicle)[source]
- plafosim.platooning_vehicle.record_platoon_trip(basename: str, vehicle: PlatooningVehicle, platoon_time_ratio: float, platoon_distance_ratio: float, time_until_first_platoon: float, distance_until_first_platoon: float)[source]
- plafosim.platooning_vehicle.record_vehicle_change(basename: str, step: float, vid: int, position: float, speed: float, source_lane: int, target_lane: int, reason: str)[source]
- plafosim.platooning_vehicle.record_vehicle_platoon_maneuvers(basename: str, vehicle: PlatooningVehicle)[source]
- plafosim.platooning_vehicle.record_vehicle_platoon_trace(basename: str, step: float, vehicle: PlatooningVehicle)[source]