pybtls.traffic.lfc.LaneFlowComposition#
- class LaneFlowComposition(lane_index, lane_dir, no_block=24, block_size=3600, tag='Now')[source]#
- Bases: - object- The LaneFlowComposition instance stores the data for creating a CLaneFlowComposition instance in C++. - The hourly flow, speed, and truck composition data for a lane. - Parameters:
- lane_index (int) – The index of the lane. 1-based global index. 
- lane_dir (Literal[1,2]) – - The direction of the lane. - 1 - vehicles drive from left to right. - 2 - vehicles drive from right to left. - Must be in the same coordinate system used when defining the bridge. 
- no_block (int, optional) – The number of blocks in a day. The default is 24. 
- block_size (int, optional) – The size of a block in seconds. The default is 3600. 
- tag (str, optional) – To tag the moment of the lane flow composition. The default is “Now”. 
 
 - Methods - Assign the required data to the lane for traffic generation. - Attributes - flow_assigned- lane_dir- lane_index- speed_assigned- tag- truck_composition_assigned- assign_lane_data(**kwargs)[source]#
- Assign the required data to the lane for traffic generation. - Keyword Arguments:
- hourly_truck_flow (list[float]) – The hourly truck flow data in veh/h. 
- hourly_car_flow (list[float]) – The hourly car flow data in veh/h. 
- hourly_car_percentage (list[float]) – The hourly car percentage data in percent. 
- hourly_speed_mean (list[float]) – The hourly mean speed data in dm/s. 
- hourly_speed_std (list[float]) – The hourly standard deviation of speed data in dm/s. 
- hourly_truck_composition (list[list[float]]) – The hourly truck composition data in percent. The list should only consist of four truck percentages. 
 
- Return type:
- None. 
 
 
