Browse Source

init commit2

ZihaoYANG 1 year ago
parent
commit
44c04eed5e
100 changed files with 37024 additions and 0 deletions
  1. 1304 0
      comfort.py
  2. 355 0
      common.py
  3. 957 0
      compliance.py
  4. 1028 0
      config/config.json
  5. 1212 0
      config/config0328-2.json
  6. 750 0
      config/config0328.json
  7. 1152 0
      config/config0408.json
  8. 1213 0
      config/config0410.json
  9. 1200 0
      config/config0415.json
  10. 0 0
      config/config0513.json
  11. 1248 0
      config/config0530-2.json
  12. 1152 0
      config/config0530-3.json
  13. 1176 0
      config/config0530.json
  14. 1152 0
      config/config0531.json
  15. 1152 0
      config/config0612_ica+lka.json
  16. 1 0
      config/config_0416.json
  17. 0 0
      config/config_0510.json
  18. 214 0
      config/config_ica.json
  19. 1196 0
      config/config_ica_0730.json
  20. 0 0
      config/config_lka_0722.json
  21. 0 0
      config/config_lka_0730.json
  22. 993 0
      configDuplicate/EgoState.csv
  23. 64 0
      configDuplicate/config_duplicate.py
  24. 70 0
      configDuplicate/config_duplicate_1.py
  25. 86 0
      configDuplicate/config_duplicate_2.py
  26. 1027 0
      configDuplicate/jsonFiles/config1.json
  27. 1027 0
      configDuplicate/jsonFiles/config2.json
  28. 1027 0
      configDuplicate/output-2.json
  29. 754 0
      configDuplicate/output.json
  30. 36 0
      configDuplicate/output.txt
  31. 994 0
      configDuplicate/output1.json
  32. 1027 0
      config_merge/config0.json
  33. 984 0
      config_merge/config1.json
  34. 987 0
      config_merge/config2.json
  35. 1027 0
      config_merge/config3.json
  36. 71 0
      config_merge/config_merge.py
  37. 1027 0
      config_merge/output.json
  38. 1027 0
      config_merge/output0123.json
  39. 1027 0
      config_merge/output123.json
  40. 604 0
      config_parser.py
  41. 78 0
      constant_config_parse/constant.ini
  42. 38 0
      constant_config_parse/constant_config.py
  43. 21 0
      custom/center_distance_expectation.json
  44. 140 0
      custom/center_distance_expectation.py
  45. 21 0
      custom/center_distance_max.json
  46. 139 0
      custom/center_distance_max.py
  47. 21 0
      custom/center_distance_min.json
  48. 137 0
      custom/center_distance_min.py
  49. 21 0
      custom/center_distance_standard_deviation.json
  50. 136 0
      custom/center_distance_standard_deviation.py
  51. BIN
      custom/cicv_ICA_lateral_control/2024-06-24_16-15.png
  52. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control01_distance_nearby_lane.json
  53. 161 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control01_distance_nearby_lane.py
  54. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control02_lateral_offset.json
  55. 164 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control02_lateral_offset.py
  56. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control03_relative_center_distance_expectation.json
  57. 158 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control03_relative_center_distance_expectation.py
  58. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control04_relative_center_distance_standard_deviation.json
  59. 155 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control04_relative_center_distance_standard_deviation.py
  60. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control05_absolute_center_distance_expectation.json
  61. 161 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control05_absolute_center_distance_expectation.py
  62. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control06_absolute_center_distance_standard_deviation.json
  63. 158 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control06_absolute_center_distance_standard_deviation.py
  64. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control07_center_distance_max.json
  65. 160 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control07_center_distance_max.py
  66. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control08_center_distance_min.json
  67. 160 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control08_center_distance_min.py
  68. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control09_absolute_position_oscillation_frequency.json
  69. 179 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control09_absolute_position_oscillation_frequency.py
  70. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control10_absolute_position_oscillation_difference.json
  71. 211 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control10_absolute_position_oscillation_difference.py
  72. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control11_heading_deviation_max.json
  73. 164 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control11_heading_deviation_max.py
  74. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control12_relative_position_oscillation_frequency.json
  75. 236 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control12_relative_position_oscillation_frequency.py
  76. 22 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control13_relative_position_oscillation_difference.json
  77. 186 0
      custom/cicv_ICA_lateral_control/cicv_ica_lateral_control13_relative_position_oscillation_difference.py
  78. 1416 0
      custom/cicv_ICA_lateral_control/config0624_ZY.json
  79. BIN
      custom/cicv_LKA/cicv_LKA_0.json.zip
  80. BIN
      custom/cicv_LKA/cicv_LKA_0.zip
  81. 24 0
      custom/cicv_LKA/cicv_LKA_01_distance_nearby_lane.json
  82. 162 0
      custom/cicv_LKA/cicv_LKA_01_distance_nearby_lane.py
  83. 24 0
      custom/cicv_LKA/cicv_LKA_02_lateral_offset.json
  84. 156 0
      custom/cicv_LKA/cicv_LKA_02_lateral_offset.py
  85. 24 0
      custom/cicv_LKA/cicv_LKA_03_heading_deviation_max.json
  86. 160 0
      custom/cicv_LKA/cicv_LKA_03_heading_deviation_max.py
  87. 24 0
      custom/cicv_LKA/cicv_LKA_04_relative_position_oscillation_frequency.json
  88. 217 0
      custom/cicv_LKA/cicv_LKA_04_relative_position_oscillation_frequency.py
  89. 24 0
      custom/cicv_LKA/cicv_LKA_05_relative_position_oscillation_difference.json
  90. 186 0
      custom/cicv_LKA/cicv_LKA_05_relative_position_oscillation_difference.py
  91. 24 0
      custom/cicv_LKA/cicv_LKA_06_absolute_center_distance_expectation.json
  92. 160 0
      custom/cicv_LKA/cicv_LKA_06_absolute_center_distance_expectation.py
  93. 24 0
      custom/cicv_LKA/cicv_LKA_07_absolute_center_distance_standard_deviation.json
  94. 158 0
      custom/cicv_LKA/cicv_LKA_07_absolute_center_distance_standard_deviation.py
  95. 24 0
      custom/cicv_LKA/cicv_LKA_08_fixed_driving_direction_TLC.json
  96. 190 0
      custom/cicv_LKA/cicv_LKA_08_fixed_driving_direction_TLC.py
  97. 24 0
      custom/cicv_LKA/cicv_LKA_09_fixed_steering_wheel_angle_TLC.json
  98. 211 0
      custom/cicv_LKA/cicv_LKA_09_fixed_steering_wheel_angle_TLC.py
  99. 24 0
      custom/cicv_LKA/cicv_LKA_10_maximum_lateral_deviation.json
  100. 156 0
      custom/cicv_LKA/cicv_LKA_10_maximum_lateral_deviation.py

+ 1304 - 0
comfort.py

@@ -0,0 +1,1304 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhanghaiwen(zhanghaiwen@china-icv.cn), yangzihao(yangzihao@china-icv.cn)
+@Data:              2023/06/25
+@Last Modified:     2023/06/25
+@Summary:           Comfort metrics
+"""
+
+import sys
+import math
+import pandas as pd
+import numpy as np
+import scipy.signal
+
+sys.path.append('../common')
+sys.path.append('../modules')
+sys.path.append('../results')
+
+from data_info import DataInfoList
+from score_weight import cal_score_with_priority, cal_weight_from_80
+from common import get_interpolation, score_grade, string_concatenate, replace_key_with_value, get_frame_with_time, \
+    score_over_100
+
+
+def peak_valley_decorator(method):
+    def wrapper(self, *args, **kwargs):
+        peak_valley = self._peak_valley_determination(self.df)
+        pv_list = self.df.loc[peak_valley, ['simTime', 'speedH']].values.tolist()
+        if len(pv_list) != 0:
+            flag = True
+            p_last = pv_list[0]
+
+            for i in range(1, len(pv_list)):
+                p_curr = pv_list[i]
+
+                if self._peak_valley_judgment(p_last, p_curr):
+                    # method(self, p_curr, p_last)
+                    method(self, p_curr, p_last, flag, *args, **kwargs)
+                else:
+                    p_last = p_curr
+
+            return method
+        else:
+            flag = False
+            p_curr = [0, 0]
+            p_last = [0, 0]
+            method(self, p_curr, p_last, flag, *args, **kwargs)
+            return method
+
+    return wrapper
+
+
+class Comfort(object):
+    """
+    Class for achieving comfort metrics for autonomous driving.
+
+    Attributes:
+        dataframe: Vehicle driving data, stored in dataframe format.
+    """
+
+    def __init__(self, data_processed, custom_data, scoreModel):
+        self.eval_data = pd.DataFrame()
+        self.data_processed = data_processed
+        self.scoreModel = scoreModel
+
+        self.data = data_processed.obj_data[1]
+        self.mileage = data_processed.report_info['mileage']
+        self.ego_df = pd.DataFrame()
+        self.discomfort_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+        self.df_drivectrl = data_processed.driver_ctrl_df
+
+        self.config = data_processed.config
+        comfort_config = self.config.config['comfort']
+        self.comfort_config = comfort_config
+
+        # common data
+        self.bulitin_metric_list = self.config.builtinMetricList
+
+        # dimension data
+        self.weight_custom = comfort_config['weightCustom']
+        self.metric_list = comfort_config['metric']
+        self.type_list = comfort_config['type']
+        self.type_name_dict = comfort_config['typeName']
+        self.name_dict = comfort_config['name']
+        self.unit_dict = comfort_config['unit']
+
+        # custom metric data
+        self.customMetricParam = comfort_config['customMetricParam']
+        self.custom_metric_list = list(self.customMetricParam.keys())
+        self.custom_data = custom_data
+        self.custom_param_dict = {}
+
+        # score data
+        self.weight = comfort_config['weightDimension']
+
+        self.weight_type_dict = comfort_config['typeWeight']
+        self.weight_type_list = comfort_config['typeWeightList']
+
+        self.weight_dict = comfort_config['weight']
+        self.weight_list = comfort_config['weightList']
+
+        self.priority_dict = comfort_config['priority']
+        self.priority_list = comfort_config['priorityList']
+
+        self.kind_dict = comfort_config['kind']
+        self.optimal_dict = comfort_config['optimal']
+        self.optimal1_dict = self.optimal_dict[0]
+        self.optimal2_dict = self.optimal_dict[1]
+        self.optimal3_dict = self.optimal_dict[2]
+        self.multiple_dict = comfort_config['multiple']
+        self.kind_list = comfort_config['kindList']
+        self.optimal_list = comfort_config['optimalList']
+        self.multiple_list = comfort_config['multipleList']
+
+        # metric data
+        self.metric_dict = comfort_config['typeMetricDict']
+        self.lat_metric_list = self.metric_dict['comfortLat']
+        self.lon_metric_list = self.metric_dict['comfortLon']
+        # self.lat_metric_list = ["zigzag", "shake"]
+        # self.lon_metric_list = ["cadence", "slamBrake", "slamAccelerate"]
+
+        self.time_list = data_processed.driver_ctrl_data['time_list']
+        self.frame_list = data_processed.driver_ctrl_data['frame_list']
+
+        self.count_dict = {}
+        self.duration_dict = {}
+        self.strength_dict = {}
+
+        self.discomfort_count = 0
+        self.zigzag_count = 0
+        self.shake_count = 0
+        self.cadence_count = 0
+        self.slam_brake_count = 0
+        self.slam_accel_count = 0
+
+        self.zigzag_strength = 0
+        self.shake_strength = 0
+        self.cadence_strength = 0
+        self.slam_brake_strength = 0
+        self.slam_accel_strength = 0
+
+        self.discomfort_duration = 0
+        self.zigzag_duration = 0
+        self.shake_duration = 0
+        self.cadence_duration = 0
+        self.slam_brake_duration = 0
+        self.slam_accel_duration = 0
+
+        self.zigzag_time_list = []
+        self.zigzag_frame_list = []
+        self.zigzag_stre_list = []
+        self.cur_ego_path_list = []
+        self.curvature_list = []
+
+        self._get_data()
+        self._comf_param_cal()
+
+    def _get_data(self):
+        """
+
+        """
+        comfort_info_list = DataInfoList.COMFORT_INFO
+        self.ego_df = self.data[comfort_info_list].copy()
+        # self.df = self.ego_df.set_index('simFrame')  # 索引是csv原索引
+        self.df = self.ego_df.reset_index(drop=True)  # 索引是csv原索引
+
+    def _cal_cur_ego_path(self, row):
+        try:
+            divide = (row['speedX'] ** 2 + row['speedY'] ** 2) ** (3 / 2)
+            if not divide:
+                res = None
+            else:
+                res = (row['speedX'] * row['accelY'] - row['speedY'] * row['accelX']) / divide
+        except:
+            res = None
+        return res
+
+    def _comf_param_cal(self):
+        """
+
+        """
+        UNIT_DISTANCE = 100000
+
+        for i in range(len(self.optimal_list)):
+            if i % 3 == 2:
+                continue
+            else:
+                self.optimal_list[i] = round(self.optimal_list[i] * self.mileage / UNIT_DISTANCE, 8)
+
+        self.optimal1_dict = {key: value * self.mileage / UNIT_DISTANCE for key, value in
+                              self.optimal1_dict.copy().items()}
+        self.optimal2_dict = {key: value * self.mileage / UNIT_DISTANCE for key, value in
+                              self.optimal2_dict.copy().items()}
+
+        # [log]
+        self.ego_df['ip_acc'] = self.ego_df['v'].apply(get_interpolation, point1=[18, 4], point2=[72, 2])
+        self.ego_df['ip_dec'] = self.ego_df['v'].apply(get_interpolation, point1=[18, -5], point2=[72, -3.5])
+        self.ego_df['slam_brake'] = (self.ego_df['lon_acc'] - self.ego_df['ip_dec']).apply(
+            lambda x: 1 if x < 0 else 0)
+        self.ego_df['slam_accel'] = (self.ego_df['lon_acc'] - self.ego_df['ip_acc']).apply(
+            lambda x: 1 if x > 0 else 0)
+        self.ego_df['cadence'] = self.ego_df.apply(
+            lambda row: self._cadence_process_new(row['lon_acc'], row['ip_acc'], row['ip_dec']), axis=1)
+
+        # for shake detector
+        self.ego_df['cur_ego_path'] = self.ego_df.apply(self._cal_cur_ego_path, axis=1)
+        self.ego_df['curvHor'] = self.ego_df['curvHor'].astype('float')
+        self.ego_df['cur_diff'] = (self.ego_df['cur_ego_path'] - self.ego_df['curvHor']).abs()
+        self.ego_df['R'] = self.ego_df['curvHor'].apply(lambda x: 10000 if x == 0 else 1 / x)
+        self.ego_df['R_ego'] = self.ego_df['cur_ego_path'].apply(lambda x: 10000 if x == 0 else 1 / x)
+        self.ego_df['R_diff'] = (self.ego_df['R_ego'] - self.ego_df['R']).abs()
+
+        self.cur_ego_path_list = self.ego_df['cur_ego_path'].values.tolist()
+        self.curvature_list = self.ego_df['curvHor'].values.tolist()
+
+    def _peak_valley_determination(self, df):
+        """
+        Determine the peak and valley of the vehicle based on its current angular velocity.
+
+        Parameters:
+            df: Dataframe containing the vehicle angular velocity.
+
+        Returns:
+            peak_valley: List of indices representing peaks and valleys.
+        """
+
+        peaks, _ = scipy.signal.find_peaks(df['speedH'], height=0.01, distance=1, prominence=0.01)
+        valleys, _ = scipy.signal.find_peaks(-df['speedH'], height=0.01, distance=1, prominence=0.01)
+        peak_valley = sorted(list(peaks) + list(valleys))
+
+        return peak_valley
+
+    def _peak_valley_judgment(self, p_last, p_curr, tw=6000, avg=0.4):
+        """
+        Determine if the given peaks and valleys satisfy certain conditions.
+
+        Parameters:
+            p_last: Previous peak or valley data point.
+            p_curr: Current peak or valley data point.
+            tw: Threshold time difference between peaks and valleys.
+            avg: Angular velocity gap threshold.
+
+        Returns:
+            Boolean indicating whether the conditions are satisfied.
+        """
+        t_diff = p_curr[0] - p_last[0]
+        v_diff = abs(p_curr[1] - p_last[1])
+        s = p_curr[1] * p_last[1]
+
+        zigzag_flag = t_diff < tw and v_diff > avg and s < 0
+        if zigzag_flag and ([p_last[0], p_curr[0]] not in self.zigzag_time_list):
+            self.zigzag_time_list.append([p_last[0], p_curr[0]])
+        return zigzag_flag
+
+    @peak_valley_decorator
+    def zigzag_count_func(self, p_curr, p_last, flag=True):
+        """
+        Count the number of zigzag movements.
+
+        Parameters:
+            df: Input dataframe data.
+
+        Returns:
+            zigzag_count: Number of zigzag movements.
+        """
+        if flag:
+            self.zigzag_count += 1
+        else:
+            self.zigzag_count += 0
+
+    @peak_valley_decorator
+    def cal_zigzag_strength_strength(self, p_curr, p_last, flag=True):
+        """
+        Calculate various strength statistics.
+
+        Returns:
+            Tuple containing maximum strength, minimum strength,
+            average strength, and 99th percentile strength.
+        """
+        if flag:
+            v_diff = abs(p_curr[1] - p_last[1])
+            t_diff = p_curr[0] - p_last[0]
+            self.zigzag_stre_list.append(v_diff / t_diff)  # 平均角加速度
+        else:
+            self.zigzag_stre_list = []
+
+    def _shake_detector(self, Cr_diff=0.05, T_diff=0.39):
+        """
+        ego车横向加速度ax;
+        ego车轨迹横向曲率;
+        ego车轨迹曲率变化率;
+        ego车所在车lane曲率;
+        ego车所在车lane曲率变化率;
+        转向灯(暂时存疑,可不用)Cr_diff = 0.1, T_diff = 0.04
+        求解曲率公式k(t) = (x'(t) * y''(t) - y'(t) * x''(t)) / ((x'(t))^2 + (y'(t))^2)^(3/2)
+        """
+        time_list = []
+        frame_list = []
+        shake_time_list = []
+
+        df = self.ego_df.copy()
+        df = df[df['cur_diff'] > Cr_diff]
+        df['frame_ID_diff'] = df['simFrame'].diff()  # 找出行车轨迹曲率与道路曲率之差大于阈值的数据段
+        filtered_df = df[df.frame_ID_diff > T_diff]  # 此处是用大间隔区分多次晃动情景    。
+
+        row_numbers = filtered_df.index.tolist()
+        cut_column = pd.cut(df.index, bins=row_numbers)
+
+        grouped = df.groupby(cut_column)
+        dfs = {}
+        for name, group in grouped:
+            dfs[name] = group.reset_index(drop=True)
+
+        for name, df_group in dfs.items():
+            # 直道,未主动换道
+            df_group['curvHor'] = df_group['curvHor'].abs()
+            df_group_straight = df_group[(df_group.lightMask == 0) & (df_group.curvHor < 0.001)]
+            if not df_group_straight.empty:
+                tmp_list = df_group_straight['simTime'].values
+                # shake_time_list.append([tmp_list[0], tmp_list[-1]])
+                time_list.extend(df_group_straight['simTime'].values)
+                frame_list.extend(df_group_straight['simFrame'].values)
+                self.shake_count = self.shake_count + 1
+
+            # 打转向灯,道路为直道,此时晃动判断标准车辆曲率变化率为一个更大的阈值
+            df_group_change_lane = df_group[(df_group['lightMask'] != 0) & (df_group['curvHor'] < 0.001)]
+            df_group_change_lane_data = df_group_change_lane[df_group_change_lane.cur_diff > Cr_diff + 0.2]
+            if not df_group_change_lane_data.empty:
+                tmp_list = df_group_change_lane_data['simTime'].values
+                # shake_time_list.append([tmp_list[0], tmp_list[-1]])
+                time_list.extend(df_group_change_lane_data['simTime'].values)
+                frame_list.extend(df_group_change_lane_data['simFrame'].values)
+                self.shake_count = self.shake_count + 1
+
+            # 转弯,打转向灯
+            df_group_turn = df_group[(df_group['lightMask'] != 0) & (df_group['curvHor'].abs() > 0.001)]
+            df_group_turn_data = df_group_turn[df_group_turn.cur_diff.abs() > Cr_diff + 0.1]
+            if not df_group_turn_data.empty:
+                tmp_list = df_group_turn_data['simTime'].values
+                # shake_time_list.append([tmp_list[0], tmp_list[-1]])
+                time_list.extend(df_group_turn_data['simTime'].values)
+                frame_list.extend(df_group_turn_data['simFrame'].values)
+                self.shake_count = self.shake_count + 1
+
+        TIME_RANGE = 1
+        t_list = time_list
+        f_list = frame_list
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not sub_group_time or t_list[i] - t_list[i - 1] <= TIME_RANGE:
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        # group_time.append(sub_group_time)
+        # group_frame.append(sub_group_frame)
+        # group_time = [g for g in group_time if len(g) >= 3]
+        # group_frame = [g for g in group_frame if len(g) >= 3]
+        #
+        # group_time = []
+        # sub_group = []
+        # for i in range(len(t_list)):
+        #     if not sub_group or t_list[i] - t_list[i - 1] <= 0.2:
+        #         sub_group.append(t_list[i])
+        #     else:
+        #         group_time.append(sub_group)
+        #         sub_group = [t_list[i]]
+        #
+        # group_time.append(sub_group)
+        # group_time = [g for g in group_time if len(g) >= 3]
+
+        # 输出图表值
+        shake_time = [[g[0], g[-1]] for g in group_time]
+        shake_frame = [[g[0], g[-1]] for g in group_frame]
+        self.shake_count = len(shake_time)
+
+        if shake_time:
+            time_df = pd.DataFrame(shake_time, columns=['start_time', 'end_time'])
+            frame_df = pd.DataFrame(shake_frame, columns=['start_frame', 'end_frame'])
+            discomfort_df = pd.concat([time_df, frame_df], axis=1)
+            discomfort_df['type'] = 'shake'
+            self.discomfort_df = pd.concat([self.discomfort_df, discomfort_df], ignore_index=True)
+
+        return time_list
+
+    def _cadence_process(self, lon_acc_roc, ip_dec_roc):
+        if abs(lon_acc_roc) >= abs(ip_dec_roc) or abs(lon_acc_roc) < 1:
+            return np.nan
+        # elif abs(lon_acc_roc) == 0:
+        elif abs(lon_acc_roc) == 0:
+            return 0
+        elif lon_acc_roc > 0 and lon_acc_roc < -ip_dec_roc:
+            return 1
+        elif lon_acc_roc < 0 and lon_acc_roc > ip_dec_roc:
+            return -1
+
+    def _cadence_process_new(self, lon_acc, ip_acc, ip_dec):
+        if abs(lon_acc) < 1 or lon_acc > ip_acc or lon_acc < ip_dec:
+            return np.nan
+        # elif abs(lon_acc_roc) == 0:
+        elif abs(lon_acc) == 0:
+            return 0
+        elif lon_acc > 0 and lon_acc < ip_acc:
+            return 1
+        elif lon_acc < 0 and lon_acc > ip_dec:
+            return -1
+
+    def _cadence_detector(self):
+        """
+        # 加速度突变:先加后减,先减后加,先加然后停,先减然后停
+        # 顿挫:2s内多次加速度变化率突变
+        # 求出每一个特征点,然后提取,然后将每一个特征点后面的2s做一个窗口,统计频率,避免无效运算
+
+        # 将特征点筛选出来
+        # 将特征点时间作为聚类标准,大于1s的pass,小于等于1s的聚类到一个分组
+        # 去掉小于3个特征点的分组
+        """
+        # data = self.ego_df[['simTime', 'simFrame', 'lon_acc_roc', 'cadence']].copy()
+        data = self.ego_df[['simTime', 'simFrame', 'lon_acc', 'lon_acc_roc', 'cadence']].copy()
+        time_list = data['simTime'].values.tolist()
+
+        data = data[data['cadence'] != np.nan]
+        data['cadence_diff'] = data['cadence'].diff()
+        data.dropna(subset='cadence_diff', inplace=True)
+        data = data[data['cadence_diff'] != 0]
+
+        t_list = data['simTime'].values.tolist()
+        f_list = data['simFrame'].values.tolist()
+
+        TIME_RANGE = 1
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not sub_group_time or t_list[i] - t_list[i - 1] <= TIME_RANGE:  # 特征点相邻一秒内的,算作同一组顿挫
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        group_time.append(sub_group_time)
+        group_frame.append(sub_group_frame)
+        group_time = [g for g in group_time if len(g) >= 1]  # 有一次特征点则算作一次顿挫
+        group_frame = [g for g in group_frame if len(g) >= 1]
+
+        # group_time = []
+        # sub_group = []
+        #
+        # for i in range(len(f_list)):
+        #     if not sub_group or t_list[i] - t_list[i - 1] <= 1:  # 特征点相邻一秒内的,算作同一组顿挫
+        #         sub_group.append(t_list[i])
+        #     else:
+        #         group_time.append(sub_group)
+        #         sub_group = [t_list[i]]
+        #
+        # group_time.append(sub_group)
+        # group_time = [g for g in group_time if len(g) >= 1]  # 有一次特征点则算作一次顿挫
+
+        # 输出图表值
+        cadence_time = [[g[0], g[-1]] for g in group_time]
+        cadence_frame = [[g[0], g[-1]] for g in group_frame]
+
+        if cadence_time:
+            time_df = pd.DataFrame(cadence_time, columns=['start_time', 'end_time'])
+            frame_df = pd.DataFrame(cadence_frame, columns=['start_frame', 'end_frame'])
+            discomfort_df = pd.concat([time_df, frame_df], axis=1)
+            discomfort_df['type'] = 'cadence'
+            self.discomfort_df = pd.concat([self.discomfort_df, discomfort_df], ignore_index=True)
+
+        # 将顿挫组的起始时间为组重新统计时间
+        cadence_time_list = [time for pair in cadence_time for time in time_list if pair[0] <= time <= pair[1]]
+
+        # time_list = [element for sublist in group_time for element in sublist]
+        # merged_list = [element for sublist in res_group for element in sublist]
+        # res_df = data[data['simTime'].isin(merged_list)]
+
+        stre_list = []
+        freq_list = []
+        for g in group_time:
+            # calculate strength
+            g_df = data[data['simTime'].isin(g)]
+            strength = g_df['lon_acc'].abs().mean()
+            stre_list.append(strength)
+
+            # calculate frequency
+            cnt = len(g)
+            t_start = g_df['simTime'].iloc[0]
+            t_end = g_df['simTime'].iloc[-1]
+            t_delta = t_end - t_start
+            frequency = cnt / t_delta
+            freq_list.append(frequency)
+
+        self.cadence_count = len(freq_list)
+        cadence_stre = sum(stre_list) / len(stre_list) if stre_list else 0
+
+        return cadence_time_list
+
+    def _slam_brake_detector(self):
+        # 统计急刹全为1的分段的个数,记录分段开头的frame_ID
+        # data = self.ego_df[['simTime', 'simFrame', 'lon_acc_roc', 'ip_dec_roc', 'slam_brake']].copy()
+        data = self.ego_df[['simTime', 'simFrame', 'lon_acc', 'lon_acc_roc', 'ip_dec', 'slam_brake']].copy()
+        # data['slam_diff'] = data['slam_brake'].diff()
+        # res_df = data[data['slam_diff'] == 1]
+
+        res_df = data[data['slam_brake'] == 1]
+        t_list = res_df['simTime'].values
+        f_list = res_df['simFrame'].values.tolist()
+
+        TIME_RANGE = 1
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not sub_group_time or f_list[i] - f_list[i - 1] <= TIME_RANGE:  # 连续帧的算作同一组急刹
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        group_time.append(sub_group_time)
+        group_frame.append(sub_group_frame)
+        group_time = [g for g in group_time if len(g) >= 2]  # 达到两帧算作一次急刹
+        group_frame = [g for g in group_frame if len(g) >= 2]
+
+        # group_time = []
+        # sub_group = []
+        #
+        # for i in range(len(f_list)):
+        #     if not sub_group or f_list[i] - f_list[i - 1] <= 1:  # 连续帧的算作同一组急刹
+        #         sub_group.append(t_list[i])
+        #     else:
+        #         group_time.append(sub_group)
+        #         sub_group = [t_list[i]]
+        #
+        # group_time.append(sub_group)
+        # group_time = [g for g in group_time if len(g) >= 2]  # 达到两帧算作一次急刹
+
+        # 输出图表值
+        slam_brake_time = [[g[0], g[-1]] for g in group_time]
+        slam_brake_frame = [[g[0], g[-1]] for g in group_frame]
+
+        if slam_brake_time:
+            time_df = pd.DataFrame(slam_brake_time, columns=['start_time', 'end_time'])
+            frame_df = pd.DataFrame(slam_brake_frame, columns=['start_frame', 'end_frame'])
+            discomfort_df = pd.concat([time_df, frame_df], axis=1)
+            discomfort_df['type'] = 'slam_brake'
+            self.discomfort_df = pd.concat([self.discomfort_df, discomfort_df], ignore_index=True)
+
+        time_list = [element for sublist in group_time for element in sublist]
+        self.slam_brake_count = len(group_time)  # / self.mileage  # * 1000000
+        return time_list
+
+    def _slam_accel_detector(self):
+        # 统计急刹全为1的分段的个数,记录分段开头的frame_ID
+        # data = self.ego_df[['simTime', 'simFrame', 'lon_acc_roc', 'ip_acc_roc', 'slam_accel']].copy()
+        data = self.ego_df[['simTime', 'simFrame', 'lon_acc', 'ip_acc', 'slam_accel']].copy()
+        # data['slam_diff'] = data['slam_accel'].diff()
+        # res_df = data.loc[data['slam_diff'] == 1]
+
+        res_df = data.loc[data['slam_accel'] == 1]
+        t_list = res_df['simTime'].values
+        f_list = res_df['simFrame'].values.tolist()
+
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not group_time or f_list[i] - f_list[i - 1] <= 1:  # 连续帧的算作同一组急加速
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        group_time.append(sub_group_time)
+        group_frame.append(sub_group_frame)
+        group_time = [g for g in group_time if len(g) >= 2]
+        group_frame = [g for g in group_frame if len(g) >= 2]
+
+        # group_time = []
+        # sub_group = []
+        #
+        # for i in range(len(f_list)):
+        #     if not sub_group or f_list[i] - f_list[i - 1] <= 1:  # 连续帧的算作同一组急加速
+        #         sub_group.append(t_list[i])
+        #     else:
+        #         group_time.append(sub_group)
+        #         sub_group = [t_list[i]]
+        #
+        # group_time.append(sub_group)
+        # group_time = [g for g in group_time if len(g) >= 2]  # 达到两帧算作一次急加速
+
+        # 输出图表值
+        slam_accel_time = [[g[0], g[-1]] for g in group_time]
+        slam_accel_frame = [[g[0], g[-1]] for g in group_frame]
+
+        if slam_accel_time:
+            time_df = pd.DataFrame(slam_accel_time, columns=['start_time', 'end_time'])
+            frame_df = pd.DataFrame(slam_accel_frame, columns=['start_frame', 'end_frame'])
+            discomfort_df = pd.concat([time_df, frame_df], axis=1)
+            discomfort_df['type'] = 'slam_accel'
+            self.discomfort_df = pd.concat([self.discomfort_df, discomfort_df], ignore_index=True)
+
+        time_list = [element for sublist in group_time for element in sublist]
+        self.slam_accel_count = len(group_time)  # / self.mileage  # * 1000000
+        return time_list
+
+    def comf_statistic(self):
+        """
+
+        """
+        df = self.ego_df[['simTime', 'cur_diff', 'lon_acc', 'lon_acc_roc', 'accelH']].copy()
+
+        self.zigzag_count_func()
+        self.cal_zigzag_strength_strength()
+        if self.zigzag_time_list:
+            zigzag_df = pd.DataFrame(self.zigzag_time_list, columns=['start_time', 'end_time'])
+            zigzag_df = get_frame_with_time(zigzag_df, self.ego_df)
+            zigzag_df['type'] = 'zigzag'
+            self.discomfort_df = pd.concat([self.discomfort_df, zigzag_df], ignore_index=True)
+            # discomfort_df = pd.concat([time_df, frame_df], axis=1)
+            # self.discomfort_df = pd.concat([self.discomfort_df, discomfort_df], ignore_index=True)
+
+        zigzag_t_list = []
+        # 只有[t_start, t_end]数对,要提取为完整time list
+        t_list = df['simTime'].values.tolist()
+        for t_start, t_end in self.zigzag_time_list:
+            index_1 = t_list.index(t_start)
+            index_2 = t_list.index(t_end)
+            zigzag_t_list.extend(t_list[index_1:index_2 + 1])
+        zigzag_t_list = list(set(zigzag_t_list))
+        shake_t_list = self._shake_detector()
+        cadence_t_list = self._cadence_detector()
+        slam_brake_t_list = self._slam_brake_detector()
+        slam_accel_t_list = self._slam_accel_detector()
+
+        # comfort_time_dict = {
+        #     'zigzag_time_list': zigzag_t_list,
+        #     'shake_time_list': shake_t_list,
+        #     'cadence_time_list': cadence_t_list,
+        #     'slam_brake_time_list': slam_brake_t_list,
+        #     'slam_accelerate_time_list': slam_accel_t_list
+        # }
+
+        discomfort_time_list = zigzag_t_list + shake_t_list + cadence_t_list + slam_brake_t_list + slam_accel_t_list
+        discomfort_time_list = sorted(discomfort_time_list)  # 排序
+        discomfort_time_list = list(set(discomfort_time_list))  # 去重
+
+        # TIME_DIFF = self.time_list[3] - self.time_list[2]
+        # TIME_DIFF = 0.4
+        FREQUENCY = 100
+        TIME_DIFF = 1 / FREQUENCY
+        self.discomfort_duration = len(discomfort_time_list) * TIME_DIFF
+
+        df['flag_zigzag'] = df['simTime'].apply(lambda x: 1 if x in zigzag_t_list else 0)
+        df['flag_shake'] = df['simTime'].apply(lambda x: 1 if x in shake_t_list else 0)
+        df['flag_cadence'] = df['simTime'].apply(lambda x: 1 if x in cadence_t_list else 0)
+        df['flag_slam_brake'] = df['simTime'].apply(lambda x: 1 if x in slam_brake_t_list else 0)
+        df['flag_slam_accel'] = df['simTime'].apply(lambda x: 1 if x in slam_accel_t_list else 0)
+
+        # hectokilometer = 100000  # 百公里
+        self.zigzag_duration = df['flag_zigzag'].sum() * TIME_DIFF  # / self.mileage * hectokilometer
+        self.shake_duration = df['flag_shake'].sum() * TIME_DIFF  # / self.mileage * hectokilometer
+        self.cadence_duration = df['flag_cadence'].sum() * TIME_DIFF  # / self.mileage * hectokilometer
+        self.slam_brake_duration = df['flag_slam_brake'].sum() * TIME_DIFF  # / self.mileage * hectokilometer
+        self.slam_accel_duration = df['flag_slam_accel'].sum() * TIME_DIFF  # / self.mileage * hectokilometer
+
+        # 强度取值可考虑最大值,暂定平均值,具体视数据情况而定
+        # self.zigzag_strength = np.mean(self.zigzag_stre_list) if self.zigzag_stre_list else 0
+        self.zigzag_strength = (df['flag_shake'] * abs(df['accelH'])).mean()
+        self.shake_strength = (df['flag_shake'] * abs(df['cur_diff'])).mean()
+        self.cadence_strength = (df['flag_cadence'] * abs(df['lon_acc'])).mean()
+        self.slam_brake_strength = (df['flag_slam_brake'] * abs(df['lon_acc'])).mean()
+        self.slam_accel_strength = (df['flag_slam_accel'] * abs(df['lon_acc'])).mean()
+
+        self.zigzag_strength = self._nan_detect(self.zigzag_strength)
+        self.shake_strength = self._nan_detect(self.shake_strength)
+        self.cadence_strength = self._nan_detect(self.cadence_strength)
+        self.slam_brake_strength = self._nan_detect(self.slam_brake_strength)
+        self.slam_accel_strength = self._nan_detect(self.slam_accel_strength)
+
+        self.count_dict = {
+            "zigzag": self.zigzag_count,
+            "shake": self.shake_count,
+            "cadence": self.cadence_count,
+            "slamBrake": self.slam_brake_count,
+            "slamAccelerate": self.slam_accel_count
+        }
+
+        self.duration_dict = {
+            "zigzag": self.zigzag_duration,
+            "shake": self.shake_duration,
+            "cadence": self.cadence_duration,
+            "slamBrake": self.slam_brake_duration,
+            "slamAccelerate": self.slam_accel_duration
+        }
+
+        self.strength_dict = {
+            "zigzag": self.zigzag_strength,
+            "shake": self.shake_strength,
+            "cadence": self.cadence_strength,
+            "slamBrake": self.slam_brake_strength,
+            "slamAccelerate": self.slam_accel_strength
+        }
+
+        zigzag_list = [self.zigzag_count, self.zigzag_duration, self.zigzag_strength]
+        shake_list = [self.shake_count, self.shake_duration, self.shake_strength]
+        cadence_list = [self.cadence_count, self.cadence_duration, self.cadence_strength]
+        slam_brake_list = [self.slam_brake_count, self.slam_brake_duration, self.slam_brake_strength]
+        slam_accel_list = [self.slam_accel_count, self.slam_accel_duration, self.slam_accel_strength]
+
+        tmp_comf_arr = []
+        if "zigzag" in self.metric_list:
+            tmp_comf_arr += zigzag_list
+            self.discomfort_count += self.zigzag_count
+
+        if "shake" in self.metric_list:
+            tmp_comf_arr += shake_list
+            self.discomfort_count += self.shake_count
+
+        if "cadence" in self.metric_list:
+            tmp_comf_arr += cadence_list
+            self.discomfort_count += self.cadence_count
+
+        if "slamBrake" in self.metric_list:
+            tmp_comf_arr += slam_brake_list
+            self.discomfort_count += self.slam_brake_count
+
+        if "slamAccelerate" in self.metric_list:
+            tmp_comf_arr += slam_accel_list
+            self.discomfort_count += self.slam_accel_count
+
+        comf_arr = [tmp_comf_arr]
+        return comf_arr
+
+    def _nan_detect(self, num):
+        if math.isnan(num):
+            return 0
+        return num
+
+    def custom_metric_param_parser(self, param_list):
+        """
+        param_dict = {
+            "paramA" [
+                {
+                    "kind": "-1",
+                    "optimal": "1",
+                    "multiple": ["0.5","5"],
+                    "spare1": null,
+                    "spare2": null
+                }
+            ]
+        }
+        """
+        kind_list = []
+        optimal_list = []
+        multiple_list = []
+        spare_list = []
+        # spare1_list = []
+        # spare2_list = []
+
+        for i in range(len(param_list)):
+            kind_list.append(int(param_list[i]['kind']))
+            optimal_list.append(float(param_list[i]['optimal']))
+            multiple_list.append([float(x) for x in param_list[i]['multiple']])
+            spare_list.append([item["param"] for item in param_list[i]["spare"]])
+            # spare1_list.append(param_list[i]['spare1'])
+            # spare2_list.append(param_list[i]['spare2'])
+
+        result = {
+            "kind": kind_list,
+            "optimal": optimal_list,
+            "multiple": multiple_list,
+            "spare": spare_list,
+            # "spare1": spare1_list,
+            # "spare2": spare2_list
+        }
+        return result
+
+    def custom_metric_score(self, metric, value, param_list):
+        """
+
+        """
+        param = self.custom_metric_param_parser(param_list)
+        self.custom_param_dict[metric] = param
+
+        score_model = self.scoreModel(param['kind'], param['optimal'], param['multiple'], np.array([value]))
+        score_sub = score_model.cal_score()
+        score = sum(score_sub) / len(score_sub)
+        return score
+
+    def comf_score_new(self):
+        score_metric_dict = {}
+        score_type_dict = {}
+
+        arr_comf = self.comf_statistic()
+        print("\n[舒适性表现及得分情况]")
+        print("舒适性各指标值:", [[round(num, 2) for num in row] for row in arr_comf])
+
+        if arr_comf:
+            arr_comf = np.array(arr_comf)
+
+            score_model = self.scoreModel(self.kind_list, self.optimal_list, self.multiple_list, arr_comf)
+            score_sub = score_model.cal_score()
+            score_sub = list(map(lambda x: 80 if np.isnan(x) else x, score_sub))
+
+            metric_list = [x for x in self.metric_list if x in self.config.builtinMetricList]
+            score_metric = []
+            for i in range(len(metric_list)):
+                score_tmp = (score_sub[i * 3 + 0] + score_sub[i * 3 + 1] + score_sub[i * 3 + 2]) / 3
+                score_metric.append(round(score_tmp, 2))
+
+            score_metric_dict = {key: value for key, value in zip(metric_list, score_metric)}
+
+        for metric in self.custom_metric_list:
+            value = self.custom_data[metric]['value']
+            param_list = self.customMetricParam[metric]
+            score = self.custom_metric_score(metric, value, param_list)
+            score_metric_dict[metric] = round(score, 2)
+
+        score_metric_dict = {key: score_metric_dict[key] for key in self.metric_list}
+        score_metric = list(score_metric_dict.values())
+
+        if self.weight_custom:  # 自定义权重
+            score_metric_with_weight_dict = {key: score_metric_dict[key] * self.weight_dict[key] for key in
+                                             self.weight_dict}
+
+            for type in self.type_list:
+                type_score = sum(
+                    value for key, value in score_metric_with_weight_dict.items() if key in self.metric_dict[type])
+                score_type_dict[type] = round(type_score, 2) if type_score < 100 else 100
+
+            score_type_with_weight_dict = {key: score_type_dict[key] * self.weight_type_dict[key] for key in
+                                           score_type_dict}
+
+            score_comfort = sum(score_type_with_weight_dict.values())
+        else:  # 客观赋权
+            self.weight_list = cal_weight_from_80(score_metric)
+            self.weight_dict = {key: value for key, value in zip(self.metric_list, self.weight_list)}
+            score_comfort = cal_score_with_priority(score_metric, self.weight_list, self.priority_list)
+
+            for type in self.type_list:
+                type_weight = sum(value for key, value in self.weight_dict.items() if key in self.metric_dict[type])
+                for key, value in self.weight_dict.items():
+                    if key in self.metric_dict[type]:
+                        # self.weight_dict[key] = round(value / type_weight, 4)
+                        self.weight_dict[key] = value / type_weight
+
+                type_score_metric = [value for key, value in score_metric_dict.items() if key in self.metric_dict[type]]
+                type_weight_list = [value for key, value in self.weight_dict.items() if key in self.metric_dict[type]]
+                type_priority_list = [value for key, value in self.priority_dict.items() if
+                                      key in self.metric_dict[type]]
+
+                type_score = cal_score_with_priority(type_score_metric, type_weight_list, type_priority_list)
+                score_type_dict[type] = round(type_score, 2) if type_score < 100 else 100
+
+                for key in self.weight_dict:
+                    self.weight_dict[key] = round(self.weight_dict[key], 4)
+
+            score_type = list(score_type_dict.values())
+            self.weight_type_list = cal_weight_from_80(score_type)
+            self.weight_type_dict = {key: value for key, value in zip(self.type_list, self.weight_type_list)}
+
+        score_comfort = round(score_comfort, 2)
+
+        print("舒适性各指标基准值:", self.optimal_list)
+        print(f"舒适性得分为:{score_comfort:.2f}分。")
+        print(f"舒适性各类型得分为:{score_type_dict}。")
+        print(f"舒适性各指标得分为:{score_metric_dict}。")
+        return score_comfort, score_type_dict, score_metric_dict
+
+    # def zip_time_pairs(self, zip_list, upper_limit=9999):
+    #     zip_time_pairs = zip(self.time_list, zip_list)
+    #     zip_vs_time = [[x, upper_limit if y > upper_limit else y] for x, y in zip_time_pairs if not math.isnan(y)]
+    #     return zip_vs_time
+
+    def zip_time_pairs(self, zip_list):
+        zip_time_pairs = zip(self.time_list, zip_list)
+        zip_vs_time = [[x, "" if math.isnan(y) else y] for x, y in zip_time_pairs]
+        return zip_vs_time
+
+    def comf_weight_distribution(self):
+        # get weight distribution
+        weight_distribution = {}
+        weight_distribution["name"] = "舒适性"
+
+        if "comfortLat" in self.type_list:
+            lat_weight_indexes_dict = {key: f"{key}({value * 100:.2f}%)" for key, value in self.weight_dict.items() if
+                                       key in self.lat_metric_list}
+
+            weight_distribution_lat = {
+                "latWeight": f"横向舒适度({self.weight_type_dict['comfortLat'] * 100:.2f}%)",
+                "indexes": lat_weight_indexes_dict
+            }
+            weight_distribution['comfortLat'] = weight_distribution_lat
+
+        if "comfortLon" in self.type_list:
+            lon_weight_indexes_dict = {key: f"{key}({value * 100:.2f}%)" for key, value in self.weight_dict.items() if
+                                       key in self.lon_metric_list}
+
+            weight_distribution_lon = {
+                "lonWeight": f"纵向舒适度({self.weight_type_dict['comfortLon'] * 100:.2f}%)",
+                "indexes": lon_weight_indexes_dict
+            }
+            weight_distribution['comfortLon'] = weight_distribution_lon
+
+        return weight_distribution
+
+    def _get_weight_distribution(self, dimension):
+        # get weight distribution
+        weight_distribution = {}
+        weight_distribution["name"] = self.config.dimension_name[dimension]
+
+        for type in self.type_list:
+            type_weight_indexes_dict = {key: f"{self.name_dict[key]}({value * 100:.2f}%)" for key, value in
+                                        self.weight_dict.items() if
+                                        key in self.metric_dict[type]}
+
+            weight_distribution_type = {
+                "weight": f"{self.type_name_dict[type]}({self.weight_type_dict[type] * 100:.2f}%)",
+                "indexes": type_weight_indexes_dict
+            }
+            weight_distribution[type] = weight_distribution_type
+
+        return weight_distribution
+
+    def report_statistic(self):
+        """
+
+        Returns:
+
+        """
+        # report_dict = {
+        #     "name": "舒适性",
+        #     "weight": f"{self.weight * 100:.2f}%",
+        #     "weightDistribution": weight_distribution,
+        #     "score": score_comfort,
+        #     "level": grade_comfort,
+
+        #     'discomfortCount': self.discomfort_count,
+        #     "description1": comf_description1,
+        #     "description2": comf_description2,
+        #     "description3": comf_description3,
+        #     "description4": comf_description4,
+        #
+        #     "comfortLat": lat_dict,
+        #     "comfortLon": lon_dict,
+        #
+        #     "speData": ego_speed_vs_time,
+        #     "speMarkLine": discomfort_slices,
+        #
+        #     "accData": lon_acc_vs_time,
+        #     "accMarkLine": discomfort_acce_slices,
+        #
+        #     "anvData": yawrate_vs_time,
+        #     "anvMarkLine": discomfort_zigzag_slices,
+        #
+        #     "anaData": yawrate_roc_vs_time,
+        #     "anaMarkLine": discomfort_zigzag_slices,
+        #
+        #     "curData": [cur_ego_path_vs_time, curvature_vs_time],
+        #     "curMarkLine": discomfort_shake_slices,
+        # }
+        brakePedal_list = self.data_processed.driver_ctrl_data['brakePedal_list']
+        throttlePedal_list = self.data_processed.driver_ctrl_data['throttlePedal_list']
+        steeringWheel_list = self.data_processed.driver_ctrl_data['steeringWheel_list']
+
+        # common parameter calculate
+        brake_vs_time = self.zip_time_pairs(brakePedal_list)
+        throttle_vs_time = self.zip_time_pairs(throttlePedal_list)
+        steering_vs_time = self.zip_time_pairs(steeringWheel_list)
+
+        report_dict = {
+            "name": "舒适性",
+            "weight": f"{self.weight * 100:.2f}%",
+
+            'discomfortCount': self.discomfort_count,
+        }
+
+        # upper_limit = 40
+        # times_upper = 2
+        # len_time = len(self.time_list)
+        duration = self.time_list[-1]
+
+        # comfort score and grade
+        score_comfort, score_type_dict, score_metric_dict = self.comf_score_new()
+
+        # get weight distribution
+        report_dict["weightDistribution"] = self._get_weight_distribution("comfort")
+
+        score_comfort = int(score_comfort) if int(score_comfort) == score_comfort else round(score_comfort, 2)
+        grade_comfort = score_grade(score_comfort)
+        report_dict["score"] = score_comfort
+        report_dict["level"] = grade_comfort
+
+        # comfort data for graph
+        ego_speed_list = self.ego_df['v'].values.tolist()
+        ego_speed_vs_time = self.zip_time_pairs(ego_speed_list)
+        lon_acc_list = self.ego_df['lon_acc'].values.tolist()
+        lon_acc_vs_time = self.zip_time_pairs(lon_acc_list)
+
+        yawrate_list = self.ego_df['speedH'].values.tolist()
+        yawrate_vs_time = self.zip_time_pairs(yawrate_list)
+        yawrate_roc_list = self.ego_df['accelH'].values.tolist()
+        yawrate_roc_vs_time = self.zip_time_pairs(yawrate_roc_list)
+        cur_ego_path_vs_time = self.zip_time_pairs(self.cur_ego_path_list)
+        curvature_vs_time = self.zip_time_pairs(self.curvature_list)
+
+        # markline
+        discomfort_df = self.discomfort_df.copy()
+        discomfort_df['type'] = "origin"
+        discomfort_slices = discomfort_df.to_dict('records')
+
+        # discomfort_zigzag_df = self.discomfort_df.copy()
+        # discomfort_zigzag_df.loc[discomfort_zigzag_df['type'] != 'zigzag', 'type'] = "origin"
+        # discomfort_zigzag_slices = discomfort_zigzag_df.to_dict('records')
+        #
+        # discomfort_shake_df = self.discomfort_df.copy()
+        # discomfort_shake_df.loc[discomfort_shake_df['type'] != 'shake', 'type'] = "origin"
+        # discomfort_shake_slices = discomfort_shake_df.to_dict('records')
+        #
+        # discomfort_acce_df = self.discomfort_df.copy()
+        # discomfort_acce_df.loc[discomfort_acce_df['type'] == 'zigzag', 'type'] = "origin"
+        # discomfort_acce_df.loc[discomfort_acce_df['type'] == 'shake', 'type'] = "origin"
+        # discomfort_acce_slices = discomfort_acce_df.to_dict('records')
+
+        # for description
+        good_type_list = []
+        bad_type_list = []
+
+        good_metric_list = []
+        bad_metric_list = []
+
+        # str for comf description 1&2
+        str_uncomf_count = ''
+        str_uncomf_over_optimal = ''
+
+        type_details_dict = {}
+
+        for type in self.type_list:
+            bad_type_list.append(type) if score_type_dict[type] < 80 else good_type_list.append(type)
+
+            type_dict = {
+                "name": f"{self.type_name_dict[type]}",
+            }
+
+            builtin_graph_dict = {}
+            custom_graph_dict = {}
+
+            score_type = score_type_dict[type]
+            grade_type = score_grade(score_type)
+            type_dict["score"] = score_type
+            type_dict["level"] = grade_type
+
+            type_dict_indexes = {}
+
+            flag_acc = False
+            for metric in self.metric_dict[type]:
+                bad_metric_list.append(metric) if score_metric_dict[metric] < 80 else good_metric_list.append(metric)
+
+                if metric in self.bulitin_metric_list:
+                    # for indexes
+                    type_dict_indexes[metric] = {
+                        # "name": f"{self.name_dict[metric]}({self.unit_dict[metric]})",
+                        "name": f"{self.name_dict[metric]}",
+                        "score": score_metric_dict[metric],
+                        "numberReal": f"{self.count_dict[metric]}",
+                        "numberRef": f"{self.optimal1_dict[metric]:.4f}",
+                        "durationReal": f"{self.duration_dict[metric]:.2f}",
+                        "durationRef": f"{self.optimal2_dict[metric]:.4f}",
+                        "strengthReal": f"{self.strength_dict[metric]:.2f}",
+                        "strengthRef": f"{self.optimal3_dict[metric]}"
+                    }
+
+                    # for description
+                    if self.count_dict[metric] > 0:
+                        str_uncomf_count += f'{self.count_dict[metric]}次{self.name_dict[metric]}行为、'
+
+                    if self.count_dict[metric] > self.optimal1_dict[metric]:
+                        over_optimal = ((self.count_dict[metric] - self.optimal1_dict[metric]) / self.optimal1_dict[
+                            metric]) * 100
+                        str_uncomf_over_optimal += f'{self.name_dict[metric]}次数比基准值高{over_optimal:.2f}%,'
+
+                    if self.duration_dict[metric] > self.optimal2_dict[metric]:
+                        over_optimal = ((self.duration_dict[metric] - self.optimal2_dict[metric]) / self.optimal2_dict[
+                            metric]) * 100
+                        str_uncomf_over_optimal += f'{self.name_dict[metric]}时长比基准值高{over_optimal:.2f}%,'
+
+                    if self.strength_dict[metric] > self.optimal3_dict[metric]:
+                        over_optimal = ((self.strength_dict[metric] - self.optimal3_dict[metric]) / self.optimal3_dict[
+                            metric]) * 100
+                        str_uncomf_over_optimal += f'{self.name_dict[metric]}强度比基准值高{over_optimal:.2f}%;'
+
+                    # report_dict["speData"] = ego_speed_vs_time
+                    # report_dict["accData"] = lon_acc_vs_time
+                    # report_dict["anvData"] = yawrate_vs_time
+                    # report_dict["anaData"] = yawrate_roc_vs_time
+                    # report_dict["curData"] = [cur_ego_path_vs_time, curvature_vs_time]
+
+                    # report_dict["speMarkLine"] = discomfort_slices
+                    # report_dict["accMarkLine"] = discomfort_acce_slices
+                    # report_dict["anvMarkLine"] = discomfort_zigzag_slices
+                    # report_dict["anaMarkLine"] = discomfort_zigzag_slices
+                    # report_dict["curMarkLine"] = discomfort_shake_slices
+
+                    if metric == "zigzag":
+                        metric_data = {
+                            "name": "横摆角加速度(rad/s²)",
+                            "data": yawrate_roc_vs_time,
+                            "range": f"[-{self.optimal3_dict[metric]}, {self.optimal3_dict[metric]}]",
+                            # "range": f"[0, {self.optimal3_dict[metric]}]",
+                            # "markLine": discomfort_zigzag_slices
+                        }
+                        builtin_graph_dict[metric] = metric_data
+
+                    elif metric == "shake":
+                        metric_data = {
+                            "name": "曲率(1/m)",
+                            "legend": ["自车轨迹曲率", "车道中心线曲率"],
+                            "data": [cur_ego_path_vs_time, curvature_vs_time],
+                            "range": f"[-{self.optimal3_dict[metric]}, {self.optimal3_dict[metric]}]",
+                            # "range": f"[0, {self.optimal3_dict[metric]}]",
+                            # "markLine": discomfort_shake_slices
+                        }
+                        builtin_graph_dict[metric] = metric_data
+
+                    elif metric in ["cadence", "slamBrake", "slamAccelerate"] and not flag_acc:
+                        metric_data = {
+                            "name": "自车纵向加速度(m/s²)",
+                            "data": lon_acc_vs_time,
+                            "range": f"[-{self.optimal3_dict[metric]}, {self.optimal3_dict[metric]}]",
+                            # "range": f"[0, {self.optimal3_dict[metric]}]",
+                            # "markLine": discomfort_acce_slices
+                        }
+                        flag_acc = True
+
+                        builtin_graph_dict[metric] = metric_data
+
+                else:
+                    # for indexes
+                    type_dict_indexes[metric] = {
+                        # "name": f"{self.name_dict[metric]}({self.unit_dict[metric]})",
+                        "name": f"{self.name_dict[metric]}",
+                        "score": score_metric_dict[metric],
+                        "numberReal": f"{self.custom_data[metric]['tableData']['avg']}",
+                        "numberRef": f"-",
+                        "durationReal": f"{self.custom_data[metric]['tableData']['max']}",
+                        "durationRef": f"-",
+                        "strengthReal": f"{self.custom_data[metric]['tableData']['min']}",
+                        "strengthRef": f"-"
+                    }
+                    custom_graph_dict[metric] = self.custom_data[metric]['reportData']
+
+                str_uncomf_over_optimal = str_uncomf_over_optimal[:-1] + ";"
+                type_dict["indexes"] = type_dict_indexes
+                type_dict["builtin"] = builtin_graph_dict
+                type_dict["custom"] = custom_graph_dict
+
+            type_details_dict[type] = type_dict
+
+        report_dict["details"] = type_details_dict
+
+        # str for comf description2
+        if grade_comfort == '优秀':
+            comf_description1 = '乘客在本轮测试中体验舒适;'
+        elif grade_comfort == '良好':
+            comf_description1 = '算法在本轮测试中的表现满⾜设计指标要求;'
+        elif grade_comfort == '一般':
+            str_bad_metric = string_concatenate(bad_metric_list)
+            comf_description1 = f'未满足设计指标要求。算法需要在{str_bad_metric}上进一步优化。在{(self.mileage / 1000):.2f}公里内,共发生{str_uncomf_count[:-1]};'
+        elif grade_comfort == '较差':
+            str_bad_metric = string_concatenate(bad_metric_list)
+            comf_description1 = f'乘客体验极不舒适,未满足设计指标要求。算法需要在{str_bad_metric}上进一步优化。在{(self.mileage / 1000):.2f}公里内,共发生{str_uncomf_count[:-1]};'
+
+        if not bad_metric_list:
+            str_comf_type = string_concatenate(good_metric_list)
+            comf_description2 = f"{str_comf_type}均表现良好。"
+        else:
+            str_bad_metric = string_concatenate(bad_metric_list)
+
+            if not good_metric_list:
+                comf_description2 = f"{str_bad_metric}表现不佳。其中{str_uncomf_over_optimal}。"
+            else:
+                str_comf_type = string_concatenate(good_metric_list)
+                comf_description2 = f"{str_comf_type}表现良好;{str_bad_metric}表现不佳。其中{str_uncomf_over_optimal}。"
+
+        # str for comf description3
+        control_type = []
+        if 'zigzag' in bad_metric_list or 'shake' in bad_metric_list:
+            control_type.append('横向')
+        if 'cadence' in bad_metric_list or 'slamBrake' in bad_metric_list or 'slamAccelerate' in bad_metric_list in bad_metric_list:
+            control_type.append('纵向')
+        str_control_type = '和'.join(control_type)
+
+        if not control_type:
+            comf_description3 = f"算法的横向和纵向控制表现俱佳,乘坐体验舒适。"
+        else:
+            comf_description3 = f"算法应该优化对车辆的{str_control_type}控制,优化乘坐体验。"
+
+        uncomf_time = self.discomfort_duration
+        if uncomf_time == 0:
+            comf_description4 = ""
+        else:
+            percent4 = uncomf_time / duration * 100
+            comf_description4 = f"在{duration}s时间内,乘客有{percent4:.2f}%的时间存在不舒适感受。"
+
+        report_dict["description1"] = replace_key_with_value(comf_description1, self.name_dict)
+        report_dict["description2"] = replace_key_with_value(comf_description2, self.name_dict)
+        report_dict["description3"] = comf_description3
+        report_dict["description4"] = comf_description4
+
+        report_dict['commonData'] = {
+            "per": {
+                "name": "刹车/油门踏板开度(百分比)",
+                "legend": ["刹车踏板开度", "油门踏板开度"],
+                "data": [brake_vs_time, throttle_vs_time]
+            },
+            "ang": {
+                "name": "方向盘转角(角度°)",
+                "data": steering_vs_time
+            },
+            "spe": {
+                "name": "速度(km/h)",
+                # "legend": ["自车速度", "目标车速度", "自车与目标车相对速度"],
+                "data": ego_speed_vs_time
+
+            },
+            # "acc": {
+            #     "name": "自车纵向加速度(m/s²)",
+            #     "data": lon_acc_vs_time
+            #
+            # },
+            # "dis": {
+            #     "name": "前车距离(m)",
+            #     "data": distance_vs_time
+            # }
+        }
+
+        report_dict["commonMarkLine"] = discomfort_slices
+
+        # report_dict = {
+        #     "name": "舒适性",
+        #     "weight": f"{self.weight * 100:.2f}%",
+        #     "weightDistribution": weight_distribution,
+        #     "score": score_comfort,
+        #     "level": grade_comfort,
+        #     'discomfortCount': self.discomfort_count,
+        #     "description1": comf_description1,
+        #     "description2": comf_description2,
+        #     "description3": comf_description3,
+        #     "description4": comf_description4,
+        #
+        #     "comfortLat": lat_dict,
+        #     "comfortLon": lon_dict,
+        #
+        #     "speData": ego_speed_vs_time,
+        #     "speMarkLine": discomfort_slices,
+        #
+        #     "accData": lon_acc_vs_time,
+        #     "accMarkLine": discomfort_acce_slices,
+        #
+        #     "anvData": yawrate_vs_time,
+        #     "anvMarkLine": discomfort_zigzag_slices,
+        #
+        #     "anaData": yawrate_roc_vs_time,
+        #     "anaMarkLine": discomfort_zigzag_slices,
+        #
+        #     "curData": [cur_ego_path_vs_time, curvature_vs_time],
+        #     "curMarkLine": discomfort_shake_slices,
+        # }
+        self.eval_data = self.ego_df.copy()
+        self.eval_data['playerId'] = 1
+
+        return report_dict
+
+    def get_eval_data(self):
+        df = self.eval_data[
+            ['simTime', 'simFrame', 'playerId', 'ip_acc', 'ip_dec', 'slam_brake', 'slam_accel', 'cadence',
+             'cur_ego_path', 'cur_diff', 'R', 'R_ego', 'R_diff']].copy()
+        return df

+ 355 - 0
common.py

@@ -0,0 +1,355 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2023/07/24
+@Last Modified:     2023/07/24
+@Summary:           Evaluateion functions
+"""
+
+import sys
+
+sys.path.append('../common')
+sys.path.append('../modules')
+
+import os
+import time
+import json
+import math
+import pandas as pd
+import numpy as np
+import zipfile
+import importlib
+
+
+def custom_metric_param_parser(param_list):
+    """
+    param_dict = {
+        "paramA" [
+            {
+                "kind": "-1",
+                "optimal": "1",
+                "multiple": ["0.5","5"],
+                "spare1": null,
+                "spare2": null
+            }
+        ]
+    }
+    """
+    kind_list = []
+    optimal_list = []
+    multiple_list = []
+    spare_list = []
+    # spare1_list = []
+    # spare2_list = []
+
+    for i in range(len(param_list)):
+        kind_list.append(int(param_list[i]['kind']))
+        optimal_list.append(float(param_list[i]['optimal']))
+        multiple_list.append([float(x) for x in param_list[i]['multiple']])
+        spare_list.append([item["param"] for item in param_list[i]["spare"]])
+        # spare1_list.append(param_list[i]['spare1'])
+        # spare2_list.append(param_list[i]['spare2'])
+
+    result = {
+        "kind": kind_list,
+        "optimal": optimal_list,
+        "multiple": multiple_list,
+        "spare": spare_list,
+        # "spare1": spare1_list,
+        # "spare2": spare2_list
+    }
+    return result
+
+
+def score_over_100(score):
+    if score > 100:
+        return 100
+    return score
+
+
+def import_score_class(path, file):
+    sys.path.append(path)  # 将path添加到Python的搜索路径中
+    # module_name = file[:-3]  # 去掉文件名的".py"后缀
+    module = __import__(file, fromlist=['ScoreModel'])
+    class_instance = module.ScoreModel
+    return class_instance
+
+
+def import_class_lib(path, file):
+    sys.path.append(path)  # 将path添加到Python的搜索路径中
+    module = importlib.import_module(file)
+    class_name = "ScoreModel"
+    class_instance = getattr(module, class_name)
+    return class_instance
+
+
+def cal_velocity(lat_v, lon_v):
+    """
+    The function can calculate the velocity with lateral velocity and longitudinal velocity.
+
+    Args:
+        lat_v: lateral velocity, m/s
+        lon_v: longitudinal velocity, m/s
+
+    Returns:
+        v: the resultant velocity, km/h
+
+    """
+    v = (lat_v ** 2 + lon_v ** 2) ** 0.5
+    return v
+
+
+def df2csv(df, filePath):
+    df.to_csv(f'{filePath}', index=False)
+
+
+def dict2json(input_dict, jsonPath):
+    with open(f'{jsonPath}', 'w', encoding='utf-8') as f:
+        f.write(json.dumps(input_dict, ensure_ascii=False))
+
+
+def json2dict(json_file):
+    with open(json_file, 'r', encoding='utf-8') as f:
+        json_dict = json.load(f)
+    return json_dict
+
+
+def get_subfolders_name(path):
+    return [name for name in os.listdir(path) if os.path.isdir(os.path.join(path, name))]
+
+
+def zip_dir(dir_path, zip_file_path):
+    """
+    This function can zip the files in dir_path as a zipfile.
+
+    Arguments:
+        dir_path: A str of the path of the files to be ziped.
+        zip_file_path: A str of the path of the zipfile to be stored.
+
+    Returns:
+        None
+    """
+    with zipfile.ZipFile(zip_file_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
+        for root, dirs, files in os.walk(dir_path):
+            for file in files:
+                file_path = os.path.join(root, file)
+                zipf.write(file_path)
+
+
+def score_grade(score):
+    """
+    Returns the corresponding grade based on the input score.
+
+    Arguments:
+        score: An integer or float representing the score.
+
+    Returns:
+        grade: A string representing the grade.
+    """
+    GRADE_EXCELLENT = 90
+    GRADE_GOOD = 80
+    GRADE_GENERAL = 60
+
+    if score >= GRADE_EXCELLENT:
+        grade = '优秀'
+    elif score >= GRADE_GOOD:
+        grade = '良好'
+    elif score > GRADE_GENERAL:
+        grade = '一般'
+    else:
+        grade = '较差'
+
+    return grade
+
+
+def mileage_format(mileage):
+    if mileage < 1000:
+        return f"{mileage:.2f}米"
+    else:
+        mileage = mileage / 1000
+        return f"{mileage:.2f}公里"
+
+
+def duration_format(duration):
+    if duration < 60:
+        return f"{duration:.2f}秒"
+    elif duration < 3600:
+        minute = int(duration / 60)
+        second = int(duration % 60)
+        return f"{minute}分{second}秒" if second != 0 else f"{minute}分"
+    else:
+        hour = int(duration / 3600)
+        minute = int((duration % 3600) / 60)
+        second = int(duration % 60)
+        ans = f"{hour:d}时"
+        ans = ans + f"{minute}分" if minute != 0 else ans
+        ans = ans + f"{second}秒" if second != 0 else ans
+        return ans
+
+
+def continuous_group(df):
+    time_list = df['simTime'].values.tolist()
+    frame_list = df['simFrame'].values.tolist()
+
+    group_time = []
+    group_frame = []
+    sub_group_time = []
+    sub_group_frame = []
+
+    for i in range(len(frame_list)):
+        if not sub_group_time or frame_list[i] - frame_list[i - 1] <= 1:
+            sub_group_time.append(time_list[i])
+            sub_group_frame.append(frame_list[i])
+        else:
+            group_time.append(sub_group_time)
+            group_frame.append(sub_group_frame)
+            sub_group_time = [time_list[i]]
+            sub_group_frame = [frame_list[i]]
+
+    group_time.append(sub_group_time)
+    group_frame.append(sub_group_frame)
+    group_time = [g for g in group_time if len(g) >= 2]
+    group_frame = [g for g in group_frame if len(g) >= 2]
+
+    # 输出图表值
+    time = [[g[0], g[-1]] for g in group_time]
+    frame = [[g[0], g[-1]] for g in group_frame]
+
+    time_df = pd.DataFrame(time, columns=['start_time', 'end_time'])
+    frame_df = pd.DataFrame(frame, columns=['start_frame', 'end_frame'])
+
+    result_df = pd.concat([time_df, frame_df], axis=1)
+
+    return result_df
+
+
+def continuous_group_old(df):
+    time_list = df['simTime'].values.tolist()
+    frame_list = df['simFrame'].values.tolist()
+
+    group = []
+    sub_group = []
+
+    for i in range(len(frame_list)):
+        if not sub_group or frame_list[i] - frame_list[i - 1] <= 1:
+            sub_group.append(time_list[i])
+        else:
+            group.append(sub_group)
+            sub_group = [time_list[i]]
+
+    group.append(sub_group)
+    group = [g for g in group if len(g) >= 2]
+
+    # 输出图表值
+    time = [[g[0], g[-1]] for g in group]
+    unsafe_df = pd.DataFrame(time, columns=['start_time', 'end_time'])
+
+    return unsafe_df
+
+
+def get_frame_with_time(df1, df2):
+    # 将dataframe1按照start_time与simTime进行合并
+    df1_start = df1.merge(df2[['simTime', 'simFrame']], left_on='start_time', right_on='simTime')
+    df1_start = df1_start[['start_time', 'simFrame']].copy()
+    df1_start.rename(columns={'simFrame': 'start_frame'}, inplace=True)
+
+    # 将dataframe1按照end_time与simTime进行合并
+    df1_end = df1.merge(df2[['simTime', 'simFrame']], left_on='end_time', right_on='simTime')
+    df1_end = df1_end[['end_time', 'simFrame']].copy()
+    df1_end.rename(columns={'simFrame': 'end_frame'}, inplace=True)
+
+    # 将两个合并后的数据框按照行索引进行拼接
+    result = pd.concat([df1_start, df1_end], axis=1)
+    return result
+
+
+def string_concatenate(str_list):
+    """
+    This function concatenates the input string list to generate a new string.
+    If str_list is empty, an empty string is returned.
+    If str_list has only one element, return that element.
+    If str_list has multiple elements, concatenate all the elements except the last element with ', ', and then concatenate the resulting string with the last element with 'and'.
+
+    Arguments:
+        str_list: A list of strings.
+
+    Returns:
+        ans_str: A concatenated string.
+    """
+    if not str_list:
+        return ""
+    ans_str = '、'.join(str_list[:-1])
+    ans_str = ans_str + "和" + str_list[-1] if len(str_list) > 1 else ans_str + str_list[-1]
+    return ans_str
+
+
+def zip_time_pairs(time_list, zip_list):
+    zip_time_pairs = zip(time_list, zip_list)
+    zip_vs_time = [[x, "" if math.isnan(y) else y] for x, y in zip_time_pairs]
+    return zip_vs_time
+
+
+def replace_key_with_value(input_string, replacement_dict):
+    """
+    替换字符串中的关键字为给定的字典中的值。
+
+    :param input_string: 需要进行替换的字符串
+    :param replacement_dict: 替换规则,格式为 {key: value}
+    :return: 替换后的字符串
+    """
+    # 遍历字典中的键值对,并用值替换字符串中的键
+    for key, value in replacement_dict.items():
+        if key in input_string:
+            input_string = input_string.replace(key, value)
+
+    return input_string
+
+
+def continous_judge(frame_list):
+    if not frame_list:
+        return 0
+
+    cnt = 1
+    for i in range(1, len(frame_list)):
+        if frame_list[i] - frame_list[i - 1] <= 3:
+            continue
+        cnt += 1
+    return cnt
+
+
+def get_interpolation(x, point1, point2):
+    """
+    According to the two extreme value points, the equation of one variable is determined,
+    and the solution of the equation is obtained in the domain of definition.
+
+    Arguments:
+        x: A float number of the independent variable.
+        point1: A set of the coordinate extreme point.
+        point2: A set of the other coordinate extreme point.
+
+    Returns:
+        y: A float number of the dependent variable.
+    """
+    try:
+        k = (point1[1] - point2[1]) / (point1[0] - point2[0])
+        b = (point1[0] * point2[1] - point1[1] * point2[0]) / (point1[0] - point2[0])
+        y = x * k + b
+        return y
+    except Exception as e:
+        return f"Error: {str(e)}"
+
+
+def statistic_analysis(data_list):
+    sorted_data_list = sorted(data_list)
+    maxx = sorted_data_list[-1]
+    minn = sorted_data_list[0]
+    meann = sum(sorted_data_list) / len(sorted_data_list)
+    percentile_99 = np.percentile(sorted_data_list, 99)
+    ans_list = [maxx, minn, meann, percentile_99]
+    return ans_list

+ 957 - 0
compliance.py

@@ -0,0 +1,957 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           xieguijin(xieguijin@china-icv.cn), yangzihao(yangzihao@china-icv.cn)
+@Data:              2023/08/21
+@Last Modified:     2023/08/21
+@Summary:           Compliance metrics
+"""
+import sys
+
+sys.path.append('../common')
+sys.path.append('../modules')
+sys.path.append('../results')
+
+import numpy as np
+import pandas as pd
+
+from data_info import DataInfoList
+from common import score_grade, string_concatenate, replace_key_with_value, score_over_100
+from scipy.spatial.distance import euclidean
+
+
+class Compliance(object):
+    """
+        Class for achieving compliance metrics for autonomous driving.
+
+    Attributes:
+        droadMark_df: Roadmark data, stored in dataframe format.
+
+    """
+
+    def __init__(self, data_processed, custom_data, scoreModel):
+        self.eval_data = pd.DataFrame()
+        self.scoreModel = scoreModel
+
+        self.roadMark_df = data_processed.road_mark_df
+        self.trafficLight_df = data_processed.traffic_light_df
+        self.trafficSignal_df = data_processed.traffic_signal_df
+        self.objState_df = data_processed.object_df
+
+        self.violation_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'violation'])
+
+        self.illegal_count = 0
+        self.penalty_points = 0
+        self.penalty_money = 0
+        self.warning_count = 0
+
+        self.config = data_processed.config
+        compliance_config = self.config.config['compliance']
+        self.compliance_config = compliance_config
+
+        # common data
+        self.bulitin_metric_list = self.config.builtinMetricList
+
+        # dimension data
+        self.weight_custom = compliance_config['weightCustom']
+        self.metric_list = compliance_config['metric']
+        self.type_list = compliance_config['type']
+        self.type_name_dict = compliance_config['typeName']
+        self.name_dict = compliance_config['name']
+        self.unit_dict = compliance_config['unit']
+        self.metric_dict = compliance_config['typeMetricDict']
+
+        # custom metric data
+        # self.customMetricParam = compliance_config['customMetricParam']
+        # self.custom_metric_list = list(self.customMetricParam.keys())
+        self.custom_data = custom_data
+        self.custom_param_dict = {}
+
+        # score data
+        self.weight = compliance_config['weightDimension']
+        self.weight_dict = compliance_config['weight']
+        self.weight_list = compliance_config['weightList']
+        self.weight_type_dict = compliance_config['typeWeight']
+        self.weight_type_list = compliance_config['typeWeightList']
+
+        # type dicts
+        self.type_illegal_count_dict = {}
+        self.type_penalty_points_dict = {}
+        self.type_penalty_money_dict = {}
+        self.type_warning_count_dict = {}
+        self.type_penalty_law_dict = {}
+
+        # metric dicts
+        self.metric_illegal_count_dict = {}
+        self.metric_penalty_points_dict = {}
+        self.metric_penalty_money_dict = {}
+        self.metric_warning_count_dict = {}
+        self.metric_penalty_law_dict = {}
+
+        # self.metric_illegal_list = []
+        self.metric_illegal_count_list = []
+        self.metric_penalty_points_list = []
+        self.metric_penalty_money_list = []
+        self.metric_warning_count_list = []
+        self.metric_penalty_law_list = []
+
+    def press_solid_line(self):
+        """
+        #define RDB_ROADMARK_TYPE_NONE           0
+        #define RDB_ROADMARK_TYPE_SOLID          1
+        #define RDB_ROADMARK_TYPE_BROKEN         2
+        #define RDB_ROADMARK_TYPE_CURB           3
+        #define RDB_ROADMARK_TYPE_GRASS          4
+        #define RDB_ROADMARK_TYPE_BOTDOT         5
+        #define RDB_ROADMARK_TYPE_OTHER          6
+        #define RDB_ROADMARK_TYPE_SOLID_SOLID    7
+        #define RDB_ROADMARK_TYPE_BROKEN_SOLID   8
+        #define RDB_ROADMARK_TYPE_SOLID_BROKEN   9
+        #define RDB_ROADMARK_TYPE_LANE_CENTER   10
+        #define RDB_ROADMARK_COLOR_NONE          0
+        #define RDB_ROADMARK_COLOR_WHITE         1
+        #define RDB_ROADMARK_COLOR_RED           2
+        #define RDB_ROADMARK_COLOR_YELLOW        3
+        #define RDB_ROADMARK_COLOR_OTHER         4
+        #define RDB_ROADMARK_COLOR_BLUE          5
+        #define RDB_ROADMARK_COLOR_GREEN         6
+        """
+        # Dimy = self.objState_df[self.objState_df["id"] == 1]["dimY"][0] / 2
+        Dimy = self.objState_df[self.objState_df["playerId"] == 1]["dimY"][0] / 2
+        dist_line = self.roadMark_df[self.roadMark_df["type"] == 1]
+        dist_line = dist_line.reset_index()
+        dist_press = dist_line[abs(dist_line["lateralDist"].values) <= Dimy]
+
+        # 违规行为详情表统计
+        t_list = dist_press['simTime'].values.tolist()
+        f_list = dist_press['simFrame'].values.tolist()
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not sub_group_time or t_list[i] - t_list[i - 1] <= 1:
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        CONTINUOUS_FRAME_PERIOD = 13
+        group_time.append(sub_group_time)
+        group_frame.append(sub_group_frame)
+        group_time = [g for g in group_time if len(g) >= CONTINUOUS_FRAME_PERIOD]
+        group_frame = [g for g in group_frame if len(g) >= CONTINUOUS_FRAME_PERIOD]
+        # group_time = [g for g in group_time if g[-1]-g[0] >= 1]
+        # group_frame = [g for g in group_frame if g[-1]-g[0] >= 13]
+
+        press_line_count = len(group_time)
+
+        # 输出图表值
+        press_line_time = [[g[0], g[-1]] for g in group_time]
+        press_line_frame = [[g[0], g[-1]] for g in group_frame]
+
+        if press_line_time:
+            time_df = pd.DataFrame(press_line_time, columns=['start_time', 'end_time'])
+            # frame_df = pd.DataFrame(press_line_frame, columns=['start_frame', 'end_frame'])
+            time_df['violation'] = '压实线'
+            # frame_df['violation'] = '压实线'
+            # self.violation_df = pd.concat([self.violation_df, time_df, frame_df], ignore_index=True)
+            self.violation_df = pd.concat([self.violation_df, time_df], ignore_index=True)
+            # self.violation_df = pd.concat([self.violation_df, frame_df], ignore_index=True)
+
+        warning_count = 0
+
+        press_line_dict = {
+            'metric': 'pressSolidLine',
+            'weight': 3,
+            'illegal_count': press_line_count,
+            'penalty_points': press_line_count * 3,
+            'penalty_money': press_line_count * 200,
+            'warning_count': warning_count,
+            'penalty_law': '《中华人民共和国道路交通安全法》第八十二条:机动车在高速公路上行驶,不得有下列行为:(三)骑、轧车行道分界线或者在路肩上行驶。'
+        }
+
+        return press_line_dict
+
+    def normalization_processing(self, x):
+        difference = x["traffic_light_h_diff"]
+        while (difference >= 360):
+            difference -= 360
+        return difference
+
+    def flag_red_traffic_light(self, x, cycleTime, duration_start, duration_end):
+        divisor = x['simTime'] / cycleTime
+        decimal_part = divisor - int(divisor)
+        # decimal_part = divisor % 1
+        if duration_start <= decimal_part < duration_end:
+            return 1
+        else:
+            return x["flag_red_traffic_light"]
+
+    def run_red_light(self):
+        """
+
+        """
+        ego_df = self.objState_df[(self.objState_df.playerId == 1) & (self.objState_df.type == 1)]
+        trafficLight_id_list = set(self.trafficLight_df["id"].tolist())
+        l_stipulate = 10
+        run_red_light_count = 0
+        for trafficLight_id in trafficLight_id_list:
+            trafficLight_position = self.trafficSignal_df[self.trafficSignal_df["playerId"] == trafficLight_id]
+            trafficLight_character = self.trafficLight_df[self.trafficLight_df.id == trafficLight_id]
+            if trafficLight_position.empty:  # trafficSign中没有记录
+                continue
+            trafficLight_position = trafficLight_position.iloc[:1, :]
+            trafficLight_position_x = trafficLight_position['posX'].values[0]
+            trafficLight_position_y = trafficLight_position['posY'].values[0]
+            trafficLight_position_heading = trafficLight_position['posH'].values[0]
+            cycleTime = trafficLight_character["cycleTime"].values[0]
+            noPhases = trafficLight_character["noPhases"].values[0]
+
+            ego_df["traffic_light_distance_absolute"] = ego_df[['posX', 'posY']].apply( \
+                lambda x: euclidean((trafficLight_position_x, trafficLight_position_y), (x['posX'], x['posY'])), axis=1)
+            ego_df["traffic_light_h_diff"] = ego_df.apply(
+                lambda x: abs(x['posH'] - trafficLight_position_heading) * 57.3, axis=1)
+            ego_df["traffic_light_h_diff"] = ego_df.apply(
+                lambda x: self.normalization_processing(x), axis=1).copy()  # 归一化到[0,360)之间
+            mask_trafftic_light = ((ego_df['traffic_light_h_diff'] <= 210) & (
+                    ego_df['traffic_light_h_diff'] >= 150)) | (ego_df['traffic_light_h_diff'] <= 30) | (
+                                          ego_df['traffic_light_h_diff'] >= 330)
+            ego_near_light = ego_df[(ego_df.traffic_light_distance_absolute <= l_stipulate) & mask_trafftic_light]
+            if ego_near_light.empty:
+                continue
+            """ 当前是否为红灯 """
+            ego_near_light["flag_red_traffic_light"] = 0  # 不是红灯
+            type_list = trafficLight_character['violation'][:noPhases]
+            duration = trafficLight_character['duration'][:noPhases]
+            duration_correct = [0] * noPhases
+            for number in range(noPhases):
+                duration_correct[number] = sum(duration[:number + 1])
+                type_current = type_list.values[number]
+                if type_current == 1:  # 当前duration是红灯
+                    if number == 0:
+                        duration_start = 0
+                    else:
+                        duration_start = duration_correct[number - 1]
+                    duration_end = duration_correct[number]
+                    ego_near_light["flag_red_traffic_light"] = ego_near_light[
+                        ['simTime', 'flag_red_traffic_light']].apply(
+                        lambda x: self.flag_red_traffic_light(x, cycleTime, duration_start, duration_end), axis=1)
+
+            # 挑出闯红灯数据
+            run_red_light_df = ego_near_light[ego_near_light['flag_red_traffic_light'] == 1]
+
+            # 违规行为详情表统计
+            t_list = run_red_light_df['simTime'].values.tolist()
+            f_list = run_red_light_df['simFrame'].values.tolist()
+
+            group_time = []
+            group_frame = []
+            sub_group_time = []
+            sub_group_frame = []
+            for i in range(len(f_list)):
+                if not sub_group_time or t_list[i] - t_list[i - 1] <= 1:
+                    sub_group_time.append(t_list[i])
+                    sub_group_frame.append(f_list[i])
+                else:
+                    group_time.append(sub_group_time)
+                    group_frame.append(sub_group_frame)
+                    sub_group_time = [t_list[i]]
+                    sub_group_frame = [f_list[i]]
+
+            CONTINUOUS_FRAME_PERIOD = 13
+            group_time.append(sub_group_time)
+            group_frame.append(sub_group_frame)
+            group_time = [g for g in group_time if len(g) >= CONTINUOUS_FRAME_PERIOD]
+            group_frame = [g for g in group_frame if len(g) >= CONTINUOUS_FRAME_PERIOD]
+
+            run_red_light_time = [[g[0], g[-1]] for g in group_time]
+            run_red_light_frame = [[g[0], g[-1]] for g in group_frame]
+
+            if run_red_light_time:
+                time_df = pd.DataFrame(run_red_light_time, columns=['start_time', 'end_time'])
+                # frame_df = pd.DataFrame(run_red_light_frame, columns=['start_frame', 'end_frame'])
+                time_df['violation'] = '闯红灯'
+                # frame_df['violation'] = '闯红灯'
+                self.violation_df = pd.concat([self.violation_df, time_df], ignore_index=True)
+                # self.violation_df = pd.concat([self.violation_df, frame_df], ignore_index=True)
+
+            # 闯红灯次数统计
+            if ego_near_light["flag_red_traffic_light"].any() == 1:
+                run_red_light_count = run_red_light_count + 1
+
+        run_red_light_dict = {
+            'metric': 'runRedLight',
+            'weight': 6,
+            'illegal_count': run_red_light_count,
+            'penalty_points': run_red_light_count * 6,
+            'penalty_money': run_red_light_count * 200,
+            'warning_count': 0,
+            'penalty_law': '《中华人民共和国道路交通安全法实施条例》第四十条:(二)红色叉形灯或者箭头灯亮时,禁止本车道车辆通行。'
+        }
+
+        return run_red_light_dict
+
+    def overspeed(self):
+        """
+        《中华人民共和国道路交通安全法实施条例》第四十五条:机动车在道路上行驶不得超过限速标志、标线标明的速度;
+        1、高速、城市快速路超速超过规定时速10%以内,处以警告,不扣分;
+        2、普通私家车高速超过规定时速10%以上未达20%的,处以200元罚款,记3分,普通私家车在除高速公路、城市快速路外的道路,超速20%以上未达到50%,会一次被记3分;
+        3、超过规定时速20%以上未达50%的,处以200元罚款,记6分,或在普通道路上超速50%以上,都会一次被记6分。;
+        4、超过规定时速50%以上的,可吊销驾驶证并罚款2000元,计12分。
+
+        [0, 10) 0,0,1
+        [10, 20) 0,200,1
+        高速、城市快速路:[20, 50) 6,200
+        高速、城市快速路:[50,)12,2000
+
+        高速、城市以外:[20, 50)3,200
+        高速、城市以外:[50,)6,1000-2000
+        """
+        Dimx = self.objState_df[self.objState_df["playerId"] == 1]["dimX"][0] / 2
+        data_ego = self.objState_df[self.objState_df["playerId"] == 1]
+        speed_limit_sign = self.trafficSignal_df[self.trafficSignal_df["type"] == 274]
+        same_df_rate = pd.merge(speed_limit_sign, data_ego, on=['simTime', 'simFrame'], how='inner')
+        same_df_rate = same_df_rate.reset_index()
+
+        speed_df = same_df_rate[(abs(same_df_rate["posX_x"] - same_df_rate["posX_y"]) <= 7) & (
+                abs(same_df_rate["posY_x"] - same_df_rate["posY_y"]) <= Dimx)]
+        speed_df["speed"] = np.sqrt(speed_df["speedX"] ** 2 + speed_df["speedY"] ** 2) * 3.6
+
+        # speed_df["value"] = 10
+        # same_df_rate["value"] = 10
+
+        list_sign = speed_df[speed_df["speed"] > speed_df["value"]]
+
+        # 违规行为详情表统计
+        t_list = list_sign['simTime'].values.tolist()
+        f_list = list_sign['simFrame'].values.tolist()
+        group_time = []
+        group_frame = []
+        sub_group_time = []
+        sub_group_frame = []
+        for i in range(len(f_list)):
+            if not sub_group_time or t_list[i] - t_list[i - 1] <= 2:
+                sub_group_time.append(t_list[i])
+                sub_group_frame.append(f_list[i])
+            else:
+                group_time.append(sub_group_time)
+                group_frame.append(sub_group_frame)
+                sub_group_time = [t_list[i]]
+                sub_group_frame = [f_list[i]]
+
+        CONTINUOUS_FRAME_PERIOD = 13
+        group_time.append(sub_group_time)
+        group_frame.append(sub_group_frame)
+        group_time = [g for g in group_time if len(g) >= CONTINUOUS_FRAME_PERIOD]
+        group_frame = [g for g in group_frame if len(g) >= CONTINUOUS_FRAME_PERIOD]
+
+        # 输出图表值
+        overspeed_time = [[g[0], g[-1]] for g in group_time]
+        overspeed_frame = [[g[0], g[-1]] for g in group_frame]
+
+        if overspeed_time:
+            time_df = pd.DataFrame(overspeed_time, columns=['start_time', 'end_time'])
+            # frame_df = pd.DataFrame(overspeed_frame, columns=['start_frame', 'end_frame'])
+            time_df['violation'] = '超速'
+            # frame_df['violation'] = '超速'
+            self.violation_df = pd.concat([self.violation_df, time_df], ignore_index=True)
+            # self.violation_df = pd.concat([self.violation_df, frame_df], ignore_index=True)
+
+        # list_sign = list_sign.reset_index()
+        index_sign = list_sign.index.to_list()
+        speed_df["flag_press"] = speed_df["simFrame"].apply(lambda x: 1 if x in list_sign["simFrame"] else 0)
+        speed_df["diff_press"] = speed_df["flag_press"].diff()
+        # overrate_count = speed_df[speed_df["diff_press"] == -1]["diff_press"].count()
+
+        index_list = []
+        subindex_list = []
+        for i in range(len(index_sign)):
+            if not subindex_list or index_sign[i] - index_sign[i - 1] == 1:
+                subindex_list.append(index_sign[i])
+            else:
+                index_list.append(subindex_list)
+                subindex_list.append(index_sign[i])
+        index_list.append(subindex_list)
+
+        overspeed_count_0_to_10 = 0
+        overspeed_count_10_to_20 = 0
+        overspeed_count_20_to_50 = 0
+        overspeed_count_50_to_ = 0
+
+        if index_list[0]:
+            for i in range(len(index_list)):
+                left = index_list[i][0]
+                right = index_list[i][-1]
+                df_tmp = speed_df.loc[left:right + 1]
+                max_ratio = ((df_tmp["speed"] - df_tmp["value"]) / df_tmp["value"]).max()
+                if max_ratio >= 0 and max_ratio < 0.1:
+                    overspeed_count_0_to_10 += 1
+                elif max_ratio >= 0.1 and max_ratio < 0.2:
+                    overspeed_count_10_to_20 += 1
+                elif max_ratio >= 0.2 and max_ratio < 0.5:
+                    overspeed_count_20_to_50 += 1
+                elif max_ratio >= 0.5:
+                    overspeed_count_50_to_ += 1
+
+        """
+        [0, 10) 0,0,1
+        [10, 20) 0,200,1
+        高速、城市快速路:[20, 50) 6,200
+        高速、城市快速路:[50,)12,2000
+        """
+
+        overspeed_0_to_10 = {
+            # 'metric': 'overspeed_0_to_10',
+            'metric': 'overspeed10',
+            'weight': None,
+            'illegal_count': overspeed_count_0_to_10,
+            'penalty_points': 0,
+            'penalty_money': 0,
+            'warning_count': overspeed_count_0_to_10,
+            'penalty_law': '《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。'
+        }
+
+        overspeed_10_to_20 = {
+            # 'metric': 'overspeed_10_to_20',
+            'metric': 'overspeed10_20',
+            'weight': None,
+            'illegal_count': overspeed_count_10_to_20,
+            'penalty_points': 0,
+            'penalty_money': overspeed_count_10_to_20 * 200,
+            'warning_count': overspeed_count_10_to_20,
+            'penalty_law': '《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。'
+        }
+
+        overspeed_20_to_50 = {
+            # 'metric': 'overspeed_20_to_50',
+            'metric': 'overspeed20_50',
+            'weight': 6,
+            'illegal_count': overspeed_count_20_to_50,
+            'penalty_points': overspeed_count_20_to_50 * 6,
+            'penalty_money': overspeed_count_20_to_50 * 200,
+            'warning_count': 0,
+            'penalty_law': '《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。'
+        }
+
+        overspeed_50_to_ = {
+            # 'metric': 'overspeed_50_to_',
+            'metric': 'overspeed50',
+            'weight': 12,
+            'illegal_count': overspeed_count_50_to_,
+            'penalty_points': overspeed_count_50_to_ * 12,
+            'penalty_money': overspeed_count_50_to_ * 2000,
+            'warning_count': 0,
+            'penalty_law': '《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。'
+        }
+
+        return overspeed_0_to_10, overspeed_10_to_20, overspeed_20_to_50, overspeed_50_to_
+
+    def score_cal_penalty_points(self, penalty_points):
+        """
+        # 1_results: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 100
+        # 3_results: 0, 15, 30, 45, 100
+        # 6_results: 0, 30, 100
+        # 9_results: 0, 15, 100
+        """
+        if penalty_points == 0:
+            score = 100
+        elif penalty_points >= 12:
+            score = 0
+        else:
+            score = (12 - penalty_points) / 12 * 60
+        return score
+
+    def time_splice(self, start_time, end_time):
+        str_time = f"[{start_time}s, {end_time}s]"
+        return str_time
+
+    def time_frame_splice(self, start_time, end_time, start_frame, end_frame):
+        str_time = f"[{start_time}s, {end_time}s], {start_frame}-{end_frame}"
+        return str_time
+
+    def weight_type_cal(self):
+        # penalty_list = [1, 3, 6, 9, 12]
+        penalty_list = [1, 3, 6, 12]
+        sum_penalty = sum(penalty_list)
+        weight_type_list = [round(x / sum_penalty, 2) for x in penalty_list]
+        return weight_type_list
+
+    def compliance_statistic(self):
+
+        # metric analysis
+        press_line_dict = self.press_solid_line()
+        run_red_light_dict = self.run_red_light()
+        overspeed_0_to_10_dict, overspeed_10_to_20_dict, overspeed_20_to_50_dict, overspeed_50_dict = self.overspeed()
+
+        df_list = []
+        if "overspeed10" in self.metric_list:
+            df_list.append(overspeed_0_to_10_dict)
+
+        if "overspeed10_20" in self.metric_list:
+            df_list.append(overspeed_10_to_20_dict)
+
+        if "pressSolidLine" in self.metric_list:
+            df_list.append(press_line_dict)
+
+        if "runRedLight" in self.metric_list:
+            df_list.append(run_red_light_dict)
+
+        if "overspeed20_50" in self.metric_list:
+            df_list.append(overspeed_20_to_50_dict)
+
+        if "overspeed50" in self.metric_list:
+            df_list.append(overspeed_50_dict)
+
+        # generate dataframe and dicts
+        compliance_df = pd.DataFrame(df_list)
+
+        return compliance_df
+
+    def compliance_score(self):
+        """
+        待优化
+        可以重新构建数据结构,每个判断函数的返回类型为dict
+        在多指标统计扣分、罚款时,可以将所有字典合并为一个dataframe,然后求和
+        """
+        # initialization
+        score_type_dict = {}
+        compliance_df = self.compliance_statistic()
+        self.illegal_count = int(compliance_df['illegal_count'].sum())
+        # self.penalty_points = compliance_df['penalty_points'].sum()
+        # self.penalty_money = compliance_df['penalty_money'].sum()
+        # self.warning_count = compliance_df['warning_count'].sum()
+
+        # self.metric_illegal_list = compliance_df[compliance_df['illegal_count'] > 0]['metric'].tolist()
+        # self.metric_illegal_count_list = compliance_df['illegal_count'].values.tolist()
+        #
+        # self.penalty_points_list = compliance_df['penalty_points'].values.tolist()
+        # self.penalty_money_list = compliance_df['penalty_money'].values.tolist()
+        # self.warning_count_list = compliance_df['warning_count'].values.tolist()
+
+        self.metric_penalty_points_dict = compliance_df.set_index('metric').to_dict()['penalty_points']
+        self.metric_illegal_count_dict = compliance_df.set_index('metric').to_dict()['illegal_count']
+        self.metric_penalty_money_dict = compliance_df.set_index('metric').to_dict()['penalty_money']
+        self.metric_warning_count_dict = compliance_df.set_index('metric').to_dict()['warning_count']
+        self.metric_penalty_law_dict = compliance_df.set_index('metric').to_dict()['penalty_law']
+
+        # deduct1
+        if "deduct1" in self.type_list:
+            deduct1_df = compliance_df[(compliance_df['weight'].isna()) | (compliance_df['weight'] == 1)]
+            penalty_points_1 = deduct1_df['penalty_points'].sum()
+            illegal_count_1 = deduct1_df['illegal_count'].sum()
+            score_type_dict["deduct1"] = self.score_cal_penalty_points(penalty_points_1)
+            self.type_illegal_count_dict["deduct1"] = illegal_count_1
+
+        # deduct3
+        if "deduct3" in self.type_list:
+            deduct3_df = compliance_df[(compliance_df['weight'].isna()) | (compliance_df['weight'] == 3)]
+            penalty_points_3 = deduct3_df['penalty_points'].sum()
+            illegal_count_3 = deduct3_df['illegal_count'].sum()
+            score_type_dict["deduct3"] = self.score_cal_penalty_points(penalty_points_3)
+            self.type_illegal_count_dict["deduct3"] = illegal_count_3
+
+        # deduct6
+        if "deduct6" in self.type_list:
+            deduct6_df = compliance_df[(compliance_df['weight'].isna()) | (compliance_df['weight'] == 6)]
+            penalty_points_6 = deduct6_df['penalty_points'].sum()
+            illegal_count_6 = deduct6_df['illegal_count'].sum()
+            score_type_dict["deduct6"] = self.score_cal_penalty_points(penalty_points_6)
+            self.type_illegal_count_dict["deduct6"] = illegal_count_6
+
+        # deduct9
+        if "deduct9" in self.type_list:
+            deduct9_df = compliance_df[(compliance_df['weight'].isna()) | (compliance_df['weight'] == 9)]
+            penalty_points_9 = deduct9_df['penalty_points'].sum()
+            illegal_count_9 = deduct9_df['illegal_count'].sum()
+            score_type_dict["deduct9"] = self.score_cal_penalty_points(penalty_points_9)
+            self.type_illegal_count_dict["deduct9"] = illegal_count_9
+
+        # deduct12
+        if "deduct12" in self.type_list:
+            deduct12_df = compliance_df[(compliance_df['weight'].isna()) | (compliance_df['weight'] == 12)]
+            penalty_points_12 = deduct12_df['penalty_points'].sum()
+            illegal_count_12 = deduct12_df['illegal_count'].sum()
+            score_type_dict["deduct12"] = self.score_cal_penalty_points(penalty_points_12)
+            self.type_illegal_count_dict["deduct12"] = illegal_count_12
+
+        weight_type_list = self.weight_type_cal()
+        weight_dict = {
+            "overspeed10": 0.5,
+            "overspeed10_20": 0.5,
+            "pressSolidLine": 1.0,
+            "runRedLight": 0.5,
+            "overspeed20_50": 0.5,
+            "overspeed50": 1.0
+        }
+
+        type_list = ["deduct1", "deduct3", "deduct6", "deduct12"]
+        if not self.weight_custom:  # 客观赋权
+            self.weight_type_list = weight_type_list
+            self.weight_type_dict = {key: value for key, value in zip(type_list, weight_type_list)}
+            self.weight_dict = weight_dict
+
+        if self.penalty_points >= 12:
+            score_compliance = 0
+        elif sum(score_type_dict.values()) / len(score_type_dict) == 100:
+            score_compliance = 100
+        else:
+            score_type_tmp = [80 if x == 100 else x for key, x in score_type_dict.items()]
+            score_compliance = np.dot(self.weight_type_list, score_type_tmp)
+
+        score_compliance = round(score_compliance, 2)
+
+        print("\n[合规性表现及得分情况]")
+        print(f"合规性得分为:{score_compliance:.2f}分。")
+        print(f"合规性各分组得分为:{score_type_dict}。")
+        print(f"合规性各分组权重为:{self.weight_type_list}。")
+        # print(f"合规性各指标违规次数为:\n{count_metric}。")
+        # print(f"违法总次数为:{self.illegal_count}。")
+        # print(f"违法扣分总数为:{self.penalty_points}。")
+        # print(f"罚款总金额为:{self.penalty_money}。")
+        # print(f"警告总次数为:{self.warning_count}。")
+        # print(compliance_df)
+        return score_compliance, score_type_dict
+
+    def _get_weight_distribution(self):
+        # get weight distribution
+        weight_distribution = {}
+        weight_distribution["name"] = self.config.dimension_name["compliance"]
+
+        for type in self.type_list:
+            type_weight_indexes_dict = {key: f"{self.name_dict[key]}({value * 100:.2f}%)" for key, value in
+                                        self.weight_dict.items() if
+                                        key in self.metric_dict[type]}
+
+            weight_distribution_type = {
+                "weight": f"{self.type_name_dict[type]}({self.weight_type_dict[type] * 100:.2f}%)",
+                "indexes": type_weight_indexes_dict
+            }
+            weight_distribution[type] = weight_distribution_type
+
+        return weight_distribution
+
+    def compliance_weight_distribution(self):
+        # get weight distribution
+        weight_distribution = {}
+        weight_distribution["name"] = "合规性"
+
+        if "deduct1" in self.type_list:
+            deduct1_weight_indexes_dict = {}
+            if "overspeed10" in self.metric_list:
+                deduct1_weight_indexes_dict[
+                    "overspeed10Weight"] = f"超速,但未超过10%({self.weight_dict['overspeed10'] * 100:.2f}%)"
+
+            if "overspeed10_20" in self.metric_list:
+                deduct1_weight_indexes_dict[
+                    "overspeed1020Weight"] = f"超速10%-20%({self.weight_dict['overspeed10_20'] * 100:.2f}%)"
+
+            weight_distribution['deduct1'] = {
+                "deduct1Weight": f"轻微违规(1分)({self.weight_type_dict['deduct1'] * 100:.2f}%)",
+                "indexes": deduct1_weight_indexes_dict
+            }
+
+        if "deduct3" in self.type_list:
+            deduct3_weight_indexes_dict = {}
+
+            if "pressSolidLine" in self.metric_list:
+                deduct3_weight_indexes_dict[
+                    "pressSolidLineWeight"] = f"压实线({self.weight_dict['pressSolidLine'] * 100:.2f}%)"
+
+            weight_distribution['deduct3'] = {
+                "deduct3Weight": f"中等违规(3分)({self.weight_type_dict['deduct3'] * 100:.2f}%)",
+                "indexes": deduct3_weight_indexes_dict
+            }
+
+        if "deduct6" in self.type_list:
+            deduct6_weight_indexes_dict = {}
+
+            if "runRedLight" in self.metric_list:
+                deduct6_weight_indexes_dict["runRedLightWeight"] = f"闯红灯({self.weight_dict['runRedLight'] * 100:.2f}%)"
+
+            if "overspeed20_50" in self.metric_list:
+                deduct6_weight_indexes_dict[
+                    "overspeed2050Weight"] = f"超速20%-50%({self.weight_dict['overspeed20_50'] * 100:.2f}%)"
+
+            weight_distribution['deduct6'] = {
+                "deduct6Weight": f"危险违规(6分)({self.weight_type_dict['deduct6'] * 100:.2f}%)",
+                "indexes": deduct6_weight_indexes_dict
+            }
+
+        if "deduct9" in self.type_list:
+            deduct9_weight_indexes_dict = {}
+
+            weight_distribution['deduct9'] = {
+                "deduct9Weight": f"严重违规(9分)({self.weight_type_dict['deduct6'] * 100:.2f}%)",
+                "indexes": deduct9_weight_indexes_dict
+            }
+
+        if "deduct12" in self.type_list:
+            deduct12_weight_indexes_dict = {}
+
+            if "overspeed50" in self.metric_list:
+                deduct12_weight_indexes_dict[
+                    "overspeed50Weight"] = f"超速50%以上({self.weight_dict['overspeed50'] * 100:.2f}%)"
+
+            weight_distribution['deduct12'] = {
+                "deduct12Weight": f"重大违规(12分)({self.weight_type_dict['deduct12'] * 100:.2f}%)",
+                "indexes": deduct12_weight_indexes_dict
+            }
+
+        return weight_distribution
+
+    def report_statistic(self):
+        score_compliance, score_type_dict = self.compliance_score()
+        grade_compliance = score_grade(score_compliance)
+
+        score_compliance = int(score_compliance) if int(score_compliance) == score_compliance else score_compliance
+        score_type = [int(n) if int(n) == n else n for key, n in score_type_dict.items()]
+
+        # get weight distribution
+        # weight_distribution = self.compliance_weight_distribution()
+        weight_distribution = self._get_weight_distribution()
+
+        # if self.metric_illegal_list:
+        #     str_illegel_metric = string_concatenate(self.metric_illegal_list)
+
+        cnt1 = self.illegal_count
+        if grade_compliance == '优秀':
+            comp_description1 = '车辆在本轮测试中无违反交通法规行为;'
+        elif grade_compliance == '良好':
+            comp_description1 = f'车辆在本轮测试中共发生{cnt1}次违反交通法规⾏为;'
+        elif grade_compliance == '一般':
+            comp_description1 = f'车辆在本轮测试中共有{cnt1}次违反交通法规⾏为,需要提高算法在合规性上的表现;'
+        elif grade_compliance == '较差':
+            comp_description1 = f'车辆在本轮测试中共有{cnt1}次违反交通法规⾏为,需要提高算法在合规性上的表现;'
+
+        # xx指标得分超过基准线且无违规行为,算法表现良好
+        # 违规次数 self.illegal_count
+        # 1分xx次,3分xx次
+
+        if cnt1 == 0:
+            comp_description2 = "车辆在该用例中无违反交通法规行为,算法表现良好。"
+        else:
+            str_illegel_type = ""
+
+            for type in self.type_list:
+                if self.type_illegal_count_dict[type] > 0:
+                    str_illegel_type += f'{self.type_name_dict[type]}行为{self.type_illegal_count_dict[type]}次,'
+
+            # if "deduct1" in self.type_list:
+            #     if self.type_illegal_count_dict["deduct1"] > 0:
+            #         str_illegel_type += f'轻微违规(1分)行为{self.type_illegal_count_dict["deduct1"]}次,'
+            #
+            # if "deduct3" in self.type_list:
+            #     if self.type_illegal_count_dict["deduct3"] > 0:
+            #         str_illegel_type += f'中等违规(3分)行为{self.type_illegal_count_dict["deduct3"]}次,'
+            #
+            # if "deduct6" in self.type_list:
+            #     if self.type_illegal_count_dict["deduct6"] > 0:
+            #         str_illegel_type += f'危险违规(6分)行为{self.type_illegal_count_dict["deduct6"]}次,'
+            #
+            # if "deduct9" in self.type_list:
+            #     if self.type_illegal_count_dict["deduct9"] > 0:
+            #         str_illegel_type += f'严重违规(9分)行为{self.type_illegal_count_dict["deduct9"]}次,'
+            #
+            # if "deduct12" in self.type_list:
+            #     if self.type_illegal_count_dict["deduct12"] > 0:
+            #         str_illegel_type += f'重大违规(12分)行为{self.type_illegal_count_dict["deduct12"]}次,'
+
+            str_illegel_type = str_illegel_type[:-1]
+            comp_description2 = f"车辆在该用例共违反交通法规{cnt1}次。其中{str_illegel_type}。违规行为详情见附录C。"
+
+        # data for violations table
+        if not self.violation_df.empty:
+            # self.violation_df['time'] = self.violation_df.apply(
+            #     lambda row: self.time_frame_splice(row['start_time'], row['end_time'], row['start_frame'],
+            #                                        row['end_frame']), axis=1)
+            self.violation_df['time'] = self.violation_df.apply(
+                lambda row: self.time_splice(row['start_time'], row['end_time']), axis=1)
+            df_violations = self.violation_df[['time', 'violation']]
+            violations_slices = df_violations.to_dict('records')
+        else:
+            violations_slices = []
+
+        # violations_slices = [{'time': "[1s, 2s]", 'violation': "压实线"},
+        #                      {'time': "[10s, 20s]", 'violation': "闯红灯"},
+        #                      {'time': "[100s, 200s]", 'violation': "超速"}]
+
+        deductPoint_dict = {}
+
+        for type in self.type_list:
+            type_dict = {
+                "name": self.type_name_dict[type],
+                "score": score_type_dict[type],
+            }
+
+            type_indexes = {}
+            for metric in self.metric_list:
+                type_indexes[metric] = {
+                    # "name": self.name_dict[metric],
+                    # "name": f"{self.name_dict[metric]}({self.unit_dict[metric]})",
+                    "name": f"{self.name_dict[metric]}",
+                    "times": self.metric_illegal_count_dict[metric],
+                    "deductPoints": self.metric_penalty_points_dict[metric],
+                    "fine": self.metric_penalty_money_dict[metric],
+                    "basis": self.metric_penalty_law_dict[metric]
+                }
+            type_dict["indexes"] = type_indexes
+            deductPoint_dict[type] = type_dict
+
+        # deduct1
+        if "deduct1" in self.type_list:
+            deduct1_indexes = {}
+            if "overspeed10" in self.metric_list:
+                tmp_dict = {
+                    "name": "超速,但未超过10%",
+                    "times": self.metric_illegal_count_dict["overspeed10"],
+                    "deductPoints": self.metric_penalty_points_dict["overspeed10"],
+                    "fine": self.metric_penalty_money_dict["overspeed10"],
+                    "basis": self.metric_penalty_law_dict["overspeed10"]
+                    # "basis": "《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。"
+                }
+                deduct1_indexes['overspeed10'] = tmp_dict
+
+            if "overspeed10_20" in self.metric_list:
+                tmp_dict = {
+                    "name": "超速10%-20%",
+                    "times": self.metric_illegal_count_dict["overspeed10_20"],
+                    "deductPoints": self.metric_penalty_points_dict["overspeed10_20"],
+                    "fine": self.metric_penalty_money_dict["overspeed10_20"],
+                    "basis": self.metric_penalty_law_dict["overspeed10_20"]
+                    # "basis": "《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。"
+                }
+
+                deduct1_indexes['overspeed10_20'] = tmp_dict
+
+            deduct1_dict = {
+                "name": "轻微违规(1分)",
+                "score": score_type_dict["deduct1"],
+                "indexes": deduct1_indexes
+            }
+            deductPoint_dict["deduct1"] = deduct1_dict
+
+        # deduct3
+        if "deduct3" in self.type_list:
+            deduct3_indexes = {}
+            if "pressSolidLine" in self.metric_list:
+                tmp_dict = {
+                    "name": "压实线",
+                    "times": self.metric_illegal_count_dict["pressSolidLine"],
+                    "deductPoints": self.metric_penalty_points_dict["pressSolidLine"],
+                    "fine": self.metric_penalty_money_dict["pressSolidLine"],
+                    "basis": self.metric_penalty_law_dict["pressSolidLine"]
+                    # "basis": "《中华人民共和国道路交通安全法》第八十二条:机动车在高速公路上行驶,不得有下列行为:(三)骑、轧车行道分界线或者在路肩上行驶。"
+                }
+                deduct3_indexes['pressSolidLine'] = tmp_dict
+
+            deduct3_dict = {
+                "name": "中等违规(3分)",
+                "score": score_type_dict["deduct3"],
+                "indexes": deduct3_indexes
+            }
+            deductPoint_dict["deduct3"] = deduct3_dict
+
+        # deduct6
+        if "deduct6" in self.type_list:
+            deduct6_indexes = {}
+            if "runRedLight" in self.metric_list:
+                tmp_dict = {
+                    "name": "闯红灯",
+                    "times": self.metric_illegal_count_dict["runRedLight"],
+                    "deductPoints": self.metric_penalty_points_dict["runRedLight"],
+                    "fine": self.metric_penalty_money_dict["runRedLight"],
+                    "basis": self.metric_penalty_law_dict["runRedLight"]
+                    # "basis": "《中华人民共和国道路交通安全法实施条例》第四十条:(二)红色叉形灯或者箭头灯亮时,禁止本车道车辆通行。"
+                }
+                deduct6_indexes['runRedLight'] = tmp_dict
+
+            if "overspeed20_50" in self.metric_list:
+                tmp_dict = {
+                    "name": "超速20%-50%",
+                    "times": self.metric_illegal_count_dict["overspeed20_50"],
+                    "deductPoints": self.metric_penalty_points_dict["overspeed20_50"],
+                    "fine": self.metric_penalty_money_dict["overspeed20_50"],
+                    "basis": self.metric_penalty_law_dict["overspeed20_50"]
+                    # "basis": "《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。"
+                }
+                deduct6_indexes['overspeed20_50'] = tmp_dict
+
+            deduct6_dict = {
+                "name": "危险违规(6分)",
+                "score": score_type_dict["deduct6"],
+                "indexes": deduct6_indexes
+            }
+            deductPoint_dict["deduct6"] = deduct6_dict
+
+        # deduct9
+        if "deduct9" in self.type_list:
+            deduct9_indexes = {}
+            if "xx" in self.metric_list:
+                tmp_dict = {
+                    "name": "-",
+                    "times": "0",
+                    "deductPoints": "0",
+                    "fine": "0",
+                    "basis": "-"
+                    # "basis": "-"
+                }
+                deduct9_indexes['xx'] = tmp_dict
+
+            deduct9_dict = {
+                "name": "严重违规(9分)",
+                "score": 100,  # score_type_dict["deduct9"],
+                "indexes": deduct9_indexes
+            }
+            deductPoint_dict["deduct9"] = deduct9_dict
+
+        # deduct12
+        if "deduct12" in self.type_list:
+            deduct12_indexes = {}
+            if "overspeed50" in self.metric_list:
+                tmp_dict = {
+                    "name": "超速50%以上",
+                    "times": self.metric_illegal_count_dict["overspeed50"],
+                    "deductPoints": self.metric_penalty_points_dict["overspeed50"],
+                    "fine": self.metric_penalty_money_dict["overspeed50"],
+                    "basis": self.metric_penalty_law_dict["overspeed50"]
+                    # "basis": "《中华人民共和国道路交通安全法》第四十二条:机动车上道路行驶,不得超过限速标志标明的最高时速。"
+                }
+                deduct12_indexes['overspeed50'] = tmp_dict
+
+            deduct12_dict = {
+                "name": "重大违规(12分)",
+                "score": score_type_dict["deduct12"],
+                "indexes": deduct12_indexes
+            }
+            deductPoint_dict["deduct12"] = deduct12_dict
+
+        report_dict = {
+            "name": "合规性",
+            "weight": f"{self.weight * 100:.2f}%",
+            "weightDistribution": weight_distribution,
+            "score": score_compliance,
+            "level": grade_compliance,
+            'score_type': score_type,
+            # 'score_metric': score_metric,
+            'illegalCount': self.illegal_count,
+
+            "description1": comp_description1,
+            "description2": comp_description2,
+            "details": deductPoint_dict,
+            "violations": violations_slices
+        }
+
+        return report_dict
+
+    def get_eval_data(self):
+        df = self.eval_data
+        return df

+ 1028 - 0
config/config.json

@@ -0,0 +1,1028 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.4
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.6
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.3
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.7
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "compliance": 0.2,
+    "function": 0.2,
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 1212 - 0
config/config0328-2.json

@@ -0,0 +1,1212 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC(s)",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "MTTC(s)"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "THW(s)"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LonSD(m)"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LatSD(m)"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "DRAC(m/s^2)"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "BTN(%)"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "STN(%)"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞风险概率(%)"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞严重程度(%)"
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车速度偏差(km/h)"
+      },
+      "followDistanceDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车距离偏差(s)"
+      },
+      "followStopDistance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟停最短距离(m)"
+      },
+      "followResponseTime": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车启动响应时间(s)"
+      }
+    },
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离(m)"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布期望(m)"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布标准差(m)"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极大值(m)"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极小值(m)"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡频率(HZ)"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡极差(m)"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "平均速度(km/h)"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车平均时长(s)"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车次数(次)"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimension": {
+    "type": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "ldw_miss_warning_count4": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道偏离漏预警次数4"
+      }
+    }
+  },
+  "dimensionWeight": {
+    "compliance": 0.2147,
+    "efficient": 0.1546,
+    "comfort": 0.1824,
+    "function": 0.1297,
+    "safe": 0.1358,
+    "dimension": 0.1828
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionACC": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "dimension": {
+      "type": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "dimension": "自定义维度1",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionACC": "ACC"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "dimension": {
+      "type": "自定义分类1"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 750 - 0
config/config0328.json

@@ -0,0 +1,750 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC(s)",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "MTTC(s)"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "THW(s)"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LonSD(m)"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LatSD(m)"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "DRAC(m/s^2)"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "BTN(%)"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "STN(%)"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞风险概率(%)"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞严重程度(%)"
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车速度偏差(km/h)"
+      },
+      "followDistanceDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车距离偏差(s)"
+      },
+      "followStopDistance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟停最短距离(m)"
+      },
+      "followResponseTime": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车启动响应时间(s)"
+      }
+    },
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离(m)"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布期望(m)"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布标准差(m)"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极大值(m)"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极小值(m)"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡频率(HZ)"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡极差(m)"
+      }
+    }
+  },
+  "test": {
+    "test1111": {
+      "ldw_miss_warning_count": {
+        "name": "ldw_miss_warning_count",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "8",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "test": 0.4638,
+    "function": 0.2809,
+    "safe": 0.2552
+  },
+  "typeWeight": {
+    "test": {
+      "test1111": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionACC": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    }
+  },
+  "dimensionName": {
+    "test": "test",
+    "function": "功能性",
+    "safe": "安全性"
+  },
+  "typeName": {
+    "test": {
+      "test1111": "类型1"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionACC": "ACC"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    }
+  }
+}

+ 1152 - 0
config/config0408.json

@@ -0,0 +1,1152 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC(s)",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "MTTC(s)"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "THW(s)"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LonSD(m)"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LatSD(m)"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "DRAC(m/s^2)"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "BTN(%)"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "STN(%)"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞风险概率(%)"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞严重程度(%)"
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车速度偏差(km/h)"
+      },
+      "followDistanceDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车距离偏差(s)"
+      },
+      "followStopDistance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟停最短距离(m)"
+      },
+      "followResponseTime": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车启动响应时间(s)"
+      }
+    },
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离(m)"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布期望(m)"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布标准差(m)"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极大值(m)"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极小值(m)"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡频率(HZ)"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡极差(m)"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "平均速度(km/h)"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车平均时长(s)"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车次数(次)"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionACC": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionACC": "ACC"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 1213 - 0
config/config0410.json

@@ -0,0 +1,1213 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC(s)",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "MTTC(s)"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "THW(s)"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LonSD(m)"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LatSD(m)"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "DRAC(m/s^2)"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "BTN(%)"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "STN(%)"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞风险概率(%)"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞严重程度(%)"
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车速度偏差(km/h)"
+      },
+      "followDistanceDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车距离偏差(s)"
+      },
+      "followStopDistance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟停最短距离(m)"
+      },
+      "followResponseTime": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车启动响应时间(s)"
+      }
+    },
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离(m)"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布期望(m)"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布标准差(m)"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极大值(m)"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极小值(m)"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡频率(HZ)"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡极差(m)"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "平均速度(km/h)"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车平均时长(s)"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车次数(次)"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimension": {
+    "type": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "ldw_miss_warning_count4": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道偏离漏预警次数4"
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.1546,
+    "compliance": 0.2147,
+    "function": 0.1297,
+    "safe": 0.1358,
+    "dimension": 0.1828,
+    "comfort": 0.1824
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionACC": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "dimension": {
+      "type": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "dimension": "自定义维度1",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionACC": "ACC"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "dimension": {
+      "type": "自定义分类1"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "scoreModel": "builtin"
+}

+ 1200 - 0
config/config0415.json

@@ -0,0 +1,1200 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC(s)",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "MTTC(s)"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "THW(s)"
+      },
+      "ldw_miss_warning_count": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "ldw_miss_warning_count"
+      },
+      "ldw_miss_warning_count1": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "ldw_miss_warning_count1"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LonSD(m)"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "LatSD(m)"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "DRAC(m/s^2)"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "BTN(%)"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "STN(%)"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞风险概率(%)"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "碰撞严重程度(%)"
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车速度偏差(km/h)"
+      },
+      "followDistanceDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车距离偏差(s)"
+      },
+      "followStopDistance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟停最短距离(m)"
+      },
+      "followResponseTime": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "跟车启动响应时间(s)"
+      }
+    },
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离(m)"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布期望(m)"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离分布标准差(m)"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极大值(m)"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "车道中心线横向距离极小值(m)"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡频率(HZ)"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向相对位置震荡极差(m)"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "平均速度(km/h)"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车平均时长(s)"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "停车次数(次)"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionACC": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionACC": "ACC"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
config/config0513.json


+ 1248 - 0
config/config0530-2.json

@@ -0,0 +1,1248 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "name": "MTTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "THW": {
+        "name": "THW",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "name": "LonSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "LatSD": {
+        "name": "LatSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2"
+      },
+      "BTN": {
+        "name": "BTN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "STN": {
+        "name": "STN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险概率",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.8",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    }
+  },
+  "function": {
+    "functionLKA": {
+      "laneDistance": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离"
+      },
+      "centerDistanceExpectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布期望"
+      },
+      "centerDistanceStandardDeviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "centerDistanceMax": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离极大值"
+      },
+      "centerDistanceMin": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离极小值"
+      },
+      "centerDistanceFrequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "HZ",
+        "name": "横向相对位置震荡频率"
+      },
+      "centerDistanceRange": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向相对位置震荡极差"
+      }
+    },
+    "functionICA": {
+      "ica_speed_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h",
+        "name": "跟车速度偏差"
+      },
+      "ica_distance_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车距离偏差"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟停最短距离"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "center_distance_expectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.0",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "ica车道中心线横向距离分布期望"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "ica车道中心线横向距离分布标准差"
+      },
+      "center_distance_max": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "ica车道中心线横向距离极大值"
+      },
+      "center_distance_min": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.0",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "ica车道中心线横向距离极小值"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionICA": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionICA": "ICA"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 1152 - 0
config/config0530-3.json

@@ -0,0 +1,1152 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "MTTC"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "THW"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "LonSD"
+      },
+      "LatSD": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "LatSD"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2",
+        "name": "DRAC"
+      },
+      "BTN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "BTN"
+      },
+      "STN": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "STN"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞风险概率"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞严重程度"
+      }
+    }
+  },
+  "function": {
+    "functionLKA": {
+      "laneDistance": {
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.9",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "HZ"
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.8",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "functionICA": {
+      "ica_speed_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h",
+        "name": "跟车速度偏差"
+      },
+      "ica_distance_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车距离偏差"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "跟停最短距离"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "center_distance_expectation": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.0",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布期望"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "center_distance_max": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离极大值"
+      },
+      "center_distance_min": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.0",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离极小值"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "24",
+            "multiple": [
+              "0.8",
+              "1.25"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h",
+        "name": "平均速度"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionICA": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionICA": "ICA"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 1176 - 0
config/config0530.json

@@ -0,0 +1,1176 @@
+{
+    "safe": {
+        "safeTime": {
+            "TTC": {
+                "name": "TTC",
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "2.86",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s"
+            },
+            "MTTC": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s",
+                "name": "MTTC"
+            },
+            "THW": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.4",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s",
+                "name": "THW"
+            }
+        },
+        "safeDistance": {
+            "LonSD": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "LonSD"
+            },
+            "LatSD": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "LatSD"
+            }
+        },
+        "safeAcceleration": {
+            "DRAC": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m/s^2",
+                "name": "DRAC"
+            },
+            "BTN": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "%",
+                "name": "BTN"
+            },
+            "STN": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "%",
+                "name": "STN"
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.19",
+                            "5.4"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "%",
+                "name": "碰撞风险概率"
+            },
+            "collisionSeverity": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "%",
+                "name": "碰撞严重程度"
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "km/h",
+                "name": "跟车速度偏差"
+            },
+            "followDistanceDeviation": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s",
+                "name": "跟车距离偏差"
+            },
+            "followStopDistance": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "跟停最短距离"
+            },
+            "followResponseTime": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1.2",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s",
+                "name": "跟车启动响应时间"
+            }
+        },
+        "functionLKA": {
+            "laneDistance": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "车道内偏移行驶时,与近侧车道线的横向距离"
+            },
+            "ica_speed_deviation": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "km/h",
+                "name": "ica跟车速度偏差"
+            },
+            "centerDistanceExpectation": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "车道中心线横向距离分布期望"
+            },
+            "centerDistanceStandardDeviation": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "车道中心线横向距离分布标准差"
+            },
+            "centerDistanceMax": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "车道中心线横向距离极大值"
+            },
+            "centerDistanceMin": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "车道中心线横向距离极小值"
+            },
+            "centerDistanceFrequency": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "HZ",
+                "name": "横向相对位置震荡频率"
+            },
+            "centerDistanceRange": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "m",
+                "name": "横向相对位置震荡极差"
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": null,
+                "name": "画龙"
+            },
+            "shake": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": null,
+                "name": "晃动"
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": null,
+                "name": "顿挫"
+            },
+            "slamBrake": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": null,
+                "name": "急刹"
+            },
+            "slamAccelerate": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": null,
+                "name": "急加速"
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "24",
+                        "multiple": [
+                            "0.8",
+                            "1.25"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "km/h",
+                "name": "平均速度"
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "s",
+                "name": "停车平均时长"
+            },
+            "stopCount": {
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ],
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ]
+                    }
+                ],
+                "weight": null,
+                "unit": "次",
+                "name": "停车次数"
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "weight": null,
+                "unit": null,
+                "name": "超速,但未超过10%"
+            },
+            "overspeed10_20": {
+                "weight": null,
+                "unit": null,
+                "name": "超速10%-20%"
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "weight": null,
+                "unit": null,
+                "name": "压实线"
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "weight": null,
+                "unit": null,
+                "name": "闯红灯"
+            },
+            "overspeed20_50": {
+                "weight": null,
+                "unit": null,
+                "name": "超速20%-50%"
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "weight": null,
+                "unit": null
+            }
+        }
+    },
+    "dimensionWeight": {
+        "efficient": 0.2,
+        "compliance": 0.2,
+        "function": 0.2,
+        "safe": 0.2,
+        "comfort": 0.2
+    },
+    "typeWeight": {
+        "efficient": {
+            "efficientDrive": null,
+            "efficientStop": null
+        },
+        "compliance": {
+            "deduct3": null,
+            "deduct6": null,
+            "deduct12": null,
+            "deduct1": null
+        },
+        "function": {
+            "functionLKA": null,
+            "functionACC": null
+        },
+        "safe": {
+            "safeDistance": null,
+            "safeTime": null,
+            "safeProbability": null,
+            "safeAcceleration": null
+        },
+        "comfort": {
+            "comfortLat": null,
+            "comfortLon": null
+        }
+    },
+    "dimensionName": {
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "typeName": {
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)",
+            "deduct1": "轻微违规(扣1分)"
+        },
+        "function": {
+            "functionLKA": "LKA",
+            "functionACC": "ACC"
+        },
+        "safe": {
+            "safeDistance": "距离类型",
+            "safeTime": "时间类型",
+            "safeProbability": "概率类型",
+            "safeAcceleration": "加速度类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    }
+}

+ 1152 - 0
config/config0531.json

@@ -0,0 +1,1152 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "name": "MTTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "THW"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "name": "LonSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "LatSD": {
+        "name": "LatSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2"
+      },
+      "BTN": {
+        "name": "BTN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "STN": {
+        "name": "STN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞风险概率"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞严重程度"
+      }
+    }
+  },
+  "function": {
+    "functionLKA": {
+      "laneDistance": {
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.9",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "HZ"
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.8",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "functionICA": {
+      "center_distance_expectation": {
+        "name": "车道中心线横向距离分布期望",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_max": {
+        "name": "车道中心线横向距离极大值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_min": {
+        "name": "车道中心线横向距离极小值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "ica_distance_deviation": {
+        "name": "跟车距离偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "ica_speed_deviation": {
+        "name": "跟车速度偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "20",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "跟停最短距离"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "30",
+            "multiple": [
+              "0.8",
+              "1.2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionICA": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionICA": "ICA"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 1152 - 0
config/config0612_ica+lka.json

@@ -0,0 +1,1152 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "name": "MTTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "THW"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "name": "LonSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "LatSD": {
+        "name": "LatSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2"
+      },
+      "BTN": {
+        "name": "BTN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "STN": {
+        "name": "STN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞风险概率"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞严重程度"
+      }
+    }
+  },
+  "function": {
+    "functionLKA": {
+      "laneDistance": {
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.9",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "HZ"
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.8",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "functionICA": {
+      "center_distance_expectation": {
+        "name": "车道中心线横向距离分布期望",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_max": {
+        "name": "车道中心线横向距离极大值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_min": {
+        "name": "车道中心线横向距离极小值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "ica_distance_deviation": {
+        "name": "跟车距离偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "ica_speed_deviation": {
+        "name": "跟车速度偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "20",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "跟停最短距离"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "30",
+            "multiple": [
+              "0.8",
+              "1.2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionICA": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionICA": "ICA"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

+ 1 - 0
config/config_0416.json

@@ -0,0 +1 @@
+{"safe":{"safeTime":{"ldw_miss_warning_count":{"priority":"1","paramList":[{"kind":"-1","spare":[{"param":null},{"param":null}],"optimal":"1","multiple":["0.5","15"]}],"weight":null,"unit":null,"name":"ldw_miss_warning_count"},"ldw_miss_warning_count1":{"priority":"1","paramList":[{"kind":"-1","spare":[{"param":null},{"param":null}],"optimal":"1","multiple":["0.33","3"]}],"weight":null,"unit":null,"name":"ldw_miss_warning_count1"}}},"cusDimension":{"testType":{"ldw_count":{"priority":"1","paramList":[{"kind":"-1","spare":[{"param":null},{"param":null}],"optimal":"1","multiple":["0.5","15"]}],"weight":null,"unit":null,"name":"ldw_count"}}},"dimensionWeight":{"cusDimension":0.2,"safe":0.2},"typeWeight":{"cusDimension":{"testType":null},"safe":{"safeTime":null}},"dimensionName":{"cusDimension":"维度性","safe":"安全性"},"typeName":{"cusDimension":{"testType":"测试类型"},"safe":{"safeTime":"时间类型"}}}

File diff suppressed because it is too large
+ 0 - 0
config/config_0510.json


+ 214 - 0
config/config_ica.json

@@ -0,0 +1,214 @@
+{
+  "function": {
+    "functionICA": {
+      "ica_speed_deviation": {
+        "name": "跟车速度偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "20",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      },
+      "ica_distance_deviation": {
+        "name": "跟车距离偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "跟停最短距离"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "center_distance_expectation": {
+        "name": "车道中心线横向距离分布期望",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "center_distance_max": {
+        "name": "车道中心线横向距离极大值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_min": {
+        "name": "车道中心线横向距离极小值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    }
+  },
+  "dimensionWeight": {
+    "function": 1.0
+  },
+  "typeWeight": {
+    "function": {
+      "functionICA": null
+    }
+  },
+  "dimensionName": {
+    "function": "功能性"
+  },
+  "typeName": {
+    "function": {
+      "functionICA": "ICA"
+    }
+  }
+}

+ 1196 - 0
config/config_ica_0730.json

@@ -0,0 +1,1196 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "name": "MTTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "THW"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "name": "LonSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "LatSD": {
+        "name": "LatSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2"
+      },
+      "BTN": {
+        "name": "BTN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "STN": {
+        "name": "STN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞风险概率"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞严重程度"
+      }
+    }
+  },
+  "function": {
+    "function_ICA": {
+      "cicv_ica_lateral_control01_distance_nearby_lane": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "离近侧车道线最小距离"
+      },
+      "cicv_ica_lateral_control02_lateral_offset": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "最大横向偏移量"
+      },
+      "cicv_ica_lateral_control03_relative_center_distance_expectation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "相对横向偏移量分布期望"
+      },
+      "cicv_ica_lateral_control04_relative_center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "相对横向偏移量分布标准差"
+      },
+      "cicv_ica_lateral_control05_absolute_center_distance_expectation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "绝对横向偏移量分布期望"
+      },
+      "cicv_ica_lateral_control06_absolute_center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "绝对横向偏移量分布标准差"
+      },
+      "cicv_ica_lateral_control07_center_distance_max": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "横向距离极大值"
+      },
+      "cicv_ica_lateral_control08_center_distance_min": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向距离极小值"
+      },
+      "cicv_ica_lateral_control09_absolute_position_oscillation_frequency": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "Hz",
+        "name": "横向绝对位置振荡频率"
+      },
+      "cicv_ica_lateral_control10_absolute_position_oscillation_difference": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向绝对位置振荡极差"
+      },
+      "cicv_ica_lateral_control11_heading_deviation_max": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "rad",
+        "name": "最大航向角偏差"
+      },
+      "cicv_ica_lateral_control12_relative_position_oscillation_frequency": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "Hz",
+        "name": "横向相对位置振荡频率"
+      },
+      "cicv_ica_lateral_control13_relative_position_oscillation_difference": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.00001",
+            "multiple": [
+              "1",
+              "10000000"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向相对位置振荡极差"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "30",
+            "multiple": [
+              "0.8",
+              "1.2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "function_ICA": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "function_ICA": "function_ICA"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
config/config_lka_0722.json


File diff suppressed because it is too large
+ 0 - 0
config/config_lka_0730.json


+ 993 - 0
configDuplicate/EgoState.csv

@@ -0,0 +1,993 @@
+simTime,v,travelDist
+0,0,9999.00 
+0,0,9999.00 
+0.01,60.01236,9999.00 
+0.02,60.03432,9999.00 
+0.03,60.03936,9999.00 
+0.04,60.03288,9999.00 
+0.05,60.03252,9999.00 
+0.06,60.0318,9999.00 
+0.07,60.03144,9999.00 
+0.08,60.03108,9999.00 
+0.09,60.03072,9999.00 
+0.1,60.03036,9999.00 
+0.11,60.03,9999.00 
+0.12,60.02928,9999.00 
+0.13,60.02892,9999.00 
+0.14,60.02856,9999.00 
+0.15,60.0282,9999.00 
+0.16,60.02784,9999.00 
+0.17,60.02748,9999.00 
+0.18,60.02712,9999.00 
+0.19,60.02676,9999.00 
+0.2,60.0264,9999.00 
+0.21,60.02604,9999.00 
+0.22,60.02568,9999.00 
+0.23,60.02532,9999.00 
+0.24,60.02496,9999.00 
+0.25,60.0246,9999.00 
+0.26,60.02424,9999.00 
+0.27,60.02388,9999.00 
+0.28,60.02352,9999.00 
+0.29,60.02316,9999.00 
+0.3,60.0228,9999.00 
+0.31,60.02244,9999.00 
+0.32,60.02208,9999.00 
+0.33,60.02208,9999.00 
+0.34,60.02172,9999.00 
+0.35,60.02136,9999.00 
+0.36,60.021,9999.00 
+0.37,60.02064,9999.00 
+0.38,60.02028,9999.00 
+0.39,60.02028,9999.00 
+0.4,60.01992,9999.00 
+0.41,60.01956,9999.00 
+0.42,60.0192,9999.00 
+0.43,60.01884,9999.00 
+0.44,60.01884,9999.00 
+0.45,60.01848,9999.00 
+0.46,60.01812,9999.00 
+0.47,60.01776,9999.00 
+0.48,60.01776,9999.00 
+0.49,60.0174,9999.00 
+0.5,60.01704,9999.00 
+0.51,60.01704,9999.00 
+0.52,60.01668,9999.00 
+0.53,60.01632,9999.00 
+0.54,60.01596,9999.00 
+0.55,60.01596,9999.00 
+0.56,60.0156,9999.00 
+0.57,60.01524,9999.00 
+0.58,60.01524,9999.00 
+0.59,60.01488,9999.00 
+0.6,60.01488,9999.00 
+0.61,60.01452,9999.00 
+0.62,60.01416,9999.00 
+0.63,60.01416,9999.00 
+0.64,60.0138,9999.00 
+0.65,60.0138,9999.00 
+0.66,60.01344,9999.00 
+0.67,60.01308,9999.00 
+0.68,60.01308,9999.00 
+0.69,60.01272,9999.00 
+0.7,60.01272,9999.00 
+0.71,60.01236,9999.00 
+0.72,60.01236,9999.00 
+0.73,60.012,9999.00 
+0.74,60.012,9999.00 
+0.75,60.01164,9999.00 
+0.76,60.01164,9999.00 
+0.77,60.01128,9999.00 
+0.78,60.01128,9999.00 
+0.79,60.01092,9999.00 
+0.8,60.01092,9999.00 
+0.81,60.01056,9999.00 
+0.82,60.01056,9999.00 
+0.83,60.0102,9999.00 
+0.84,60.0102,9999.00 
+0.85,60.00984,9999.00 
+0.86,60.00984,9999.00 
+0.87,60.00948,9999.00 
+0.88,60.00948,9999.00 
+0.89,60.00912,9999.00 
+0.9,60.00912,9999.00 
+0.91,60.00876,9999.00 
+0.92,60.00876,9999.00 
+0.93,60.00876,9999.00 
+0.94,60.0084,9999.00 
+0.95,60.0084,9999.00 
+0.96,60.00804,9999.00 
+0.97,60.00804,9999.00 
+0.98,60.00804,9999.00 
+0.99,60.00768,9999.00 
+1,60.00768,9999.00 
+1.01,60.00732,9999.00 
+1.02,60.00732,9999.00 
+1.03,60.00732,9999.00 
+1.04,60.00696,9999.00 
+1.05,60.00696,9999.00 
+1.06,60.00696,9999.00 
+1.07,60.0066,9999.00 
+1.08,60.0066,9999.00 
+1.09,60.0066,9999.00 
+1.1,60.00624,9999.00 
+1.11,60.00624,9999.00 
+1.12,60.00624,9999.00 
+1.13,60.00588,9999.00 
+1.14,60.00588,9999.00 
+1.15,60.00588,9999.00 
+1.16,60.00552,9999.00 
+1.17,60.00552,9999.00 
+1.18,60.00552,9999.00 
+1.19,60.00516,9999.00 
+1.2,60.00516,9999.00 
+1.21,60.00516,9999.00 
+1.22,60.00516,9999.00 
+1.23,60.0048,9999.00 
+1.24,60.0048,9999.00 
+1.25,60.0048,9999.00 
+1.26,60.00444,9999.00 
+1.27,60.00444,9999.00 
+1.28,60.00444,9999.00 
+1.29,60.00444,9999.00 
+1.3,60.00408,9999.00 
+1.31,60.00408,9999.00 
+1.32,60.00408,9999.00 
+1.33,60.00408,9999.00 
+1.34,60.00372,9999.00 
+1.35,60.00372,9999.00 
+1.36,60.00372,9999.00 
+1.37,60.00372,9999.00 
+1.38,60.00336,9999.00 
+1.39,60.00336,9999.00 
+1.4,60.00336,9999.00 
+1.41,60.00336,9999.00 
+1.42,60.003,9999.00 
+1.43,60.003,9999.00 
+1.44,60.003,9999.00 
+1.45,60.003,9999.00 
+1.46,60.003,9999.00 
+1.47,60.00264,9999.00 
+1.48,60.00264,9999.00 
+1.49,60.00264,9999.00 
+1.5,60.00264,9999.00 
+1.51,60.00264,9999.00 
+1.52,60.00228,9999.00 
+1.53,60.00228,9999.00 
+1.54,60.00228,9999.00 
+1.55,60.00228,9999.00 
+1.56,60.00228,9999.00 
+1.57,60.00192,9999.00 
+1.58,60.00192,9999.00 
+1.59,60.00192,9999.00 
+1.6,60.00192,9999.00 
+1.61,60.00192,9999.00 
+1.62,60.00156,9999.00 
+1.63,60.00156,9999.00 
+1.64,60.00156,9999.00 
+1.65,60.00156,9999.00 
+1.66,60.00156,9999.00 
+1.67,60.00156,9999.00 
+1.68,60.0012,9999.00 
+1.69,60.0012,9999.00 
+1.7,60.0012,9999.00 
+1.71,60.0012,9999.00 
+1.72,60.0012,9999.00 
+1.73,60.0012,9999.00 
+1.74,60.0012,9999.00 
+1.75,60.00084,9999.00 
+1.76,60.00084,9999.00 
+1.77,60.00084,9999.00 
+1.78,60.00084,9999.00 
+1.79,60.00084,9999.00 
+1.8,60.00084,9999.00 
+1.81,60.00084,9999.00 
+1.82,60.00048,9999.00 
+1.83,60.00048,9999.00 
+1.84,60.00048,9999.00 
+1.85,60.00048,9999.00 
+1.86,60.00048,9999.00 
+1.87,60.00048,9999.00 
+1.88,60.00048,9999.00 
+1.89,60.00048,9999.00 
+1.9,60.00012,9999.00 
+1.91,60.00012,9999.00 
+1.92,60.00012,9999.00 
+1.93,60.00012,9999.00 
+1.94,60.00012,9999.00 
+1.95,60.00012,9999.00 
+1.96,60.00012,9999.00 
+1.97,60.00012,9999.00 
+1.98,59.99976,9999.00 
+1.99,59.99976,9999.00 
+2,59.99976,9999.00 
+2.01,59.99976,9999.00 
+2.02,59.99976,9999.00 
+2.03,59.99976,9999.00 
+2.04,59.99976,9999.00 
+2.05,59.99976,9999.00 
+2.06,59.99976,9999.00 
+2.07,59.99976,9999.00 
+2.08,59.9994,9999.00 
+2.09,59.9994,9999.00 
+2.1,59.9994,9999.00 
+2.11,59.9994,9999.00 
+2.12,59.9994,9999.00 
+2.13,59.9994,9999.00 
+2.14,59.9994,9999.00 
+2.15,59.9994,9999.00 
+2.16,59.9994,9999.00 
+2.17,59.9994,9999.00 
+2.18,59.9994,9999.00 
+2.19,59.9994,9999.00 
+2.2,59.99904,9999.00 
+2.21,59.99904,9999.00 
+2.22,59.99904,9999.00 
+2.23,59.99904,9999.00 
+2.24,59.99904,9999.00 
+2.25,59.99904,9999.00 
+2.26,59.99904,9999.00 
+2.27,59.99904,9999.00 
+2.28,59.99904,9999.00 
+2.29,59.99904,9999.00 
+2.3,59.99904,9999.00 
+2.31,59.99904,9999.00 
+2.32,59.99904,9999.00 
+2.33,59.99868,9999.00 
+2.34,59.99868,9999.00 
+2.35,59.99868,9999.00 
+2.36,59.99868,9999.00 
+2.37,59.99868,9999.00 
+2.38,59.99868,9999.00 
+2.39,59.99868,9999.00 
+2.4,59.99868,9999.00 
+2.41,59.99868,9999.00 
+2.42,59.99868,9999.00 
+2.43,59.99868,9999.00 
+2.44,59.99868,9999.00 
+2.45,59.99868,9999.00 
+2.46,59.99868,9999.00 
+2.47,59.99868,9999.00 
+2.48,59.99868,9999.00 
+2.49,59.99868,9999.00 
+2.5,59.99868,9999.00 
+2.51,59.99832,9999.00 
+2.52,59.99832,9999.00 
+2.53,59.99832,9999.00 
+2.54,59.99832,9999.00 
+2.55,59.99832,9999.00 
+2.56,59.99832,9999.00 
+2.57,59.99832,9999.00 
+2.58,59.99832,9999.00 
+2.59,59.99832,9999.00 
+2.6,59.99832,9999.00 
+2.61,59.99832,9999.00 
+2.62,59.99832,9999.00 
+2.63,59.99832,9999.00 
+2.64,59.99832,9999.00 
+2.65,59.99832,9999.00 
+2.66,59.99832,9999.00 
+2.67,59.99832,9999.00 
+2.68,59.99832,9999.00 
+2.69,59.99832,9999.00 
+2.7,59.99832,9999.00 
+2.71,59.99832,9999.00 
+2.72,59.99832,9999.00 
+2.73,59.99832,9999.00 
+2.74,59.99832,9999.00 
+2.75,59.99796,9999.00 
+2.76,59.99796,9999.00 
+2.77,59.99796,9999.00 
+2.78,59.99796,9999.00 
+2.79,59.99796,9999.00 
+2.8,59.99796,9999.00 
+2.81,59.99796,9999.00 
+2.82,59.99796,9999.00 
+2.83,59.99796,9999.00 
+2.84,59.99796,9999.00 
+2.85,59.99796,9999.00 
+2.86,59.99796,9999.00 
+2.87,59.99796,9999.00 
+2.88,59.99796,9999.00 
+2.89,59.99796,9999.00 
+2.9,59.99796,9999.00 
+2.91,59.99796,9999.00 
+2.92,59.99796,9999.00 
+2.93,59.99796,9999.00 
+2.94,59.99796,9999.00 
+2.95,59.99796,9999.00 
+2.96,59.99796,9999.00 
+2.97,59.99796,9999.00 
+2.98,59.99796,9999.00 
+2.99,59.99796,9999.00 
+3,59.99796,9999.00 
+3.01,59.99796,9999.00 
+3.02,59.99796,9999.00 
+3.03,59.99796,9999.00 
+3.04,59.99796,9999.00 
+3.05,59.99796,9999.00 
+3.06,59.99796,9999.00 
+3.07,59.99796,9999.00 
+3.08,59.99796,9999.00 
+3.09,59.99796,9999.00 
+3.1,59.99796,9999.00 
+3.11,59.99796,9999.00 
+3.12,59.99796,9999.00 
+3.13,59.99796,9999.00 
+3.14,59.99796,9999.00 
+3.15,59.99796,9999.00 
+3.16,59.9976,9999.00 
+3.17,59.9976,9999.00 
+3.18,59.9976,9999.00 
+3.19,59.9976,9999.00 
+3.2,59.9976,9999.00 
+3.21,59.9976,9999.00 
+3.22,59.9976,9999.00 
+3.23,59.9976,9999.00 
+3.24,59.9976,9999.00 
+3.25,59.9976,9999.00 
+3.26,59.9976,9999.00 
+3.27,59.9976,9999.00 
+3.28,59.9976,9999.00 
+3.29,59.9976,9999.00 
+3.3,59.9976,9999.00 
+3.31,59.9976,9999.00 
+3.32,59.9976,9999.00 
+3.33,59.9976,9999.00 
+3.34,59.9976,9999.00 
+3.35,59.9976,9999.00 
+3.36,59.9976,9999.00 
+3.37,59.9976,9999.00 
+3.38,59.9976,9999.00 
+3.39,59.9976,9999.00 
+3.4,59.9976,9999.00 
+3.41,59.9976,9999.00 
+3.42,59.9976,9999.00 
+3.43,59.9976,9999.00 
+3.44,59.9976,9999.00 
+3.45,59.9976,9999.00 
+3.46,59.9976,9999.00 
+3.47,59.9976,9999.00 
+3.48,59.9976,9999.00 
+3.49,59.9976,9999.00 
+3.5,59.9976,9999.00 
+3.51,59.9976,9999.00 
+3.52,59.9976,9999.00 
+3.53,59.9976,9999.00 
+3.54,59.9976,9999.00 
+3.55,59.9976,9999.00 
+3.56,59.9976,9999.00 
+3.57,59.9976,9999.00 
+3.58,59.9976,9999.00 
+3.59,59.9976,9999.00 
+3.6,59.9976,9999.00 
+3.61,59.9976,9999.00 
+3.62,59.9976,9999.00 
+3.63,59.9976,9999.00 
+3.64,59.9976,9999.00 
+3.65,59.9976,9999.00 
+3.66,59.9976,9999.00 
+3.67,59.9976,9999.00 
+3.68,59.9976,9999.00 
+3.69,59.9976,9999.00 
+3.7,59.9976,9999.00 
+3.71,59.9976,9999.00 
+3.72,59.9976,9999.00 
+3.73,59.9976,9999.00 
+3.74,59.9976,9999.00 
+3.75,59.9976,9999.00 
+3.76,59.9976,9999.00 
+3.77,59.9976,9999.00 
+3.78,59.9976,9999.00 
+3.79,59.9976,9999.00 
+3.8,59.9976,9999.00 
+3.81,59.9976,9999.00 
+3.82,59.9976,9999.00 
+3.83,59.9976,9999.00 
+3.84,59.9976,9999.00 
+3.85,59.9976,9999.00 
+3.86,59.9976,9999.00 
+3.87,59.9976,9999.00 
+3.88,59.9976,9999.00 
+3.89,59.9976,9999.00 
+3.9,59.9976,9999.00 
+3.91,59.9976,9999.00 
+3.92,59.9976,9999.00 
+3.93,59.9976,9999.00 
+3.94,59.9976,9999.00 
+3.95,59.9976,9999.00 
+3.96,59.9976,9999.00 
+3.97,59.9976,9999.00 
+3.98,59.9976,9999.00 
+3.99,59.9976,9999.00 
+4,59.9976,9999.00 
+4.01,59.9976,9999.00 
+4.02,59.9976,9999.00 
+4.03,59.9976,9999.00 
+4.04,59.9976,9999.00 
+4.05,59.9976,9999.00 
+4.06,59.9976,9999.00 
+4.07,59.9976,9999.00 
+4.08,59.9976,9999.00 
+4.09,59.9976,9999.00 
+4.1,59.9976,9999.00 
+4.11,59.9976,9999.00 
+4.12,59.9976,9999.00 
+4.13,59.9976,9999.00 
+4.14,59.9976,9999.00 
+4.15,59.9976,9999.00 
+4.16,59.9976,9999.00 
+4.17,59.9976,9999.00 
+4.18,59.9976,9999.00 
+4.19,59.9976,9999.00 
+4.2,59.9976,9999.00 
+4.21,59.9976,9999.00 
+4.22,59.9976,9999.00 
+4.23,59.9976,9999.00 
+4.24,59.9976,9999.00 
+4.25,59.9976,9999.00 
+4.26,59.9976,9999.00 
+4.27,59.9976,9999.00 
+4.28,59.9976,9999.00 
+4.29,59.9976,9999.00 
+4.3,59.9976,9999.00 
+4.31,59.9976,9999.00 
+4.32,59.9976,9999.00 
+4.33,59.9976,9999.00 
+4.34,59.9976,9999.00 
+4.35,59.9976,9999.00 
+4.36,59.9976,9999.00 
+4.37,59.9976,9999.00 
+4.38,59.9976,9999.00 
+4.39,59.9976,9999.00 
+4.4,59.9976,9999.00 
+4.41,59.9976,9999.00 
+4.42,59.9976,9999.00 
+4.43,59.9976,9999.00 
+4.44,59.9976,9999.00 
+4.45,59.9976,9999.00 
+4.46,59.9976,9999.00 
+4.47,59.9976,9999.00 
+4.48,59.9976,9999.00 
+4.49,59.9976,9999.00 
+4.5,59.9976,9999.00 
+4.51,59.9976,9999.00 
+4.52,59.9976,9999.00 
+4.53,59.9976,9999.00 
+4.54,59.9976,9999.00 
+4.55,59.9976,9999.00 
+4.56,59.9976,9999.00 
+4.57,59.9976,9999.00 
+4.58,59.9976,9999.00 
+4.59,59.9976,9999.00 
+4.6,59.9976,9999.00 
+4.61,59.9976,9999.00 
+4.62,59.9976,9999.00 
+4.63,59.9976,9999.00 
+4.64,59.9976,9999.00 
+4.65,59.9976,9999.00 
+4.66,59.9976,9999.00 
+4.67,59.9976,9999.00 
+4.68,59.9976,9999.00 
+4.69,59.9976,9999.00 
+4.7,59.9976,9999.00 
+4.71,59.9976,9999.00 
+4.72,59.9976,9999.00 
+4.73,59.9976,9999.00 
+4.74,59.9976,9999.00 
+4.75,59.9976,9999.00 
+4.76,59.9976,9999.00 
+4.77,59.9976,9999.00 
+4.78,59.9976,9999.00 
+4.79,59.9976,9999.00 
+4.8,59.9976,9999.00 
+4.81,59.9976,9999.00 
+4.82,59.9976,9999.00 
+4.83,59.9976,9999.00 
+4.84,59.9976,9999.00 
+4.85,59.9976,9999.00 
+4.86,59.9976,9999.00 
+4.87,59.9976,9999.00 
+4.88,59.9976,9999.00 
+4.89,59.9976,9999.00 
+4.9,59.9976,9999.00 
+4.91,59.9976,9999.00 
+4.92,59.9976,9999.00 
+4.93,59.9976,9999.00 
+4.94,59.9976,9999.00 
+4.95,59.9976,9999.00 
+4.96,59.9976,9999.00 
+4.97,59.9976,9999.00 
+4.98,59.9976,9999.00 
+4.99,59.9976,9999.00 
+5,59.9976,9999.00 
+5.01,59.9976,9999.00 
+5.02,59.9976,9999.00 
+5.03,59.9976,9999.00 
+5.04,59.9976,9999.00 
+5.05,59.9976,9999.00 
+5.06,59.9976,9999.00 
+5.07,59.9976,9999.00 
+5.08,59.9976,9999.00 
+5.09,59.9976,9999.00 
+5.1,59.9976,9999.00 
+5.11,59.9976,9999.00 
+5.12,59.9976,9999.00 
+5.13,59.9976,9999.00 
+5.14,59.9976,9999.00 
+5.15,59.9976,9999.00 
+5.16,59.9976,9999.00 
+5.17,59.9976,9999.00 
+5.18,59.9976,9999.00 
+5.19,59.9976,9999.00 
+5.2,59.9976,9999.00 
+5.21,59.9976,9999.00 
+5.22,59.9976,9999.00 
+5.23,59.9976,9999.00 
+5.24,59.9976,9999.00 
+5.25,59.9976,9999.00 
+5.26,59.9976,9999.00 
+5.27,59.9976,9999.00 
+5.28,59.9976,9999.00 
+5.29,59.9976,9999.00 
+5.3,59.9976,9999.00 
+5.31,59.9976,9999.00 
+5.32,59.9976,9999.00 
+5.33,59.9976,9999.00 
+5.34,59.9976,9999.00 
+5.35,59.99796,9999.00 
+5.36,59.99796,9999.00 
+5.37,59.99796,9999.00 
+5.38,59.99796,9999.00 
+5.39,59.99796,9999.00 
+5.4,59.99796,9999.00 
+5.41,59.99796,9999.00 
+5.42,59.99796,9999.00 
+5.43,59.99796,9999.00 
+5.44,59.99796,9999.00 
+5.45,59.99796,9999.00 
+5.46,59.99796,9999.00 
+5.47,59.99796,9999.00 
+5.48,59.99796,9999.00 
+5.49,59.99796,9999.00 
+5.5,59.99796,9999.00 
+5.51,59.99796,9999.00 
+5.52,59.99796,9999.00 
+5.53,59.99796,9999.00 
+5.54,59.99796,9999.00 
+5.55,59.99796,9999.00 
+5.56,59.99796,9999.00 
+5.57,59.99796,9999.00 
+5.58,59.99796,9999.00 
+5.59,59.99796,9999.00 
+5.6,59.99796,9999.00 
+5.61,59.99796,9999.00 
+5.62,59.99796,9999.00 
+5.63,59.99796,9999.00 
+5.64,59.99796,9999.00 
+5.65,59.99796,9999.00 
+5.66,59.99796,9999.00 
+5.67,59.99796,9999.00 
+5.68,59.99796,9999.00 
+5.69,59.99796,9999.00 
+5.7,59.99796,9999.00 
+5.71,59.99796,9999.00 
+5.72,59.99796,9999.00 
+5.73,59.99796,9999.00 
+5.74,59.99796,9999.00 
+5.75,59.99796,9999.00 
+5.76,59.99796,9999.00 
+5.77,59.99796,9999.00 
+5.78,59.99796,9999.00 
+5.79,59.99796,9999.00 
+5.8,59.99796,9999.00 
+5.81,59.99796,9999.00 
+5.82,59.99796,9999.00 
+5.83,59.99796,9999.00 
+5.84,59.99796,9999.00 
+5.85,59.99796,9999.00 
+5.86,59.99796,9999.00 
+5.87,59.99796,9999.00 
+5.88,59.99796,9999.00 
+5.89,59.99796,9999.00 
+5.9,59.99796,9999.00 
+5.91,59.99796,9999.00 
+5.92,59.99796,9999.00 
+5.93,59.99796,9999.00 
+5.94,59.99796,9999.00 
+5.95,59.99796,9999.00 
+5.96,59.99796,9999.00 
+5.97,59.99796,9999.00 
+5.98,59.99796,9999.00 
+5.99,59.99796,9999.00 
+6,59.99796,9999.00 
+6.01,59.99796,9999.00 
+6.02,59.99796,9999.00 
+6.03,59.99796,9999.00 
+6.04,59.99796,9999.00 
+6.05,59.99796,9999.00 
+6.06,59.99796,9999.00 
+6.07,59.99796,9999.00 
+6.08,59.99796,9999.00 
+6.09,59.99796,9999.00 
+6.1,59.99796,9999.00 
+6.11,59.99796,9999.00 
+6.12,59.99796,9999.00 
+6.13,59.99796,9999.00 
+6.14,59.99796,9999.00 
+6.15,59.99796,9999.00 
+6.16,59.99796,9999.00 
+6.17,59.99796,9999.00 
+6.18,59.99796,9999.00 
+6.19,59.99796,9999.00 
+6.2,59.99796,9999.00 
+6.21,59.99796,9999.00 
+6.22,59.99796,9999.00 
+6.23,59.99796,9999.00 
+6.24,59.99796,9999.00 
+6.25,59.99796,9999.00 
+6.26,59.99796,9999.00 
+6.27,59.99796,9999.00 
+6.28,59.99796,9999.00 
+6.29,59.99796,9999.00 
+6.3,59.99796,9999.00 
+6.31,59.99796,9999.00 
+6.32,59.99796,9999.00 
+6.33,59.99796,9999.00 
+6.34,59.99796,9999.00 
+6.35,59.99796,9999.00 
+6.36,59.99796,9999.00 
+6.37,59.99796,9999.00 
+6.38,59.99796,9999.00 
+6.39,59.99796,9999.00 
+6.4,59.99796,9999.00 
+6.41,59.99796,9999.00 
+6.42,59.99796,9999.00 
+6.43,59.99796,9999.00 
+6.44,59.99796,9999.00 
+6.45,59.99796,9999.00 
+6.46,59.99796,9999.00 
+6.47,59.99796,9999.00 
+6.48,59.99796,9999.00 
+6.49,59.99796,9999.00 
+6.5,59.99796,9999.00 
+6.51,59.99796,9999.00 
+6.52,59.99796,9999.00 
+6.53,59.99796,9999.00 
+6.54,59.99796,9999.00 
+6.55,59.99796,9999.00 
+6.56,59.99796,9999.00 
+6.57,59.99796,9999.00 
+6.58,59.99796,9999.00 
+6.59,59.99796,9999.00 
+6.6,59.99832,9999.00 
+6.61,59.99832,9999.00 
+6.62,59.99832,9999.00 
+6.63,59.99832,9999.00 
+6.64,59.99832,9999.00 
+6.65,59.99832,9999.00 
+6.66,59.99832,9999.00 
+6.67,59.99832,9999.00 
+6.68,59.99832,9999.00 
+6.69,59.99832,9999.00 
+6.7,59.99832,9999.00 
+6.71,59.99832,9999.00 
+6.72,59.99832,9999.00 
+6.73,59.99832,9999.00 
+6.74,59.99832,9999.00 
+6.75,59.99832,9999.00 
+6.76,59.99832,9999.00 
+6.77,59.99832,9999.00 
+6.78,59.99832,9999.00 
+6.79,59.99832,9999.00 
+6.8,59.99832,9999.00 
+6.81,59.99832,9999.00 
+6.82,59.99832,9999.00 
+6.83,59.99832,9999.00 
+6.84,59.99832,9999.00 
+6.85,59.99832,9999.00 
+6.86,59.99832,9999.00 
+6.87,59.99832,9999.00 
+6.88,59.99832,9999.00 
+6.89,59.99832,9999.00 
+6.9,59.99832,9999.00 
+6.91,59.99832,9999.00 
+6.92,59.99832,9999.00 
+6.93,59.99832,9999.00 
+6.94,59.99832,9999.00 
+6.95,59.99832,9999.00 
+6.96,59.99832,9999.00 
+6.97,59.99832,9999.00 
+6.98,59.99832,9999.00 
+6.99,59.99832,9999.00 
+7,59.99832,9999.00 
+7.01,59.99832,9999.00 
+7.02,59.99832,9999.00 
+7.03,59.99832,9999.00 
+7.04,59.99832,9999.00 
+7.05,59.99832,9999.00 
+7.06,59.99832,9999.00 
+7.07,59.99832,9999.00 
+7.08,59.99832,9999.00 
+7.09,59.99832,9999.00 
+7.1,59.99832,9999.00 
+7.11,59.99832,9999.00 
+7.12,59.99832,9999.00 
+7.13,59.99832,9999.00 
+7.14,59.99832,9999.00 
+7.15,59.99832,9999.00 
+7.16,59.99832,9999.00 
+7.17,59.99832,9999.00 
+7.18,59.99832,9999.00 
+7.19,59.99832,9999.00 
+7.2,59.99832,9999.00 
+7.21,59.99832,9999.00 
+7.22,59.99832,9999.00 
+7.23,59.99832,9999.00 
+7.24,59.99832,9999.00 
+7.25,59.99832,9999.00 
+7.26,59.99832,9999.00 
+7.27,59.99832,9999.00 
+7.28,59.99832,9999.00 
+7.29,59.99832,9999.00 
+7.3,59.99832,9999.00 
+7.31,59.99832,9999.00 
+7.32,59.99832,9999.00 
+7.33,59.99832,9999.00 
+7.34,59.99832,9999.00 
+7.35,59.99832,9999.00 
+7.36,59.99832,9999.00 
+7.37,59.99832,9999.00 
+7.38,59.99832,9999.00 
+7.39,59.99832,9999.00 
+7.4,59.99832,9999.00 
+7.41,59.99832,9999.00 
+7.42,59.99832,9999.00 
+7.43,59.99832,9999.00 
+7.44,59.99832,9999.00 
+7.45,59.99832,9999.00 
+7.46,59.99832,9999.00 
+7.47,59.99832,9999.00 
+7.48,59.99832,9999.00 
+7.49,59.99832,9999.00 
+7.5,59.99832,9999.00 
+7.51,59.99832,9999.00 
+7.52,59.99832,9999.00 
+7.53,59.99832,9999.00 
+7.54,59.99832,9999.00 
+7.55,59.99832,9999.00 
+7.56,59.99832,9999.00 
+7.57,59.99832,9999.00 
+7.58,59.99832,9999.00 
+7.59,59.99832,9999.00 
+7.6,59.99832,9999.00 
+7.61,59.99832,9999.00 
+7.62,59.99832,9999.00 
+7.63,59.99832,9999.00 
+7.64,59.99832,9999.00 
+7.65,59.99832,9999.00 
+7.66,59.99832,9999.00 
+7.67,59.99832,9999.00 
+7.68,59.99832,9999.00 
+7.69,59.99832,9999.00 
+7.7,59.99832,9999.00 
+7.71,59.99832,9999.00 
+7.72,59.99832,9999.00 
+7.73,59.99832,9999.00 
+7.74,59.99832,9999.00 
+7.75,59.99832,9999.00 
+7.76,59.99832,9999.00 
+7.77,59.99832,9999.00 
+7.78,59.99832,9999.00 
+7.79,59.99832,9999.00 
+7.8,59.99832,9999.00 
+7.81,59.99832,9999.00 
+7.82,59.99832,9999.00 
+7.83,59.99832,9999.00 
+7.84,59.99832,9999.00 
+7.85,59.99832,9999.00 
+7.86,59.99832,9999.00 
+7.87,59.99832,9999.00 
+7.88,59.99832,9999.00 
+7.89,59.99832,9999.00 
+7.9,59.99832,9999.00 
+7.91,59.99832,9999.00 
+7.92,59.99832,9999.00 
+7.93,59.99832,9999.00 
+7.94,59.99832,9999.00 
+7.95,59.99832,9999.00 
+7.96,59.99832,9999.00 
+7.97,59.99832,9999.00 
+7.98,59.99832,9999.00 
+7.99,59.99832,9999.00 
+8,59.99832,9999.00 
+8.01,59.99832,9999.00 
+8.02,59.99832,9999.00 
+8.03,59.99832,9999.00 
+8.04,59.99832,9999.00 
+8.05,59.99832,9999.00 
+8.06,59.99832,9999.00 
+8.07,59.99832,9999.00 
+8.08,59.99832,9999.00 
+8.09,59.99832,9999.00 
+8.1,59.99832,9999.00 
+8.11,59.99832,9999.00 
+8.12,59.99832,9999.00 
+8.13,59.99832,9999.00 
+8.14,59.99832,9999.00 
+8.15,59.99832,9999.00 
+8.16,59.99832,9999.00 
+8.17,59.99868,9999.00 
+8.18,59.99868,9999.00 
+8.19,59.99868,9999.00 
+8.2,59.99868,9999.00 
+8.21,59.99868,9999.00 
+8.22,59.99868,9999.00 
+8.23,59.99868,9999.00 
+8.24,59.99868,9999.00 
+8.25,59.99868,9999.00 
+8.26,59.99868,9999.00 
+8.27,59.99868,9999.00 
+8.28,59.99868,9999.00 
+8.29,59.99868,9999.00 
+8.3,59.99868,9999.00 
+8.31,59.99868,9999.00 
+8.32,59.99868,9999.00 
+8.33,59.99868,9999.00 
+8.34,59.99868,9999.00 
+8.35,59.99868,9999.00 
+8.36,59.99868,9999.00 
+8.37,59.99868,9999.00 
+8.38,59.99868,9999.00 
+8.39,59.99868,9999.00 
+8.4,59.99868,9999.00 
+8.41,59.99868,9999.00 
+8.42,59.99868,9999.00 
+8.43,59.99868,9999.00 
+8.44,59.99868,9999.00 
+8.45,59.99868,9999.00 
+8.46,59.99868,9999.00 
+8.47,59.99868,9999.00 
+8.48,59.99868,9999.00 
+8.49,59.99868,9999.00 
+8.5,59.99868,9999.00 
+8.51,59.99868,9999.00 
+8.52,59.99868,9999.00 
+8.53,59.99868,9999.00 
+8.54,59.99868,9999.00 
+8.55,59.99868,9999.00 
+8.56,59.99868,9999.00 
+8.57,59.99868,9999.00 
+8.58,59.99868,9999.00 
+8.59,59.99868,9999.00 
+8.6,59.99868,9999.00 
+8.61,59.99868,9999.00 
+8.62,59.99868,9999.00 
+8.63,59.99868,9999.00 
+8.64,59.99868,9999.00 
+8.65,59.99868,9999.00 
+8.66,59.99868,9999.00 
+8.67,59.99868,9999.00 
+8.68,59.99868,9999.00 
+8.69,59.99868,9999.00 
+8.7,59.99868,9999.00 
+8.71,59.99868,9999.00 
+8.72,59.99868,9999.00 
+8.73,59.99868,9999.00 
+8.74,59.99868,9999.00 
+8.75,59.99868,9999.00 
+8.76,59.99868,9999.00 
+8.77,59.99868,9999.00 
+8.78,59.99868,9999.00 
+8.79,59.99868,9999.00 
+8.8,59.99868,9999.00 
+8.81,59.99868,9999.00 
+8.82,59.99868,9999.00 
+8.83,59.99868,9999.00 
+8.84,59.99868,9999.00 
+8.85,59.99868,9999.00 
+8.86,59.99868,9999.00 
+8.87,59.99868,9999.00 
+8.88,59.99868,9999.00 
+8.89,59.99868,9999.00 
+8.9,59.99868,9999.00 
+8.91,59.99868,9999.00 
+8.92,59.99868,9999.00 
+8.93,59.99868,9999.00 
+8.94,59.99868,9999.00 
+8.95,59.99868,9999.00 
+8.96,59.99868,9999.00 
+8.97,59.99868,9999.00 
+8.98,59.99868,9999.00 
+8.99,59.99868,9999.00 
+9,59.99868,9999.00 
+9.01,59.99868,9999.00 
+9.02,59.99868,9999.00 
+9.03,59.99868,9999.00 
+9.04,59.99868,9999.00 
+9.05,59.99868,9999.00 
+9.06,59.99868,9999.00 
+9.07,59.99868,9999.00 
+9.08,59.99868,9999.00 
+9.09,59.99868,9999.00 
+9.1,59.99868,9999.00 
+9.11,59.99868,9999.00 
+9.12,59.99868,9999.00 
+9.13,59.99868,9999.00 
+9.14,59.99868,9999.00 
+9.15,59.99868,9999.00 
+9.16,59.99868,9999.00 
+9.17,59.99868,9999.00 
+9.18,59.99868,9999.00 
+9.19,59.99868,9999.00 
+9.2,59.99868,9999.00 
+9.21,59.99868,9999.00 
+9.22,59.99868,9999.00 
+9.23,59.99868,9999.00 
+9.24,59.99868,9999.00 
+9.25,59.99868,9999.00 
+9.26,59.99868,9999.00 
+9.27,59.99868,9999.00 
+9.28,59.99868,9999.00 
+9.29,59.99868,9999.00 
+9.3,59.99868,9999.00 
+9.31,59.99868,9999.00 
+9.32,59.99868,9999.00 
+9.33,59.99868,9999.00 
+9.34,59.99868,9999.00 
+9.35,59.99868,9999.00 
+9.36,59.99868,9999.00 
+9.37,59.99868,9999.00 
+9.38,59.99868,9999.00 
+9.39,59.99868,9999.00 
+9.4,59.99868,9999.00 
+9.41,59.99868,9999.00 
+9.42,59.99868,9999.00 
+9.43,59.99868,9999.00 
+9.44,59.99868,9999.00 
+9.45,59.99868,9999.00 
+9.46,59.99868,9999.00 
+9.47,59.99868,9999.00 
+9.48,59.99868,9999.00 
+9.49,59.99868,9999.00 
+9.5,59.99868,9999.00 
+9.51,59.99868,9999.00 
+9.52,59.99868,9999.00 
+9.53,59.99868,9999.00 
+9.54,59.99868,9999.00 
+9.55,59.99868,9999.00 
+9.56,59.99868,9999.00 
+9.57,59.99868,9999.00 
+9.58,59.99868,9999.00 
+9.59,59.99868,9999.00 
+9.6,59.99868,9999.00 
+9.61,59.99868,9999.00 
+9.62,59.99868,9999.00 
+9.63,59.99868,9999.00 
+9.64,59.99868,9999.00 
+9.65,59.99868,9999.00 
+9.66,59.99868,9999.00 
+9.67,59.99868,9999.00 
+9.68,59.99868,9999.00 
+9.69,59.99868,9999.00 
+9.7,59.99868,9999.00 
+9.71,59.99868,9999.00 
+9.72,59.99868,9999.00 
+9.73,59.99868,9999.00 
+9.74,59.99868,9999.00 
+9.75,59.99868,9999.00 
+9.76,59.99868,9999.00 
+9.77,59.99868,9999.00 
+9.78,59.99868,9999.00 
+9.79,59.99868,9999.00 
+9.8,59.99868,9999.00 
+9.81,59.99868,9999.00 
+9.82,59.99868,9999.00 
+9.83,59.99868,9999.00 
+9.84,59.99868,9999.00 
+9.85,59.99868,9999.00 
+9.86,59.99868,9999.00 
+9.87,59.99868,9999.00 
+9.88,59.99868,9999.00 
+9.89,59.99868,9999.00 
+9.9,59.99868,9999.00

+ 64 - 0
configDuplicate/config_duplicate.py

@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2024 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/04/01
+@Last Modified:     2024/04/01
+@Summary:           Config json drop duplicate.
+"""
+
+import json
+import os
+
+def read_json_file(file_path):
+    with open(file_path, 'r', encoding='utf-8') as file:
+        return json.load(file)
+
+def compare_json_files(file_paths):
+    # 读取第一个JSON文件作为基准
+    base_json = read_json_file(file_paths[0])
+    # 创建一个字典来存储比较结果
+    result_json = {}
+
+    # 遍历基准JSON的所有key
+    for key in base_json:
+        # 初始化所有文件的该key的值为基准值
+        result_value = base_json[key]
+        # 遍历剩余的文件进行比较
+        for file_path in file_paths[1:]:
+            # 读取当前文件
+            current_json = read_json_file(file_path)
+            # 检查key是否存在,并且值是否相同
+            if key not in current_json or current_json[key] != result_value:
+                # 如果不同,则将该key的值设为null
+                result_value = None
+                break
+                # 将最终值添加到结果JSON中
+        result_json[key] = result_value
+
+    return result_json
+
+def write_json_file(file_path, data):
+    with open(file_path, 'w', encoding='utf-8') as file:
+        json.dump(data, file, ensure_ascii=False, indent=4)
+
+def main():
+    # 假设您的JSON文件都在当前目录下的一个名为'json_files'的文件夹中
+    json_dir = './jsonFiles'
+    file_paths = [os.path.join(json_dir, f) for f in os.listdir(json_dir) if f.endswith('.json')]
+
+    # 比较这些文件
+    result_json = compare_json_files(file_paths)
+
+    # 将结果写入新的JSON文件
+    output_file_path = './output.json'
+    write_json_file(output_file_path, result_json)
+    print(f'Comparison result saved to {output_file_path}')
+
+if __name__ == '__main__':
+    main()

+ 70 - 0
configDuplicate/config_duplicate_1.py

@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2024 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/04/01
+@Last Modified:     2024/04/01
+@Summary:           Config json drop duplicate.
+"""
+
+import json
+import os
+
+def read_json_file(file_path):
+    with open(file_path, 'r', encoding='utf-8') as file:
+        return json.load(file)
+
+def compare_leaf_nodes(node1, node2):
+    """比较两个叶节点是否相同,不同则返回None"""
+    if isinstance(node1, dict) and isinstance(node2, dict):
+        # 如果两个节点都是字典,递归比较它们的值
+        return {key: compare_leaf_nodes(node1.get(key), node2.get(key)) for key in node1}
+    elif node1 != node2:
+        # 如果值不同,返回None
+        return None
+    else:
+        # 如果值相同,返回原值
+        return node1
+
+def compare_json_files(file_paths):
+    # 读取第一个JSON文件作为基准
+    base_json = read_json_file(file_paths[0])
+    # 创建一个字典来存储比较结果
+    result_json = {}
+
+    # 遍历剩余的文件进行比较
+    for file_path in file_paths[1:]:
+        # 读取当前文件
+        current_json = read_json_file(file_path)
+        # 比较基准JSON和当前JSON的叶节点
+        result_json = compare_leaf_nodes(base_json, current_json)
+        # 一旦发现不同,就跳出循环,因为我们已经得到了需要的结果
+        if None in result_json.values():
+            break
+
+    return result_json
+
+def write_json_file(file_path, data):
+    with open(file_path, 'w', encoding='utf-8') as file:
+        json.dump(data, file, indent=4, ensure_ascii=False)
+
+def main():
+    # 假设您的JSON文件都在当前目录下的一个名为'json_files'的文件夹中
+    json_dir = './jsonFiles'
+    file_paths = [os.path.join(json_dir, f) for f in os.listdir(json_dir) if f.endswith('.json')]
+
+    # 比较这些文件
+    result_json = compare_json_files(file_paths)
+
+    # 将结果写入新的JSON文件
+    output_file_path = './output1.json'
+    write_json_file(output_file_path, result_json)
+    print(f'Comparison result saved to {output_file_path}')
+
+if __name__ == '__main__':
+    main()

+ 86 - 0
configDuplicate/config_duplicate_2.py

@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2024 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/04/01
+@Last Modified:     2024/04/01
+@Summary:           Config json drop duplicate.
+"""
+
+import json
+import os
+
+def read_json_file(file_path):
+    with open(file_path, 'r', encoding='utf-8') as file:
+        return json.load(file)
+
+def compare_leaf_nodes(node1, node2):
+    """比较两个叶节点是否相同,不同则返回None"""
+    if isinstance(node1, dict) and isinstance(node2, dict):
+        # 如果两个节点都是字典,递归比较它们的值
+        return {key: compare_leaf_nodes(node1.get(key), node2.get(key)) for key in node1.keys()}
+    elif isinstance(node1, list) and isinstance(node2, list):
+        # 如果两个节点都是列表,递归比较它们的元素
+        return [compare_leaf_nodes(item1, item2) for item1, item2 in zip(node1, node2)]
+    elif node1 != node2:
+        # 如果值不同,返回None
+        return None
+    else:
+        # 如果值相同,返回原值
+        return node1
+
+def compare_json_files(file_paths):
+    # 读取第一个JSON文件作为基准
+    base_json = read_json_file(file_paths[0])
+    # 初始化结果JSON,这里先复制基准JSON
+    result_json = base_json.copy()
+
+    # 遍历剩余的文件进行比较
+    for file_path in file_paths[1:]:
+        # 读取当前文件
+        current_json = read_json_file(file_path)
+        # 比较基准JSON和当前JSON的叶节点
+        temp_result = compare_leaf_nodes(base_json, current_json)
+        # 更新result_json以反映不同
+        update_dict_with_none(result_json, temp_result)
+
+    return result_json
+
+def update_dict_with_none(base_dict, update_dict):
+    """递归地更新base_dict,将update_dict中的None值赋给base_dict对应的位置"""
+    for key, value in update_dict.items():
+        if isinstance(value, dict):
+            # 如果value是字典,递归更新
+            update_dict_with_none(base_dict.get(key, {}), value)
+        elif value is None:
+            # 如果value是None,更新base_dict中对应位置的值为None
+            base_dict[key] = None
+        elif isinstance(base_dict.get(key), list) and isinstance(value, list):
+            # 如果base_dict中的值是列表,且update_dict中的值也是列表,则更新列表元素
+            base_dict[key] = [update_value if update_value is None else base_value
+                              for base_value, update_value in zip(base_dict[key], value)]
+
+def write_json_file(file_path, data):
+    with open(file_path, 'w', encoding='utf-8') as file:
+        json.dump(data, file, indent=4, ensure_ascii=False)
+
+def main():
+    # 假设您的JSON文件都在当前目录下的一个名为'json_files'的文件夹中
+    json_dir = './jsonFiles'
+    file_paths = [os.path.join(json_dir, f) for f in os.listdir(json_dir) if f.endswith('.json')]
+
+    # 比较这些文件
+    result_json = compare_json_files(file_paths)
+
+    # 将结果写入新的JSON文件
+    output_file_path = './output-2.json'
+    write_json_file(output_file_path, result_json)
+    print(f'Comparison result saved to {output_file_path}')
+
+if __name__ == '__main__':
+    main()

+ 1027 - 0
configDuplicate/jsonFiles/config1.json

@@ -0,0 +1,1027 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 1027 - 0
configDuplicate/jsonFiles/config2.json

@@ -0,0 +1,1027 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 1027 - 0
configDuplicate/output-2.json

@@ -0,0 +1,1027 @@
+{
+    "safe": {
+        "safeDistance": {
+            "LatSD": {
+                "name": "LatSD",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeAcceleration": {
+            "DRAC": {
+                "name": "DRAC",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "BTN": {
+                "name": "BTN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "STN": {
+                "name": "STN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "name": "碰撞风险程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.5",
+                            "5.4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "collisionSeverity": {
+                "name": "碰撞严重程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "customType": {
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeDistance": 0.2,
+            "safeAcceleration": 0.3,
+            "safeProbability": 0.2,
+            "customType": 0.3
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 754 - 0
configDuplicate/output.json

@@ -0,0 +1,754 @@
+{
+    "safe": null,
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeDistance": 0.2,
+            "safeAcceleration": 0.3,
+            "safeProbability": 0.2,
+            "customType": 0.3
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 36 - 0
configDuplicate/output.txt

@@ -0,0 +1,36 @@
+acc_gencheshiqianchejiansu_30
+acc_gencheshiqianchejiansu_60
+acc_gencheshiqianchejiasu_30
+acc_gencheshiqianchejiasu_60
+acc_genchetqiting
+acc_qianchejiansuzhitingche
+acc_qianchemanxing
+acc_qiancheqiechu_qianfangwuche_30
+acc_qiancheqiechu_qianfangwuche_60
+acc_qiancheqiechu_qianfangyouche_30
+acc_qiancheqiechu_qianfangyouche_60
+acc_qiancheqieru_30
+acc_qiancheqieru_60
+acc_qianfangmubiaochejingzhi_30
+acc_qianfangmubiaochejingzhi_60
+acc_wandaoqianchejingzhi
+aeb_qianfangerlunchehengchuanmalu
+aeb_qianfangxingrenhengchuanmalu
+alc_zichewuganraobiandao_30
+alc_zichewuganraobiandao_60
+alc_zicheyouganraobiandao_30
+alc_zicheyouganraobiandao_60
+chedaoxianshibie
+fcw_xianglinchedaocheliangjiansu_30
+fcw_xianglinchedaocheliangjiansu_60
+fcw_xianglinwandaocheliangjiansu_30
+fcw_xianglinwandaocheliangjiansu_60
+ldw_wandaoxiangzuopianyi
+ldw_zhidaoxiangzuopianyi
+lka_wandaojuzhongkongzhi
+lka_zhidaojuzhongkongzhi_30
+lka_zhidaojuzhongkongzhi_60
+xiansubiaozhishibie
+youzhuan_cheliangchongtutongxiang
+zhixing_cheliangchongtutongxiang
+zuozhuan_cheliangchongtutongxiang

+ 994 - 0
configDuplicate/output1.json

@@ -0,0 +1,994 @@
+{
+    "safe": {
+        "safeDistance": {
+            "LatSD": {
+                "name": "LatSD",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": null
+            }
+        },
+        "safeAcceleration": {
+            "DRAC": {
+                "name": "DRAC",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "BTN": {
+                "name": "BTN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "STN": {
+                "name": "STN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "name": "碰撞风险程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.5",
+                            "5.4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "collisionSeverity": {
+                "name": "碰撞严重程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "customType": {
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeDistance": 0.2,
+            "safeAcceleration": 0.3,
+            "safeProbability": 0.2,
+            "customType": 0.3
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 1027 - 0
config_merge/config0.json

@@ -0,0 +1,1027 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 984 - 0
config_merge/config1.json

@@ -0,0 +1,984 @@
+{
+  "safe": {
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.4,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 987 - 0
config_merge/config2.json

@@ -0,0 +1,987 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 1027 - 0
config_merge/config3.json

@@ -0,0 +1,1027 @@
+{
+  "safe": {
+    "safeDistance": {
+      "LatSD": {
+        "name": "LatSD",
+        "unit": "yy",
+        "weight": "0.3",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "33333",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "BTN": {
+        "name": "BTN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "STN": {
+        "name": "STN",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "name": "碰撞风险程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.5",
+              "5.4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "collisionSeverity": {
+        "name": "碰撞严重程度",
+        "unit": "yy",
+        "weight": "0.1",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "1",
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "customType": {
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "function": {
+    "functionACC": {
+      "followSpeedDeviation": {
+        "name": "跟车速度偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "2",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followDistanceDeviation": {
+        "name": "跟车距离偏差",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.5",
+              "2"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "followStopDistance": {
+        "name": "跟停距离",
+        "unit": "yy",
+        "weight": 0.2,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLKA": {
+      "ldw_miss_warning_count": {
+        "name": "车道偏离漏预警次数",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "laneDistance": {
+        "name": "与近侧车道线的横向距离",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "optimal": "1.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceExpectation": {
+        "name": "车道中心线横向距离分布期望",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.15",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceStandardDeviation": {
+        "name": "车道中心线横向距离分布标准差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMax": {
+        "name": "车道中心线横向距离分布最大值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceMin": {
+        "name": "车道中心线横向距离分布最小值",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.1",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "0.7",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "functionLDW": {
+      "ldw_miss_warning_count3": {
+        "name": "车道偏离漏预警次数3",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "10"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "name": "画龙",
+        "unit": "yy",
+        "weight": 0.1,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "shake": {
+        "name": "晃动",
+        "unit": "yy",
+        "weight": 0.9,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "name": "顿挫",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "slamAccelerate": {
+        "name": "急加速",
+        "unit": "yy",
+        "weight": 0.4,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          },
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "optimal": "30",
+            "multiple": [
+              "0",
+              "1"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "name": "停车时长",
+        "unit": "yy",
+        "weight": 1.0,
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "name": "超速10%以下",
+        "unit": null,
+        "weight": 0.5
+      },
+      "overspeed10_20": {
+        "name": "超速10%-20%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "name": "压实线",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "name": "闯红灯",
+        "unit": "yy",
+        "weight": 0.5
+      },
+      "overspeed20_50": {
+        "name": "超速20%-50%",
+        "unit": "yy",
+        "weight": 0.5
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "unit": "yy",
+        "weight": 1.0
+      }
+    }
+  },
+  "customTest": {
+    "customType": {
+      "ldw_miss_warning_count4": {
+        "name": "车道偏离漏预警次数4",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "25"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      },
+      "ldw_miss_warning_count2": {
+        "name": "车道偏离漏预警次数2",
+        "unit": "yy",
+        "weight": 0.5,
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "optimal": "1",
+            "multiple": [
+              "0.5",
+              "15"
+            ],
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  "typeWeight": {
+    "customTest": {
+      "customType": 1.0
+    },
+    "safe": {
+      "safeDistance": 0.2,
+      "safeAcceleration": 0.3,
+      "safeProbability": 0.2,
+      "customType": 0.3
+    },
+    "efficient": {
+      "efficientDrive": 0.5,
+      "efficientStop": 0.5
+    },
+    "comfort": {
+      "comfortLat": 0.5,
+      "comfortLon": 0.5
+    },
+    "compliance": {
+      "deduct1": 0.2,
+      "deduct3": 0.2,
+      "deduct6": 0.2,
+      "deduct12": 0.4
+    },
+    "function": {
+      "functionACC": 0.4,
+      "functionLKA": 0.5,
+      "functionLDW": 0.1
+    }
+  },
+  "typeName": {
+    "customTest": {
+      "customType": "自定义x类型"
+    },
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct1": "轻微违规(扣1分)",
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)"
+    },
+    "function": {
+      "functionACC": "ACC",
+      "functionLKA": "LKA",
+      "functionLDW": "LDW"
+    },
+    "safe": {
+      "safeTime": "时间类型",
+      "safeDistance": "距离类型",
+      "safeAcceleration": "加速度类型",
+      "safeProbability": "概率类型",
+      "customType": "自定义x类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  },
+  "dimensionWeight": {
+    "customTest": 0.1,
+    "safe": 0.2,
+    "function": 0.2,
+    "compliance": 0.2,
+    "comfort": 0.1,
+    "efficient": 0.2
+  },
+  "dimensionName": {
+    "customTest": "自定义x维度",
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "scoreModel1": "builtin",
+  "scoreModel": "linear_score"
+}

+ 71 - 0
config_merge/config_merge.py

@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2024 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/04/22
+@Last Modified:     2024/04/22
+@Summary:           Config jsons merge and process.
+"""
+
+import json
+
+
+def merge_json(base_json, compare_json):
+    # 遍历比较JSON文件的键值对
+    for key, value in compare_json.items():
+        # 如果基准JSON文件中不包含该键,则直接添加对应的键值对
+        if key not in base_json:
+            base_json[key] = value
+        else:
+            # 如果值是字典类型,则递归进行比较和合并
+            if isinstance(value, dict) and isinstance(base_json[key], dict):
+                merge_json(base_json[key], value)
+            # 如果值是列表类型,则递归对比列表中的每个元素
+            elif isinstance(value, list) and isinstance(base_json[key], list):
+                for idx, item in enumerate(value):
+                    if idx < len(base_json[key]) and isinstance(item, dict):
+                        # 如果列表中的元素是字典,则递归进行比较和合并
+                        merge_json(base_json[key][idx], item)
+                    elif idx >= len(base_json[key]) and isinstance(item, dict):
+                        # 如果列表中的元素是字典,并且基准JSON中的列表不包含该元素,则添加到列表中
+                        base_json[key].append(item)
+            else:
+                # 对比值不同的情况,将最后一级的值设为空字符串
+                if base_json[key] != value:
+                    if isinstance(value, dict):
+                        merge_json(base_json[key], value)
+                    else:
+                        base_json[key] = ""
+
+
+def compare_and_merge(base_file, *compare_files):
+    # 读取基准JSON文件
+    with open(base_file, 'r', encoding='utf-8') as f:
+        base_data = json.load(f)
+
+    # 遍历需要比较的JSON文件
+    for compare_file in compare_files:
+        with open(compare_file, 'r', encoding='utf-8') as f:
+            compare_data = json.load(f)
+
+        # 调用merge_json函数进行比较和合并
+        merge_json(base_data, compare_data)
+
+    return base_data
+
+
+if __name__ == '__main__':
+    # 示例用法
+    # merged_data = compare_and_merge('config0.json', 'config1.json', 'config2.json', 'config3.json')
+    merged_data = compare_and_merge('config1.json', 'config2.json', 'config3.json')
+    # print(json.dumps(merged_data, indent=4, ensure_ascii=False))
+
+    with open('output123.json', 'w', encoding='utf-8') as f:
+        f.write(json.dumps(merged_data, indent=4, ensure_ascii=False))
+
+    print("over.")

+ 1027 - 0
config_merge/output.json

@@ -0,0 +1,1027 @@
+{
+    "safe": {
+        "safeDistance": {
+            "LatSD": {
+                "name": "LatSD",
+                "unit": "yy",
+                "weight": "",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeAcceleration": {
+            "DRAC": {
+                "name": "DRAC",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "BTN": {
+                "name": "BTN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "STN": {
+                "name": "STN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "name": "碰撞风险程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.5",
+                            "5.4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "collisionSeverity": {
+                "name": "碰撞严重程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "customType": {
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeDistance": 0.2,
+            "safeAcceleration": 0.3,
+            "safeProbability": "",
+            "customType": 0.3
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 1027 - 0
config_merge/output0123.json

@@ -0,0 +1,1027 @@
+{
+    "safe": {
+        "safeDistance": {
+            "LatSD": {
+                "name": "LatSD",
+                "unit": "yy",
+                "weight": "",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeAcceleration": {
+            "DRAC": {
+                "name": "DRAC",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "BTN": {
+                "name": "BTN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "STN": {
+                "name": "STN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "name": "碰撞风险程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.5",
+                            "5.4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "collisionSeverity": {
+                "name": "碰撞严重程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "customType": {
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeDistance": 0.2,
+            "safeAcceleration": 0.3,
+            "safeProbability": "",
+            "customType": 0.3
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 1027 - 0
config_merge/output123.json

@@ -0,0 +1,1027 @@
+{
+    "safe": {
+        "safeAcceleration": {
+            "DRAC": {
+                "name": "DRAC",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "BTN": {
+                "name": "BTN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "STN": {
+                "name": "STN",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeProbability": {
+            "collisionRisk": {
+                "name": "碰撞风险程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.5",
+                            "5.4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "collisionSeverity": {
+                "name": "碰撞严重程度",
+                "unit": "yy",
+                "weight": "0.1",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "customType": {
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "safeDistance": {
+            "LatSD": {
+                "name": "LatSD",
+                "unit": "yy",
+                "weight": "",
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "function": {
+        "functionACC": {
+            "followSpeedDeviation": {
+                "name": "跟车速度偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "2",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followDistanceDeviation": {
+                "name": "跟车距离偏差",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.5",
+                            "2"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "followStopDistance": {
+                "name": "跟停距离",
+                "unit": "yy",
+                "weight": 0.2,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "4",
+                        "multiple": [
+                            "0.25",
+                            "4"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLKA": {
+            "ldw_miss_warning_count": {
+                "name": "车道偏离漏预警次数",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "laneDistance": {
+                "name": "与近侧车道线的横向距离",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "1",
+                        "optimal": "1.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceExpectation": {
+                "name": "车道中心线横向距离分布期望",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.15",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceStandardDeviation": {
+                "name": "车道中心线横向距离分布标准差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.2",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMax": {
+                "name": "车道中心线横向距离分布最大值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceMin": {
+                "name": "车道中心线横向距离分布最小值",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceFrequency": {
+                "name": "横向相对位置震荡频率",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.1",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "centerDistanceRange": {
+                "name": "横向相对位置震荡极差",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "0.7",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "functionLDW": {
+            "ldw_miss_warning_count3": {
+                "name": "车道偏离漏预警次数3",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "10"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "comfort": {
+        "comfortLat": {
+            "zigzag": {
+                "name": "画龙",
+                "unit": "yy",
+                "weight": 0.1,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "shake": {
+                "name": "晃动",
+                "unit": "yy",
+                "weight": 0.9,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "3",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "comfortLon": {
+            "cadence": {
+                "name": "顿挫",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "slamAccelerate": {
+                "name": "急加速",
+                "unit": "yy",
+                "weight": 0.4,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "10",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    },
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.2",
+                            "5"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "efficient": {
+        "efficientDrive": {
+            "averageSpeed": {
+                "name": "平均速度",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "0",
+                        "optimal": "30",
+                        "multiple": [
+                            "0",
+                            "1"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        },
+        "efficientStop": {
+            "stopDuration": {
+                "name": "停车时长",
+                "unit": "yy",
+                "weight": 1.0,
+                "priority": "0",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "5",
+                        "multiple": [
+                            "0.33",
+                            "3"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "compliance": {
+        "deduct1": {
+            "overspeed10": {
+                "name": "超速10%以下",
+                "unit": null,
+                "weight": 0.5
+            },
+            "overspeed10_20": {
+                "name": "超速10%-20%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct3": {
+            "pressSolidLine": {
+                "name": "压实线",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        },
+        "deduct6": {
+            "runRedLight": {
+                "name": "闯红灯",
+                "unit": "yy",
+                "weight": 0.5
+            },
+            "overspeed20_50": {
+                "name": "超速20%-50%",
+                "unit": "yy",
+                "weight": 0.5
+            }
+        },
+        "deduct12": {
+            "overspeed50": {
+                "name": "超速50%以上",
+                "unit": "yy",
+                "weight": 1.0
+            }
+        }
+    },
+    "customTest": {
+        "customType": {
+            "ldw_miss_warning_count4": {
+                "name": "车道偏离漏预警次数4",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "25"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            },
+            "ldw_miss_warning_count2": {
+                "name": "车道偏离漏预警次数2",
+                "unit": "yy",
+                "weight": 0.5,
+                "priority": "1",
+                "paramList": [
+                    {
+                        "kind": "-1",
+                        "optimal": "1",
+                        "multiple": [
+                            "0.5",
+                            "15"
+                        ],
+                        "spare": [
+                            {
+                                "param": null
+                            },
+                            {
+                                "param": null
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "typeWeight": {
+        "customTest": {
+            "customType": 1.0
+        },
+        "safe": {
+            "safeAcceleration": 0.3,
+            "safeProbability": "",
+            "customType": 0.3,
+            "safeDistance": 0.2
+        },
+        "efficient": {
+            "efficientDrive": 0.5,
+            "efficientStop": 0.5
+        },
+        "comfort": {
+            "comfortLat": 0.5,
+            "comfortLon": 0.5
+        },
+        "compliance": {
+            "deduct1": 0.2,
+            "deduct3": 0.2,
+            "deduct6": 0.2,
+            "deduct12": 0.4
+        },
+        "function": {
+            "functionACC": 0.4,
+            "functionLKA": 0.5,
+            "functionLDW": 0.1
+        }
+    },
+    "typeName": {
+        "customTest": {
+            "customType": "自定义x类型"
+        },
+        "efficient": {
+            "efficientDrive": "行驶",
+            "efficientStop": "停车"
+        },
+        "compliance": {
+            "deduct1": "轻微违规(扣1分)",
+            "deduct3": "中等违规(扣3分)",
+            "deduct6": "危险违规(扣6分)",
+            "deduct12": "重大违规(扣12分)"
+        },
+        "function": {
+            "functionACC": "ACC",
+            "functionLKA": "LKA",
+            "functionLDW": "LDW"
+        },
+        "safe": {
+            "safeTime": "时间类型",
+            "safeDistance": "距离类型",
+            "safeAcceleration": "加速度类型",
+            "safeProbability": "概率类型",
+            "customType": "自定义x类型"
+        },
+        "comfort": {
+            "comfortLat": "横向舒适性",
+            "comfortLon": "纵向舒适性"
+        }
+    },
+    "dimensionWeight": {
+        "customTest": 0.1,
+        "safe": 0.2,
+        "function": 0.2,
+        "compliance": 0.2,
+        "comfort": 0.1,
+        "efficient": 0.2
+    },
+    "dimensionName": {
+        "customTest": "自定义x维度",
+        "efficient": "高效性",
+        "compliance": "合规性",
+        "function": "功能性",
+        "safe": "安全性",
+        "comfort": "舒适性"
+    },
+    "scoreModel1": "builtin",
+    "scoreModel": "linear_score"
+}

+ 604 - 0
config_parser.py

@@ -0,0 +1,604 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2023/11/02
+@Last Modified:     2023/11/02
+@Summary:           This module provides the function to parse the config json file.
+"""
+
+import pandas as pd
+import numpy as np
+
+from common import json2dict
+from collections import OrderedDict
+
+
+class ConfigParse(object):
+    """
+
+    """
+
+    def __init__(self, json_file):
+        # weight info
+        self.scoreModel = ""
+        self.dimension_weight = {}
+        self.dimension_list = []
+        self.dimension_name = {}
+        self.type_weight = {}
+        self.type_list = []
+        self.type_name = {}
+        self.metric_list = []
+        self.metric_dict = {}
+        self.name_dict = {}
+        self.unit_dict = {}
+
+        self.builtinDimensionList = ["safe", "function", "compliance", "comfort", "efficient"]
+        self.builtinTypeDict = {
+            "safe": ['safeTime', 'safeDistance', 'safeAcceleration', 'safeProbability'],
+            "function": ['functionACC', 'functionLKA'],
+            "compliance": ['functionACC', 'functionLKA', 'safeAcceleration', 'safeProbability'],
+            "comfort": ['comfortLat', 'comfortLon'],
+            "efficient": ['efficientDrive', 'efficientStop']
+        }
+        self.builtinMetricList = ["TTC", "MTTC", "THW", "LatSD", "LonSD", "DRAC", "BTN", "STN", "collisionRisk",
+                                  "collisionSeverity", "followSpeedDeviation", "followDistanceDeviation",
+                                  "followStopDistance", "followResponseTime", 'laneDistance',
+                                  'centerDistanceExpectation', 'centerDistanceStandardDeviation',
+                                  'centerDistanceMax', 'centerDistanceMin', 'centerDistanceFrequency',
+                                  'centerDistanceRange',
+                                  "zigzag", "shake", "cadence", "slamBrake", "slamAccelerate",
+                                  "pressSolidLine", "runRedLight", "overspeed20_50", "overspeed50", "overspeed10",
+                                  "overspeed10_20",
+                                  "averageSpeed", "stopDuration", "stopCount"]
+
+        # score info
+        self.config = {}
+
+        # initialization
+        self.config_dict = json2dict(json_file)
+        self.parse_dict = self._config_parse(self.config_dict)
+
+    def _config_parse(self, config_dict):
+        # score
+        if 'scoreModel' in list(config_dict.keys()):
+            self.scoreModel = config_dict['scoreModel']
+        else:
+            self.scoreModel = "builtin"
+
+        # dimension info
+        dimensionWeight = config_dict['dimensionWeight']
+        self.dimension_weight = dimensionWeight
+        self.dimension_name = config_dict['dimensionName']
+        self.dimension_list = list(self.dimension_weight.keys())
+
+        # type info
+        typeWeight = config_dict['typeWeight']
+        self.type_weight = typeWeight
+        self.type_name = config_dict["typeName"]
+
+        for dimension in self.dimension_list:
+            if dimension == 'compliance':
+                self.config[dimension] = self._compliance_config_parse(config_dict, typeWeight, dimensionWeight)
+            else:
+                self.config[dimension] = self._dimension_config_parse(dimension, config_dict, typeWeight,
+                                                                      dimensionWeight)
+
+            # self.name_dict[dimension] = self.config[dimension]['name']
+            # self.unit_dict[dimension] = self.config[dimension]['unit']
+            self.name_dict.update(self.config[dimension]['name'])
+            self.unit_dict.update(self.config[dimension]['unit'])
+
+            self.metric_dict[dimension] = self.config[dimension]['typeMetricDict']
+            self.metric_list.extend(self.config[dimension]['metric'])
+            self.type_list.extend(self.config[dimension]['type'])
+
+        print()
+
+    def _dimension_config_parse(self, dimension, config_dict, typeWeight, dimensionWeight):
+
+        # get weight type
+        typeWeightDimension = typeWeight[dimension]
+        typeDimensionList = list(typeWeightDimension.keys())
+        if dimension in self.builtinDimensionList:
+            typeWeightDimension_builtin = OrderedDict(
+                (key, typeWeightDimension[key]) for key in self.builtinTypeDict[dimension] if key in typeDimensionList)
+            typeWeightDimension_builtin = list(typeWeightDimension_builtin.keys())
+            typeDimension = typeWeightDimension_builtin + [x for x in typeDimensionList if
+                                                           x not in self.builtinTypeDict[dimension]]
+        else:
+            typeDimension = typeDimensionList
+
+        typeWeightDimensionList = list(typeWeightDimension.values())
+        flagCustomDimension = not all(x is None for x in typeWeightDimensionList)
+
+        # get type name
+        typeNameDimension = self.type_name[dimension]
+
+        # Dimension
+        dimension_dict = config_dict[dimension]
+        dimension_value_dict = {}
+        typeMetricDict = {}
+
+        for type in typeDimension:
+            dimension_value_dict.update(dimension_dict[type])
+            typeMetricDict[type] = list(dimension_dict[type].keys())
+
+        df_dimension_value = pd.DataFrame(dimension_value_dict).T
+
+        # get metric list
+        metricDimension = df_dimension_value.index.tolist()
+
+        # get name list
+        nameDimension = df_dimension_value['name'].to_dict()
+        # nameDimensionList = list(nameDimension.values())
+
+        # get unit list
+        unitDimension = df_dimension_value['unit'].to_dict()
+        unitDimension = {key: (value if value is not None else "") for key, value in unitDimension.items()}
+        # unitDimensionList = list(unitDimension.values())
+
+        # get weight list
+        weightDimension = df_dimension_value['weight'].astype(float).to_dict()
+        weightDimensionList = list(weightDimension.values())
+
+        # get priority list
+        priorityDimension = df_dimension_value['priority'].astype(int).to_dict()
+        priorityDimensionList = list(priorityDimension.values())
+
+        # get paramList
+        paramDimension = df_dimension_value['paramList'].to_dict()
+
+        bulitin_first_key = next((key for key in paramDimension if key in self.builtinMetricList), None)
+        first_key = next(iter(paramDimension)) if not bulitin_first_key else bulitin_first_key
+        paramNum = len(paramDimension[first_key])
+
+        kindDimension = [{} for _ in range(paramNum)]
+        optimalDimension = [{} for _ in range(paramNum)]
+        multipleDimension = [{} for _ in range(paramNum)]
+        spareDimension = [{} for _ in range(paramNum)]
+        # spare1Dimension = [{} for _ in range(paramNum)]
+        # spare2Dimension = [{} for _ in range(paramNum)]
+
+        customMetricParam = {}  # custiom metric paramList
+
+        for key, value_list in paramDimension.items():
+            if key in self.builtinMetricList:
+                for i in range(len(value_list)):
+                    kindDimension[i][key] = int(value_list[i]['kind'])
+                    optimalDimension[i][key] = float(value_list[i]['optimal'])
+                    multipleDimension[i][key] = [float(x) for x in value_list[i]['multiple']]
+                    spareDimension[i][key] = [item["param"] for item in value_list[i]["spare"]]
+                    # spareDimension[i][key] = [float(item["param"]) for item in value_list[i]["spare"]]
+                    # spare1Dimension[i][key] = (value_list[i]['spare1'])
+                    # spare2Dimension[i][key] = (value_list[i]['spare2'])
+            else:
+                customMetricParam[key] = value_list
+
+        kindDimensionList = [value for dict_val in kindDimension for value in dict_val.values()]
+        optimalDimensionList = [value for dict_val in optimalDimension for value in dict_val.values()]
+        multipleDimensionList = [value for dict_val in multipleDimension for value in dict_val.values()]
+        spareDimensionList = [value for dict_val in spareDimension for value in dict_val.values()]
+        # spare1DimensionList = [value for dict_val in spare1Dimension for value in dict_val.values()]
+        # spare2DimensionList = [value for dict_val in spare2Dimension for value in dict_val.values()]
+
+        if paramNum == 1:
+            kindDimension = kindDimension[0]
+            optimalDimension = optimalDimension[0]
+            multipleDimension = multipleDimension[0]
+            spareDimension = spareDimension[0]
+            # spare1Dimension = spare1Dimension[0]
+            # spare2Dimension = spare2Dimension[0]
+
+        result = {
+            "weightDimension": float(dimensionWeight[dimension]),
+            "weightCustom": flagCustomDimension,
+            "type": typeDimension,
+            "typeWeight": typeWeightDimension,
+            "typeWeightList": typeWeightDimensionList,
+            "typeName": typeNameDimension,
+            "customMetricParam": customMetricParam,
+            "metric": metricDimension,
+            "typeMetricDict": typeMetricDict,
+            "name": nameDimension,
+            # "nameList": nameDimensionList,
+            "unit": unitDimension,
+            # "unitList": unitDimensionList,
+            "weight": weightDimension,
+            "weightList": weightDimensionList,
+            "priority": priorityDimension,
+            "priorityList": priorityDimensionList,
+            "kind": kindDimension,
+            "kindList": kindDimensionList,
+            "optimal": optimalDimension,
+            "optimalList": optimalDimensionList,
+            "multiple": multipleDimension,
+            "multipleList": multipleDimensionList,
+            "spare": spareDimension,
+            "spareList": spareDimensionList,
+            # "spare1": spare1Dimension,
+            # "spare1List": spare1DimensionList,
+            # "spare2": spare2Dimension,
+            # "spare2List": spare2DimensionList
+        }
+        return result
+
+    def _safe_config_parse(self, config_dict, typeWeight, dimensionWeight):
+
+        # get weight type
+        typeWeightSafe = typeWeight['safe']
+        # typeSafe = [key for key, value in typeWeightSafe.items() if value != 0]
+        typeSafe = list(typeWeightSafe.keys())  # get type list
+        # typeWeightSafeDict = {key: value for key, value in typeWeightSafe.items() if value != 0}
+        # typeWeightSafeList = list(typeWeightSafeDict.values())
+        typeWeightSafeList = list(typeWeightSafe.values())
+        flagCustomSafe = not all(x is None for x in typeWeightSafeList)
+
+        # safe
+        safe_dict = config_dict['safe']
+        safe_value_dict = {}
+
+        for type in typeSafe:
+            safe_value_dict.update(safe_dict[type])
+        df_safe_value = pd.DataFrame(safe_value_dict).T
+
+        # safe_value_dict.update(safe_dict['safeTime'])
+        # safe_value_dict.update(safe_dict['safeDistance'])
+        # safe_value_dict.update(safe_dict['safeAcceleration'])
+        # safe_value_dict.update(safe_dict['safeProbability'])
+        # df_safe_value = pd.DataFrame(safe_value_dict).T
+        # df_safe_value = df_safe_value[df_safe_value['enable'] == True]
+
+        # get metric list
+        metricSafe = df_safe_value.index.tolist()
+
+        # get weight list
+        weightSafe = df_safe_value['weight'].astype(float).to_dict()
+        weightSafeList = list(weightSafe.values())
+
+        # get priority list
+        prioritySafe = df_safe_value['priority'].astype(int).to_dict()
+        prioritySafeList = list(prioritySafe.values())
+
+        # get paramList
+        paramSafe = df_safe_value['paramList'].to_dict()
+
+        first_key = next(iter(paramSafe))
+        paramNum = len(paramSafe[first_key])
+
+        kindSafe = [{} for _ in range(paramNum)]
+        optimalSafe = [{} for _ in range(paramNum)]
+        multipleSafe = [{} for _ in range(paramNum)]
+        spare1Safe = [{} for _ in range(paramNum)]
+        spare2Safe = [{} for _ in range(paramNum)]
+
+        for key, value_list in paramSafe.items():
+            for i in range(len(value_list)):
+                kindSafe[i][key] = int(value_list[i]['kind'])
+                optimalSafe[i][key] = float(value_list[i]['optimal'])
+                multipleSafe[i][key] = [float(x) for x in value_list[i]['multiple']]
+
+                spare1Safe[i][key] = (value_list[i]['spare1'])
+                spare2Safe[i][key] = (value_list[i]['spare2'])
+
+        kindSafeList = [value for dict_val in kindSafe for value in dict_val.values()]
+        optimalSafeList = [value for dict_val in optimalSafe for value in dict_val.values()]
+        multipleSafeList = [value for dict_val in multipleSafe for value in dict_val.values()]
+        spare1SafeList = [value for dict_val in spare1Safe for value in dict_val.values()]
+        spare2SafeList = [value for dict_val in spare2Safe for value in dict_val.values()]
+
+        safe = {
+            "weightSafe": float(dimensionWeight['safe']),
+            "weightCustom": flagCustomSafe,
+            "type": typeSafe,
+            "typeWeight": typeWeightSafe,
+            "typeWeightList": typeWeightSafeList,
+            "metric": metricSafe,
+            "weight": weightSafe,
+            "weightList": weightSafeList,
+            "priority": prioritySafe,
+            "priorityList": prioritySafeList,
+            "kind": kindSafe,
+            "kindList": kindSafeList,
+            "optimal": optimalSafe,
+            "optimalList": optimalSafeList,
+            "multiple": multipleSafe,
+            "multipleList": multipleSafeList,
+            "spare1": spare1Safe,
+            "spare1List": spare1SafeList,
+            "spare2": spare2Safe,
+            "spare2List": spare2SafeList
+        }
+        return safe
+
+    def _function_config_parse(self, config_dict, typeWeight, dimensionWeight):
+        # get weight type
+        typeWeightFunction = typeWeight['function']
+        typeFunction = [key for key, value in typeWeightFunction.items() if value != 0]
+
+        typeWeightFunctionDict = {key: value for key, value in typeWeightFunction.items() if value != 0}
+        typeWeightFunctionList = list(typeWeightFunctionDict.values())
+        flagCustomFunction = not all(x is None for x in typeWeightFunctionList)
+
+        # function
+        function_dict = config_dict['function']
+        function_value_dict = {}
+
+        for type in typeFunction:
+            function_value_dict.update(function_dict[type])
+        df_function_value = pd.DataFrame(function_value_dict).T
+
+        # get metric list
+        metricFunction = df_function_value.index.tolist()
+
+        # get weight list
+        weightFunction = df_function_value['weight'].astype(float).to_dict()
+        weightFunctionList = list(weightFunction.values())
+
+        # get priority list
+        priorityFunction = df_function_value['priority'].astype(int).to_dict()
+        priorityFunctionList = list(priorityFunction.values())
+
+        # get kind list
+        kindFunction = df_function_value['kind'].astype(int).to_dict()
+        kindFunctionList = list(kindFunction.values())
+
+        # get optimal list
+        optimalFunction = df_function_value['optimal'].astype(float).to_dict()
+        optimalFunctionList = list(optimalFunction.values())
+
+        # get multiple list
+        multipleFunction = df_function_value['multiple'].astype(float).to_dict()
+        multipleFunctionList = list(multipleFunction.values())
+
+        function = {
+            "weightFunction": float(dimensionWeight['function']),
+            "weightCustom": flagCustomFunction,
+            "type": typeFunction,
+            "typeWeight": typeWeightFunction,
+            "typeWeightList": typeWeightFunctionList,
+            "metric": metricFunction,
+            "weight": weightFunction,
+            "weightList": weightFunctionList,
+            "priority": priorityFunction,
+            "priorityList": priorityFunctionList,
+            "kind": kindFunction,
+            "kindList": kindFunctionList,
+            "optimal": optimalFunction,
+            "optimalList": optimalFunctionList,
+            "multiple": multipleFunction,
+            "multipleList": multipleFunctionList
+        }
+        return function
+
+    def _compliance_config_parse(self, config_dict, typeWeight, dimensionWeight):
+        # get weight type
+        typeWeightCompliance = typeWeight['compliance']
+        typeCompliance = list(typeWeightCompliance.keys())
+        typeWeightComplianceList = list(typeWeightCompliance.values())
+        flagCustomCompliance = not all(x is None for x in typeWeightComplianceList)
+
+        # get type name
+        typeNameCompliance = self.type_name["compliance"]
+
+        # compliance
+        compliance_dict = config_dict['compliance']
+        compliance_value_dict = {}
+        typeMetricDict = {}
+
+        for type in typeCompliance:
+            compliance_value_dict.update(compliance_dict[type])
+            typeMetricDict[type] = list(compliance_dict[type].keys())
+
+        df_compliance_value = pd.DataFrame(compliance_value_dict).T
+
+        # get metric list
+        metricCompliance = df_compliance_value.index.tolist()
+
+        # get weight type
+        typeWeightCompliance = typeWeight['compliance']
+        typeWeightComplianceList = list(typeWeightCompliance.values())
+
+        # get name list
+        nameCompliance = df_compliance_value['name'].to_dict()
+
+        # get unit list
+        unitCompliance = df_compliance_value['unit'].to_dict()
+
+        # get weight list
+        weightCompliance = df_compliance_value['weight'].astype(float).to_dict()
+        weightComplianceList = list(weightCompliance.values())
+
+        compliance = {
+            "weightDimension": float(dimensionWeight['compliance']),
+            "weightCustom": flagCustomCompliance,
+            "type": typeCompliance,
+            "typeWeight": typeWeightCompliance,
+            "typeWeightList": typeWeightComplianceList,
+            "typeName": typeNameCompliance,
+            "typeMetricDict": typeMetricDict,
+            "metric": metricCompliance,
+            "name": nameCompliance,
+            "unit": unitCompliance,
+            "weight": weightCompliance,
+            "weightList": weightComplianceList
+        }
+        return compliance
+
+    def _comfort_config_parse(self, config_dict, typeWeight, dimensionWeight):
+        # get weight type
+        typeWeightComfort = typeWeight['comfort']
+        typeComfort = [key for key, value in typeWeightComfort.items() if value != 0]
+        typeWeightComfortDict = {key: value for key, value in typeWeightComfort.items() if value != 0}
+        typeWeightComfortList = list(typeWeightComfortDict.values())
+        flagCustomComfort = not all(x is None for x in typeWeightComfortList)
+
+        # comfort
+        comfort_dict = config_dict['comfort']
+        comfort_value_dict = {}
+
+        for type in typeComfort:
+            comfort_value_dict.update(comfort_dict[type])
+        df_comfort_value = pd.DataFrame(comfort_value_dict).T
+
+        # comfort_value_dict.update(comfort_dict['comfortLat'])
+        # comfort_value_dict.update(comfort_dict['comfortLon'])
+        # df_comfort_value = pd.DataFrame(comfort_value_dict).T
+        # df_comfort_value = df_comfort_value[df_comfort_value['enable'] == True]
+
+        # get metric list
+        metricComfort = df_comfort_value.index.tolist()
+
+        # get weight type
+        typeWeightComfort = typeWeight['comfort']
+        typeWeightComfortList = list(typeWeightComfort.values())
+
+        # get weight list
+        weightComfort = df_comfort_value['weight'].astype(float).to_dict()
+        weightComfortList = list(weightComfort.values())
+
+        # get priority list
+        priorityComfort = df_comfort_value['priority'].astype(int).to_dict()
+        priorityComfortList = list(priorityComfort.values())
+
+        # get kind list
+        kind1 = df_comfort_value['kind1'].astype(int).to_dict()
+        kind2 = df_comfort_value['kind2'].astype(int).to_dict()
+        kind3 = df_comfort_value['kind3'].astype(int).to_dict()
+        kindComfort = {
+            "kind1": kind1,
+            "kind2": kind2,
+            "kind3": kind3
+        }
+        kindComfortList = list(self._merge_dict(kind1, kind2, kind3).values())
+
+        # get optimal list
+        optimal1 = df_comfort_value['optimal1'].astype(float).to_dict()
+        optimal2 = df_comfort_value['optimal2'].astype(float).to_dict()
+        optimal3 = df_comfort_value['optimal3'].astype(float).to_dict()
+        optimalComfort = {
+            "optimal1": optimal1,
+            "optimal2": optimal2,
+            "optimal3": optimal3
+        }
+        optimalComfortList = list(self._merge_dict(optimal1, optimal2, optimal3).values())
+
+        # get multiple list
+        multiple1 = df_comfort_value['multiple1'].astype(float).to_dict()
+        multiple2 = df_comfort_value['multiple2'].astype(float).to_dict()
+        multiple3 = df_comfort_value['multiple3'].astype(float).to_dict()
+        multipleComfort = {
+            "multiple1": multiple1,
+            "multiple2": multiple2,
+            "multiple3": multiple3
+        }
+        multipleComfortList = list(self._merge_dict(multiple1, multiple2, multiple3).values())
+
+        comfort = {
+            "weightComfort": float(dimensionWeight['comfort']),
+            "weightCustom": flagCustomComfort,
+            "type": typeComfort,
+            "typeWeight": typeWeightComfort,
+            "typeWeightList": typeWeightComfortList,
+            "metric": metricComfort,
+            "weight": weightComfort,
+            "weightList": weightComfortList,
+            "priority": priorityComfort,
+            "priorityList": priorityComfortList,
+            "kind": kindComfort,
+            "kindList": kindComfortList,
+            "optimal": optimalComfort,
+            "optimalList": optimalComfortList,
+            "multiple": multipleComfort,
+            "multipleList": multipleComfortList
+        }
+        return comfort
+
+    def _efficient_config_parse(self, config_dict, typeWeight, dimensionWeight):
+        # get weight type
+        typeWeightEfficient = typeWeight['efficient']
+        typeEfficient = [key for key, value in typeWeightEfficient.items() if value != 0]
+        typeWeightEfficientDict = {key: value for key, value in typeWeightEfficient.items() if value != 0}
+        typeWeightEfficientList = list(typeWeightEfficientDict.values())
+        flagCustomEfficient = not all(x is None for x in typeWeightEfficientList)
+
+        # efficient
+        efficient_dict = config_dict['efficient']
+        efficient_value_dict = {}
+
+        for type in typeEfficient:
+            efficient_value_dict.update(efficient_dict[type])
+        df_efficient_value = pd.DataFrame(efficient_value_dict).T
+
+        # efficient_value_dict.update(efficient_dict['efficientDrive'])
+        # efficient_value_dict.update(efficient_dict['efficientStop'])
+        # df_efficient_value = pd.DataFrame(efficient_value_dict).T
+        # df_efficient_value = df_efficient_value[df_efficient_value['enable'] == True]
+
+        # get metric list
+        metricEfficient = df_efficient_value.index.tolist()
+
+        # get weight type
+        typeWeightEfficient = typeWeight['efficient']
+        typeWeightEfficientList = list(typeWeightEfficient.values())
+
+        # get weight list
+        weightEfficient = df_efficient_value['weight'].astype(float).to_dict()
+        weightEfficientList = list(weightEfficient.values())
+
+        # get priority list
+        priorityEfficient = df_efficient_value['priority'].astype(int).to_dict()
+        priorityEfficientList = list(priorityEfficient.values())
+
+        # get kind list
+        kindEfficient = df_efficient_value['kind'].astype(int).to_dict()
+        kindEfficientList = list(kindEfficient.values())
+
+        # get optimal list
+        optimalEfficient = df_efficient_value['optimal'].astype(float).to_dict()
+        optimalEfficientList = list(optimalEfficient.values())
+
+        # get multiple list
+        multipleEfficient = df_efficient_value['multiple'].astype(float).to_dict()
+        multipleEfficientList = list(multipleEfficient.values())
+
+        efficient = {
+            "weightEfficient": float(dimensionWeight['efficient']),
+            "weightCustom": flagCustomEfficient,
+            "type": typeEfficient,
+            "typeWeight": typeWeightEfficient,
+            "typeWeightList": typeWeightEfficientList,
+            "metric": metricEfficient,
+            "weight": weightEfficient,
+            "weightList": weightEfficientList,
+            "priority": priorityEfficient,
+            "priorityList": priorityEfficientList,
+            "kind": kindEfficient,
+            "kindList": kindEfficientList,
+            "optimal": optimalEfficient,
+            "optimalList": optimalEfficientList,
+            "multiple": multipleEfficient,
+            "multipleList": multipleEfficientList
+        }
+        return efficient
+
+    def _merge_dict(self, dict1, dict2, dict3):
+        merged_dict = {}
+        # save the key and values lists
+        dict1_key = list(dict1.keys())
+        dict2_key = list(dict2.keys())
+        dict3_key = list(dict3.keys())
+        dict1_values = list(dict1.values())
+        dict2_values = list(dict2.values())
+        dict3_values = list(dict3.values())
+
+        for i in range(len(dict1)):
+            merged_dict[f"{dict1_key[i]}1"] = dict1_values[i]
+            merged_dict[f"{dict2_key[i]}2"] = dict2_values[i]
+            merged_dict[f"{dict3_key[i]}3"] = dict3_values[i]
+        return merged_dict

+ 78 - 0
constant_config_parse/constant.ini

@@ -0,0 +1,78 @@
+[DEFAULT]
+EGO_PLAYER_ID = 1
+OBJ_PLAYER_ID = 2
+FREQUENCY = 100
+
+[SINGLE_CASE_EVAL]
+FIRST_ORDER_LOSS = 0.01
+SECOND_ORDER_LOSS = 0.05
+THIRD_ORDER_LOSS = 0.10
+
+[SINGLE_CASE_EVALUATE]
+BENCHMARK = 80
+PLAYBACK_ACCURACY = 3
+
+[DATA_PROCESS]
+FRAME_RATE = 100
+EGO_STATE_CSV = "EgoState.csv"
+
+[SAFE]
+TC = 0.3
+BRAKE_RESPONSE_TIME = 0.3
+EGO_ACCELERATE_MAX = 6
+OBJ_DECELERATE_MAX = 8
+EGO_DECELERATE_MIN = 1
+EGO_DECELERATE_LON_MAX = 8
+EGO_DECELERATE_LAT_MAX = 1
+
+AREA_DISTANCE_LON_FRONT = 100
+AREA_DISTANCE_LON_REAR = -5
+AREA_DISTANCE_LAT = 4
+
+SAFE_DISTANCE_LAT = 0.5
+DECELERATE_LEFT_LAT_MIN = 1
+DECELERATE_RIGHT_LAT_MIN = 1
+DECELERATE_LAT_MAX = 5
+
+[FUNCTION]
+SAFE_TIME_GAP = 3
+TIME_RANGE = 1
+FRAME_RANGE = 13
+STOP_SPEED_THRESHOLD = 0.05
+
+CONTINUOUS_TIME_PERIOD = 1
+CONTINUOUS_FRAME_PERIOD = 13
+
+[COMPLIANCE]
+
+
+[COMFORT]
+TIME_RANGE = 1
+FRAME_RANGE = 13
+UNIT_DISTANCE = 100000
+ACCELERATE_INTERPOLATION_LOW = [18, 4]
+ACCELERATE_INTERPOLATION_HIGH = [72, 2]
+DECELERATE_INTERPOLATION_LOW = [18, -5]
+DECELERATE_INTERPOLATION_HIGH = [72, -3.5]
+TW = 6000
+AVG = 0.4
+CR_DIFF = 0.05
+T_DIFF = 0.39
+CURVHOR_THRESHOLD = 0.001
+
+[EFFICIENT]
+STOP_SPEED_THRESHOLD = 0.05
+STOP_TIME_THRESHOLD = 0.5
+
+TIME_RANGE = 1
+FRAME_RANGE = 13
+
+[CUSTOM_DIMENSION]
+
+
+[COMMON]
+GRADE_EXCELLENT = 90
+GRADE_GOOD = 80
+GRADE_GENERAL = 60
+# GRADE_BAD
+

+ 38 - 0
constant_config_parse/constant_config.py

@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import configparser
+
+# 创建一个配置解析器对象
+config = configparser.ConfigParser()
+
+# 读取配置文件
+config.read('constant.ini')
+
+
+def func1():
+    # 获取配置值
+    EGO_PLAYER_ID = config.get('DEFAULT', 'EGO_PLAYER_ID')
+    OBJ_PLAYER_ID = config.get('DEFAULT', 'OBJ_PLAYER_ID')
+
+    # 打印配置值以验证它们是否正确读取
+    print(f"EGO_PLAYER_ID: {EGO_PLAYER_ID}")
+    print(f"OBJ_PLAYER_ID: {OBJ_PLAYER_ID}")
+
+
+def func2():
+    FIRST_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'FIRST_ORDER_LOSS')
+    SECOND_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'SECOND_ORDER_LOSS')
+    THIRD_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'THIRD_ORDER_LOSS')
+
+    print(f"FIRST_ORDER_LOSS: {FIRST_ORDER_LOSS}")
+    print(f"SECOND_ORDER_LOSS: {SECOND_ORDER_LOSS}")
+    print(f"THIRD_ORDER_LOSS: {THIRD_ORDER_LOSS}")
+
+
+def main():
+    func1()
+    func2()
+
+
+main()

+ 21 - 0
custom/center_distance_expectation.json

@@ -0,0 +1,21 @@
+{
+  "priority": "1",
+  "paramList": [
+    {
+      "kind": "-1",
+      "optimal": "1.0",
+      "multiple": [
+        "0.5",
+        "2"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 140 - 0
custom/center_distance_expectation.py

@@ -0,0 +1,140 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+import pandas as pd
+import numpy as np
+import scipy.signal as sg
+from common import zip_time_pairs, continuous_group, continous_judge
+from log import logger
+
+"""import functions"""
+
+
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+        self.result = {
+            "name": "ica车道中心线横向距离分布期望",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "车辆中心线横向距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+
+        self.ego_df = pd.DataFrame()
+        self.df_lka = pd.DataFrame()
+        self.center_dist_with_nan = list()
+        self.center_time_list = list()
+        self.center_frame_list = list()
+        self.center_dist = list()
+
+        self.run()
+
+    def data_extract(self):
+        self.ego_df = self.data.ego_data
+        self.df_lka = self.ego_df[self.ego_df['ICA_status'].isin(
+            ["Only_Longitudinal_Control", "LLC_Follow_Line", "LLC_Follow_Vehicle"])].copy()
+
+        if self.df_lka.empty:
+            self.result['statusFlag']['functionICA'] = False
+        else:
+            self.result['statusFlag']['functionICA'] = True
+
+        # self.df_lka = self.ego_df[self.ego_df['LKA_status'] == "Active"].copy()
+        # self.config = self.data.config
+        # self.function_config = self.config.config['function']
+        # self.optimal_dict = self.function_config['optimal']
+
+    def data_analyze(self):
+        df_lka = self.df_lka
+        self.center_dist_with_nan = df_lka['laneOffset'].to_list()
+        self.center_time_list = df_lka['simTime'].to_list()
+        self.center_frame_list = df_lka['simFrame'].to_list()
+        self.center_dist = [x for x in self.center_dist_with_nan if not np.isnan(x)]
+
+        if not self.center_dist:
+            self.result['value'].append(0)
+        else:
+            center_dist = [abs(x) for x in self.center_dist]
+
+            # 车道中心线横向距离分布期望与标准差
+            E_lane_center_dist = np.mean(center_dist)
+            self.result['value'].append(round(E_lane_center_dist, 2))
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame(
+            {'simTime': self.center_time_list, 'simFrame': self.center_frame_list,
+             'center_dist': self.center_dist_with_nan})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        unfunc_df = unfunc_df.dropna(subset=['center_dist'])
+        lane_df = unfunc_df[abs(unfunc_df['center_dist']) > 1.5]
+        lane_df = lane_df[['simTime', 'simFrame', 'center_dist']]
+        dist_lane_df = continuous_group(lane_df)
+        dist_lane_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, dist_lane_df], ignore_index=True)
+
+    def report_data_statistic(self):
+
+        time_list = self.df_lka['simTime'].values.tolist()
+        line_dist_list = self.center_dist_with_nan
+
+        self.result['tableData']['avg'] = self.result['value'][0] if not self.df_lka.empty else '-'
+        self.result['tableData']['max'] = '-'
+        self.result['tableData']['min'] = '-'
+
+        zip_vs_time = zip_time_pairs(time_list, line_dist_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+
+        self.result['reportData']['range'] = f"[0, 1.0]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(
+            f"[case:{self.case_name}] Custom metric:[center_distance_expectation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 21 - 0
custom/center_distance_max.json

@@ -0,0 +1,21 @@
+{
+  "priority": "1",
+  "paramList": [
+    {
+      "kind": "-1",
+      "optimal": "1.5",
+      "multiple": [
+        "0.5",
+        "2"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 139 - 0
custom/center_distance_max.py

@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+import pandas as pd
+import numpy as np
+import scipy.signal as sg
+from common import zip_time_pairs, continuous_group, continous_judge
+from log import logger
+
+"""import functions"""
+
+
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+        self.result = {
+            "name": "ica车道中心线横向距离极大值",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "车辆中心线横向距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+
+        self.ego_df = pd.DataFrame()
+        self.df_lka = pd.DataFrame()
+        self.center_dist_with_nan = list()
+        self.center_time_list = list()
+        self.center_frame_list = list()
+        self.center_dist = list()
+
+        self.run()
+
+    def data_extract(self):
+        self.ego_df = self.data.ego_data
+        self.df_lka = self.ego_df[self.ego_df['ICA_status'].isin(
+            ["Only_Longitudinal_Control", "LLC_Follow_Line", "LLC_Follow_Vehicle"])].copy()
+
+        if self.df_lka.empty:
+            self.result['statusFlag']['functionICA'] = False
+        else:
+            self.result['statusFlag']['functionICA'] = True
+
+        # self.df_lka = self.ego_df[self.ego_df['LKA_status'] == "Active"].copy()
+        # self.config = self.data.config
+        # self.function_config = self.config.config['function']
+        # self.optimal_dict = self.function_config['optimal']
+
+    def data_analyze(self):
+        df_lka = self.df_lka
+        self.center_dist_with_nan = df_lka['laneOffset'].to_list()
+        self.center_time_list = df_lka['simTime'].to_list()
+        self.center_frame_list = df_lka['simFrame'].to_list()
+        self.center_dist = [x for x in self.center_dist_with_nan if not np.isnan(x)]
+
+        if not self.center_dist:
+            self.result['value'].append(0)
+        else:
+            center_dist = [abs(x) for x in self.center_dist]
+
+            # 车道中心线横向距离分布极值
+            center_dist = np.array(center_dist)
+            extreme_max_value = center_dist.max()
+            self.result['value'].append(round(extreme_max_value, 2))
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame(
+            {'simTime': self.center_time_list, 'simFrame': self.center_frame_list,
+             'center_dist': self.center_dist_with_nan})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        unfunc_df = unfunc_df.dropna(subset=['center_dist'])
+        lane_df = unfunc_df[abs(unfunc_df['center_dist']) > 1.5]
+        lane_df = lane_df[['simTime', 'simFrame', 'center_dist']]
+        dist_lane_df = continuous_group(lane_df)
+        dist_lane_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, dist_lane_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.df_lka['simTime'].values.tolist()
+        line_dist_list = self.center_dist_with_nan
+
+        self.result['tableData']['avg'] = '-'
+        self.result['tableData']['max'] = self.result['value'][0] if not self.df_lka.empty else '-'
+        self.result['tableData']['min'] = '-'
+
+        zip_vs_time = zip_time_pairs(time_list, line_dist_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+
+        self.result['reportData']['range'] = f"[0, 1.5]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[center_distance_max:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 21 - 0
custom/center_distance_min.json

@@ -0,0 +1,21 @@
+{
+  "priority": "1",
+  "paramList": [
+    {
+      "kind": "-1",
+      "optimal": "1.0",
+      "multiple": [
+        "0.5",
+        "2"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 137 - 0
custom/center_distance_min.py

@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+import pandas as pd
+import numpy as np
+import scipy.signal as sg
+from common import zip_time_pairs, continuous_group, continous_judge
+from log import logger
+
+"""import functions"""
+
+
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+        self.result = {
+            "name": "ica车道中心线横向距离极小值",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "车辆中心线横向距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.ego_df = pd.DataFrame()
+        self.df_lka = pd.DataFrame()
+        self.center_dist_with_nan = list()
+        self.center_time_list = list()
+        self.center_frame_list = list()
+        self.center_dist = list()
+
+        self.run()
+
+    def data_extract(self):
+        self.ego_df = self.data.ego_data
+        self.df_lka = self.ego_df[self.ego_df['ICA_status'].isin(
+            ["Only_Longitudinal_Control", "LLC_Follow_Line", "LLC_Follow_Vehicle"])].copy()
+
+        if self.df_lka.empty:
+            self.result['statusFlag']['functionICA'] = False
+        else:
+            self.result['statusFlag']['functionICA'] = True
+        # self.df_lka = self.ego_df[self.ego_df['LKA_status'] == "Active"].copy()
+        # self.config = self.data.config
+        # self.function_config = self.config.config['function']
+        # self.optimal_dict = self.function_config['optimal']
+
+    def data_analyze(self):
+        df_lka = self.df_lka
+        self.center_dist_with_nan = df_lka['laneOffset'].to_list()
+        self.center_time_list = df_lka['simTime'].to_list()
+        self.center_frame_list = df_lka['simFrame'].to_list()
+        self.center_dist = [x for x in self.center_dist_with_nan if not np.isnan(x)]
+
+        if not self.center_dist:
+            self.result['value'].append(0)
+        else:
+            center_dist = [abs(x) for x in self.center_dist]
+
+            # 车道中心线横向距离分布极值
+            center_dist = np.array(center_dist)
+            extreme_min_value = center_dist.min()
+            self.result['value'].append(round(extreme_min_value, 2))
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame(
+            {'simTime': self.center_time_list, 'simFrame': self.center_frame_list,
+             'center_dist': self.center_dist_with_nan})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        unfunc_df = unfunc_df.dropna(subset=['center_dist'])
+        lane_df = unfunc_df[abs(unfunc_df['center_dist']) > 1.5]
+        lane_df = lane_df[['simTime', 'simFrame', 'center_dist']]
+        dist_lane_df = continuous_group(lane_df)
+        dist_lane_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, dist_lane_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.df_lka['simTime'].values.tolist()
+        line_dist_list = self.center_dist_with_nan
+
+        self.result['tableData']['avg'] = '-'
+        self.result['tableData']['max'] = '-'
+        self.result['tableData']['min'] = self.result['value'][0] if not self.df_lka.empty else '-'
+
+        zip_vs_time = zip_time_pairs(time_list, line_dist_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+
+        self.result['reportData']['range'] = f"[0, 1.0]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[center_distance_min:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 21 - 0
custom/center_distance_standard_deviation.json

@@ -0,0 +1,21 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "-1",
+      "optimal": "0.5",
+      "multiple": [
+        "0.5",
+        "2"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 136 - 0
custom/center_distance_standard_deviation.py

@@ -0,0 +1,136 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           yangzihao(yangzihao@china-icv.cn)
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+import pandas as pd
+import numpy as np
+import scipy.signal as sg
+from common import zip_time_pairs, continuous_group, continous_judge
+from log import logger
+
+"""import functions"""
+
+
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+        self.result = {
+            "name": "ica车道中心线横向距离分布标准差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "车辆中心线横向距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.ego_df = pd.DataFrame()
+        self.df_lka = pd.DataFrame()
+        self.center_dist_with_nan = list()
+        self.center_time_list = list()
+        self.center_frame_list = list()
+        self.center_dist = list()
+        self.run()
+
+    def data_extract(self):
+        self.ego_df = self.data.ego_data
+        self.df_lka = self.ego_df[self.ego_df['ICA_status'].isin(
+            ["Only_Longitudinal_Control", "LLC_Follow_Line", "LLC_Follow_Vehicle"])].copy()
+
+        if self.df_lka.empty:
+            self.result['statusFlag']['functionICA'] = False
+        else:
+            self.result['statusFlag']['functionICA'] = True
+        # self.df_lka = self.ego_df[self.ego_df['LKA_status'] == "Active"].copy()
+        # self.config = self.data.config
+        # self.function_config = self.config.config['function']
+        # self.optimal_dict = self.function_config['optimal']
+
+    def data_analyze(self):
+        df_lka = self.df_lka
+        self.center_dist_with_nan = df_lka['laneOffset'].to_list()
+        self.center_time_list = df_lka['simTime'].to_list()
+        self.center_frame_list = df_lka['simFrame'].to_list()
+        self.center_dist = [x for x in self.center_dist_with_nan if not np.isnan(x)]
+
+        if not self.center_dist:
+            self.result['value'].append(0)
+        else:
+            center_dist = [abs(x) for x in self.center_dist]
+
+            # 车道中心线横向距离分布期望与标准差
+            D_lane_center_dist = np.std(center_dist)
+            self.result['value'].append(round(D_lane_center_dist, 2))
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame(
+            {'simTime': self.center_time_list, 'simFrame': self.center_frame_list,
+             'center_dist': self.center_dist_with_nan})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        unfunc_df = unfunc_df.dropna(subset=['center_dist'])
+        lane_df = unfunc_df[abs(unfunc_df['center_dist']) > 1.5]
+        lane_df = lane_df[['simTime', 'simFrame', 'center_dist']]
+        dist_lane_df = continuous_group(lane_df)
+        dist_lane_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, dist_lane_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.df_lka['simTime'].values.tolist()
+        line_dist_list = self.center_dist_with_nan
+
+        self.result['tableData']['avg'] = self.result['value'][0] if not self.df_lka.empty else '-'
+        self.result['tableData']['max'] = '-'
+        self.result['tableData']['min'] = '-'
+
+        zip_vs_time = zip_time_pairs(time_list, line_dist_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+
+        self.result['reportData']['range'] = f"[0, 0.5]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(
+            f"[case:{self.case_name}] Custom metric:[center_distance_standard_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

BIN
custom/cicv_ICA_lateral_control/2024-06-24_16-15.png


+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control01_distance_nearby_lane.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 161 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control01_distance_nearby_lane.py

@@ -0,0 +1,161 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+车道宽度:3.75m
+车宽:1.8m
+车的一边距离车道边界线为0.975m为最佳,值越小,分值越低
+
+"""
+
+
+
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "离近侧车道线最小距离",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "离近侧车道线最小距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标01: 离近侧车道线最小距离: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadMark_df = self.roadMark_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+        # 提取距离左车道线和右车道线距离
+        # roadMark_df['nearby_distance']
+        roadMark_left_df = roadMark_df[roadMark_df.id == 0].reset_index(drop=True)
+        roadMark_right_df = roadMark_df[roadMark_df.id == 2].reset_index(drop=True)
+        roadMark_left_df['right_lateral_distance'] = roadMark_right_df['lateralDist']
+        # 计算到车道边界线距离
+        roadMark_left_df['nearby_distance_to_lane_boundary'] = roadMark_left_df.apply(lambda x: self.Compute_nearby_distance_to_lane_boundary(x, width_ego), axis=1)
+        nearby_distance_to_lane_boundary = min(roadMark_left_df['nearby_distance_to_lane_boundary'])
+        self.result['value'] = [round(nearby_distance_to_lane_boundary, 3)]
+        self.time_list_follow = roadMark_left_df['simTime'].values.tolist()
+        self.frame_list_follow = roadMark_left_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadMark_left_df['nearby_distance_to_lane_boundary'].values.tolist()
+        # print("hello world")
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[0, 0.975]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control02_lateral_offset.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 164 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control02_lateral_offset.py

@@ -0,0 +1,164 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "最大横向偏移量",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "最大横向偏移量(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标02: 最大横向偏移量: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        # roadMark_df['nearby_distance']
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # roadMark_left_df['right_lateral_distance'] = roadMark_right_df['lateralDist']
+        # # 计算到车道边界线距离
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)
+        # max_laneOffset_abs_index = max(roadPos_ego_df['laneOffset_abs'])
+        max_laneOffset_abs_index = roadPos_ego_df['laneOffset_abs'].idxmax()
+        row_with_max_value = roadPos_ego_df.iloc[max_laneOffset_abs_index].laneOffset
+        self.result['value'] = [row_with_max_value]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control03_relative_center_distance_expectation.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 158 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control03_relative_center_distance_expectation.py

@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "相对横向偏移量分布期望",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "相对横向偏移量分布期望(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标03: 相对横向偏移量分布期望: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # # 计算到车道边界线距离
+        mean_laneOffset_index = roadPos_ego_df['laneOffset'].mean()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control04_relative_center_distance_standard_deviation.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 155 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control04_relative_center_distance_standard_deviation.py

@@ -0,0 +1,155 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+    设计思路:
+    最大横向偏移量
+    zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "相对横向偏移量分布标准差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "相对横向偏移量分布标准差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标04: 相对横向偏移量分布标准差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        mean_laneOffset_index = roadPos_ego_df['laneOffset'].std()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control05_absolute_center_distance_expectation.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 161 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control05_absolute_center_distance_expectation.py

@@ -0,0 +1,161 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "绝对横向偏移量分布期望",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "绝对横向偏移量分布期望(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标05: 绝对横向偏移量分布期望: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply( \
+            lambda x: self.func_laneOffset_abs(x), axis=1)
+        # # 计算到车道边界线距离
+        mean_laneOffset_index = roadPos_ego_df['laneOffset_abs'].mean()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control06_absolute_center_distance_standard_deviation.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 158 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control06_absolute_center_distance_standard_deviation.py

@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+    设计思路:
+    最大横向偏移量
+    zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "绝对横向偏移量分布标准差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "绝对横向偏移量分布标准差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标06: 绝对横向偏移量分布标准差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply( \
+            lambda x: self.func_laneOffset_abs(x), axis=1)
+        mean_laneOffset_index = roadPos_ego_df['laneOffset_abs'].std()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control07_center_distance_max.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 160 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control07_center_distance_max.py

@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向距离极大值",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向距离极大值(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标07: 横向距离极大值: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # # 计算到车道边界线距离
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)
+        max_laneOffset_abs_index = roadPos_ego_df['laneOffset_abs'].idxmax()
+        row_with_max_value = roadPos_ego_df.iloc[max_laneOffset_abs_index].laneOffset
+        self.result['value'] = [row_with_max_value]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control08_center_distance_min.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 160 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control08_center_distance_min.py

@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向距离极小值",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向距离极小值(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标08: 横向距离极小值: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # # 计算到车道边界线距离
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)
+        min_laneOffset_abs_index = roadPos_ego_df['laneOffset_abs'].idxmin()
+        row_with_min_value = roadPos_ego_df.iloc[min_laneOffset_abs_index].laneOffset
+        self.result['value'] = [row_with_min_value]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control09_absolute_position_oscillation_frequency.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 179 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control09_absolute_position_oscillation_frequency.py

@@ -0,0 +1,179 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡频率",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡频率(Hz)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标09: 横向绝对位置振荡频率: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def func_center_line_cycle(self, l):
+        # print("\n穿过y=0的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1] and value > 0:
+                    number_peak += 1
+                if value < l[number + 1] and value < 0:
+                    number_trough += 1
+                continue
+            if number == length - 1:
+                if value > l[number - 1] and value > 0:
+                    number_peak += 1
+                if value < l[number - 1] and value < 0:
+                    number_trough += 1
+                continue
+            if value >= l[number - 1] and value > l[number + 1] and value > 0:
+                number_peak += 1
+            if value < l[number - 1] and value <= l[number + 1] and value < 0:
+                number_trough += 1
+        # print("number_peak: ", number_peak)
+        # print("number_trough: ", number_trough)
+        cycle = min(number_peak, number_trough) - 1
+        # print("cycle: ", cycle)
+        if cycle == -1:
+            return 0
+        return cycle
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        cycle_number = self.func_center_line_cycle(roadPos_ego_list)
+        if not roadPos_ego_df['simTime'].empty:
+            frenquency = cycle_number / roadPos_ego_df['simTime'].values[-1]
+        else:
+            frenquency = cycle_number
+        self.result['value'] = [round(frenquency, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control10_absolute_position_oscillation_difference.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 211 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control10_absolute_position_oscillation_difference.py

@@ -0,0 +1,211 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡极差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡极差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标10: 横向绝对位置振荡极差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def func_center_line_cycle_optical(self, l):
+        # print("\n穿过y=0的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        # 生成新的、只含有波峰波谷的列表
+        new_list = []
+        plus = []
+        minus = []
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1] and value > 0:
+                    number_peak += 1
+                    plus.append(value)
+                if value < l[number + 1] and value < 0:
+                    number_trough += 1
+                    minus.append(value)
+                continue
+
+            if number == length - 1:
+                if value > l[number - 1] and value > 0:
+                    number_peak += 1
+                    plus.append(value)
+                    if len(minus) != 0:
+                        new_list.append(min(minus))
+                        minus = []
+                if value < l[number - 1] and value < 0:
+                    number_trough += 1
+                    minus.append(value)
+                    if len(plus) != 0:
+                        new_list.append(max(plus))
+                        plus = []
+                if len(minus) != 0:
+                    new_list.append(min(minus))
+                    minus = []
+                if len(plus) != 0:
+                    new_list.append(max(plus))
+                    plus = []
+                continue
+
+            if value >= l[number - 1] and value > l[number + 1] and value > 0:
+                number_peak += 1
+                plus.append(value)
+                if len(minus) != 0:
+                    new_list.append(min(minus))
+                    minus = []
+            if value < l[number - 1] and value <= l[number + 1] and value < 0:
+                number_trough += 1
+                minus.append(value)
+                if len(plus) != 0:
+                    new_list.append(max(plus))
+                    plus = []
+        cycle = min(number_peak, number_trough) - 1
+        difference_list = []
+        for i in range(len(new_list) - 1):
+            difference = abs(new_list[i] - new_list[i + 1])
+            difference_list.append(difference)
+        if len(difference_list) == 0:
+            maximum_range = -1
+            # print(f"极差: {maximum_range}")
+        else:
+            maximum_range = max(difference_list)
+            # print(f"极差: {maximum_range}")
+        return maximum_range
+
+    def data_analyze(self):
+        roadPos_df = self.roadPos_df
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # laneOffset_max = max(roadPos_ego_df['laneOffset'])
+        # laneOffset_min = min(roadPos_ego_df['laneOffset'])
+        # oscillation_difference = laneOffset_max-laneOffset_min
+        # self.result['value'] = round(oscillation_difference, 3)
+
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        maximum_range = self.func_center_line_cycle_optical(roadPos_ego_list)
+
+        self.result['value'] = [round(maximum_range, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control11_heading_deviation_max.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 164 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control11_heading_deviation_max.py

@@ -0,0 +1,164 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大航向偏差角
+"""
+
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "最大航向角偏差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "最大航向角偏差(rad)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标11: 最大航向角偏差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        road_mark_df = self.roadMark_df
+        ego_df = player_df[player_df.playerId == 1].reset_index(drop=True)
+        # width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 左车道线曲率,右车道线曲率,求二者平均值,计算车道线曲率,再与自车朝向相减
+        road_mark_left_df = road_mark_df[road_mark_df.id == 0].reset_index(drop=True)
+        road_mark_right_df = road_mark_df[road_mark_df.id == 2].reset_index(drop=True)
+        road_mark_left_df['curvHor_left'] = road_mark_left_df['curvHor']
+        road_mark_left_df['curvHor_right'] = road_mark_right_df['curvHor']
+        road_mark_left_df['curvHor_middle'] = road_mark_left_df[['curvHor_left', 'curvHor_right']].apply( \
+            lambda x: (x['curvHor_left'] + x['curvHor_right'])/2, axis=1)
+        ego_df['curvHor_middle'] = road_mark_left_df['curvHor_middle']
+        ego_df['heading_deviation_abs'] = ego_df[['curvHor_middle', 'posH']].apply( \
+            lambda x: abs(x['posH'] - x['curvHor_middle']), axis=1)
+        row_with_max_value = max(ego_df['heading_deviation_abs'])
+
+        self.result['value'] = [row_with_max_value]
+        self.time_list_follow = ego_df['simTime'].values.tolist()
+        self.frame_list_follow = ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = ego_df['heading_deviation_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control12_relative_position_oscillation_frequency.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 236 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control12_relative_position_oscillation_frequency.py

@@ -0,0 +1,236 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡频率",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡频率(Hz)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标12: 横向相对位置振荡频率: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def func_center_line_cycle(self, l):
+        # print("\n穿过y=0的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1] and value > 0:
+                    number_peak += 1
+                if value < l[number + 1] and value < 0:
+                    number_trough += 1
+                continue
+            if number == length - 1:
+                if value > l[number - 1] and value > 0:
+                    number_peak += 1
+                if value < l[number - 1] and value < 0:
+                    number_trough += 1
+                continue
+            if value >= l[number - 1] and value > l[number + 1] and value > 0:
+                number_peak += 1
+            if value < l[number - 1] and value <= l[number + 1] and value < 0:
+                number_trough += 1
+        # print("number_peak: ", number_peak)
+        # print("number_trough: ", number_trough)
+        cycle = min(number_peak, number_trough) - 1
+        # print("cycle: ", cycle)
+        if cycle == -1:
+            return 0
+        return cycle
+
+    def func_normal_cycle_optical(self, l):
+        # print("正常的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        # value_peak = []
+        # value_trough = []
+        # 生成新的、只含有波峰波谷的列表
+        new_list = []
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number + 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if number == length - 1:
+                if value > l[number - 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number - 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if value >= l[number - 1] and value > l[number + 1]:
+                number_peak += 1
+                new_list.append(value)
+            if value < l[number - 1] and value <= l[number + 1]:
+                number_trough += 1
+                new_list.append(value)
+        if abs(number_peak - number_trough) > 1:
+            # print("计算波峰波谷有误")
+            pass
+        else:
+            # print("number_peak: ", number_peak)
+            # print("number_trough: ", number_trough)
+            cycle = max(number_peak, number_trough) - 1
+            # print("cycle: ", cycle)
+        # print(f"value_peak: {value_peak}")
+        # print(f"value_trough: {value_trough}")
+
+        # print(f"new_list: {new_list}")
+        difference_list = []
+        for i in range(len(new_list) - 1):
+            difference = abs(new_list[i] - new_list[i + 1])
+            difference_list.append(difference)
+        if len(difference_list) == 0:
+            maximum_range = -1
+            # print(f"极差: {maximum_range}")
+        else:
+            maximum_range = max(difference_list)
+            # print(f"极差: {maximum_range}")
+        return cycle
+
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        cycle_number = self.func_normal_cycle_optical(roadPos_ego_list)
+        if not roadPos_ego_df['simTime'].empty:
+            frenquency = cycle_number / roadPos_ego_df['simTime'].values[-1]
+        else:
+            frenquency = cycle_number
+        self.result['value'] = [round(frenquency, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 22 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control13_relative_position_oscillation_difference.json

@@ -0,0 +1,22 @@
+
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "optimal": "0.00001",
+      "multiple": [
+        "1",
+        "10000000"
+      ],
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ]
+    }
+  ]
+}

+ 186 - 0
custom/cicv_ICA_lateral_control/cicv_ica_lateral_control13_relative_position_oscillation_difference.py

@@ -0,0 +1,186 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡极差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡极差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标13: 横向相对位置振荡极差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['ACC_status'] == "Shut_off"].copy()  # 数字3对应ICA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_ICA'] = False
+        else:
+            self.result['statusFlag']['function_ICA'] = True
+
+    def func_normal_cycle_optical(self, l):
+        # print("正常的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        # 生成新的、只含有波峰波谷的列表
+        new_list = []
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number + 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if number == length - 1:
+                if value > l[number - 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number - 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if value >= l[number - 1] and value > l[number + 1]:
+                number_peak += 1
+                new_list.append(value)
+            if value < l[number - 1] and value <= l[number + 1]:
+                number_trough += 1
+                new_list.append(value)
+        if abs(number_peak - number_trough) > 1:
+            pass
+        else:
+            cycle = max(number_peak, number_trough) - 1
+        difference_list = []
+        for i in range(len(new_list) - 1):
+            difference = abs(new_list[i] - new_list[i + 1])
+            difference_list.append(difference)
+        if len(difference_list) == 0:
+            maximum_range = -1
+            # print(f"极差: {maximum_range}")
+        else:
+            maximum_range = max(difference_list)
+            # print(f"极差: {maximum_range}")
+        return maximum_range
+
+    def data_analyze(self):
+        roadPos_df = self.roadPos_df
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        oscillation_difference = self.func_normal_cycle_optical(roadPos_ego_list)
+        self.result['value'] = [round(oscillation_difference, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 1416 - 0
custom/cicv_ICA_lateral_control/config0624_ZY.json

@@ -0,0 +1,1416 @@
+{
+  "safe": {
+    "safeTime": {
+      "TTC": {
+        "name": "TTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "2.86",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "MTTC": {
+        "name": "MTTC",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.3",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s"
+      },
+      "THW": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.4",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "THW"
+      }
+    },
+    "safeDistance": {
+      "LonSD": {
+        "name": "LonSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "LatSD": {
+        "name": "LatSD",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "safeAcceleration": {
+      "DRAC": {
+        "name": "DRAC",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m/s^2"
+      },
+      "BTN": {
+        "name": "BTN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      },
+      "STN": {
+        "name": "STN",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%"
+      }
+    },
+    "safeProbability": {
+      "collisionRisk": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.19",
+              "5.4"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞风险概率"
+      },
+      "collisionSeverity": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          },
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "%",
+        "name": "碰撞严重程度"
+      }
+    }
+  },
+  "function": {
+    "functionLKA": {
+      "laneDistance": {
+        "name": "车道内偏移行驶时,与近侧车道线的横向距离",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.9",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "centerDistanceFrequency": {
+        "name": "横向相对位置震荡频率",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.2",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "HZ"
+      },
+      "centerDistanceRange": {
+        "name": "横向相对位置震荡极差",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.8",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      }
+    },
+    "functionICA-0531": {
+      "center_distance_expectation": {
+        "name": "车道中心线横向距离分布期望",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_max": {
+        "name": "车道中心线横向距离极大值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_min": {
+        "name": "车道中心线横向距离极小值",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.5",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "车道中心线横向距离分布标准差"
+      },
+      "ica_distance_deviation": {
+        "name": "跟车距离偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m"
+      },
+      "ica_response_time": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1.2",
+            "multiple": [
+              "0.5",
+              "2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "跟车启动响应时间"
+      },
+      "ica_speed_deviation": {
+        "name": "跟车速度偏差",
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "20",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      },
+      "ica_stop_distance": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "4",
+            "multiple": [
+              "0.25",
+              "4"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "跟停最短距离"
+      },
+      "cicv_ica_lateral_control01_distance_nearby_lane": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0.975",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "离近侧车道线最小距离"
+      },
+      "cicv_ica_lateral_control02_lateral_offset": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "最大横向偏移量"
+      },
+      "cicv_ica_lateral_control03_relative_center_distance_expectation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "相对横向偏移量分布期望"
+      },
+      "cicv_ica_lateral_control04_relative_center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "相对横向偏移量分布标准差"
+      },
+      "cicv_ica_lateral_control05_absolute_center_distance_expectation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "绝对横向偏移量分布期望"
+      },
+      "cicv_ica_lateral_control06_absolute_center_distance_standard_deviation": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "绝对横向偏移量分布标准差"
+      },
+      "cicv_ica_lateral_control07_center_distance_max": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向偏移量分布极大值"
+      },
+      "cicv_ica_lateral_control08_center_distance_min": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "m",
+        "name": "横向偏移量分布极小值"
+      },
+      "cicv_ica_lateral_control09_relative_position_oscillation_frequency": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "rad",
+        "name": "横向相对位置振荡频率"
+      },
+      "cicv_ica_lateral_control10_relative_position_oscillation_difference": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "rad",
+        "name": "横向相对位置振荡极差"
+      },
+      "cicv_ica_lateral_control11_heading_deviation_max": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "0",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "0",
+            "multiple": [
+              "0",
+              "1"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "rad",
+        "name": "最大航向偏差"
+      }
+    }
+  },
+  "comfort": {
+    "comfortLat": {
+      "zigzag": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "画龙"
+      },
+      "shake": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "3",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "晃动"
+      }
+    },
+    "comfortLon": {
+      "cadence": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "顿挫"
+      },
+      "slamBrake": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急刹"
+      },
+      "slamAccelerate": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "10",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          },
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.2",
+              "5"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": null,
+        "name": "急加速"
+      }
+    }
+  },
+  "efficient": {
+    "efficientDrive": {
+      "averageSpeed": {
+        "name": "平均速度",
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "30",
+            "multiple": [
+              "0.8",
+              "1.2"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "km/h"
+      }
+    },
+    "efficientStop": {
+      "stopDuration": {
+        "priority": "0",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "5",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "s",
+        "name": "停车平均时长"
+      },
+      "stopCount": {
+        "priority": "1",
+        "paramList": [
+          {
+            "kind": "-1",
+            "spare": [
+              {
+                "param": null
+              },
+              {
+                "param": null
+              }
+            ],
+            "optimal": "1",
+            "multiple": [
+              "0.33",
+              "3"
+            ]
+          }
+        ],
+        "weight": null,
+        "unit": "次",
+        "name": "停车次数"
+      }
+    }
+  },
+  "compliance": {
+    "deduct1": {
+      "overspeed10": {
+        "weight": null,
+        "unit": null,
+        "name": "超速,但未超过10%"
+      },
+      "overspeed10_20": {
+        "weight": null,
+        "unit": null,
+        "name": "超速10%-20%"
+      }
+    },
+    "deduct3": {
+      "pressSolidLine": {
+        "weight": null,
+        "unit": null,
+        "name": "压实线"
+      }
+    },
+    "deduct6": {
+      "runRedLight": {
+        "weight": null,
+        "unit": null,
+        "name": "闯红灯"
+      },
+      "overspeed20_50": {
+        "weight": null,
+        "unit": null,
+        "name": "超速20%-50%"
+      }
+    },
+    "deduct12": {
+      "overspeed50": {
+        "name": "超速50%以上",
+        "weight": null,
+        "unit": null
+      }
+    }
+  },
+  "dimensionWeight": {
+    "efficient": 0.2,
+    "compliance": 0.2,
+    "function": 0.2,
+    "safe": 0.2,
+    "comfort": 0.2
+  },
+  "typeWeight": {
+    "efficient": {
+      "efficientDrive": null,
+      "efficientStop": null
+    },
+    "compliance": {
+      "deduct3": null,
+      "deduct6": null,
+      "deduct12": null,
+      "deduct1": null
+    },
+    "function": {
+      "functionLKA": null,
+      "functionICA-0531": null
+    },
+    "safe": {
+      "safeDistance": null,
+      "safeTime": null,
+      "safeProbability": null,
+      "safeAcceleration": null
+    },
+    "comfort": {
+      "comfortLat": null,
+      "comfortLon": null
+    }
+  },
+  "dimensionName": {
+    "efficient": "高效性",
+    "compliance": "合规性",
+    "function": "功能性",
+    "safe": "安全性",
+    "comfort": "舒适性"
+  },
+  "typeName": {
+    "efficient": {
+      "efficientDrive": "行驶",
+      "efficientStop": "停车"
+    },
+    "compliance": {
+      "deduct3": "中等违规(扣3分)",
+      "deduct6": "危险违规(扣6分)",
+      "deduct12": "重大违规(扣12分)",
+      "deduct1": "轻微违规(扣1分)"
+    },
+    "function": {
+      "functionLKA": "LKA",
+      "functionICA-0531": "ICA-0531"
+    },
+    "safe": {
+      "safeDistance": "距离类型",
+      "safeTime": "时间类型",
+      "safeProbability": "概率类型",
+      "safeAcceleration": "加速度类型"
+    },
+    "comfort": {
+      "comfortLat": "横向舒适性",
+      "comfortLon": "纵向舒适性"
+    }
+  }
+}

BIN
custom/cicv_LKA/cicv_LKA_0.json.zip


BIN
custom/cicv_LKA/cicv_LKA_0.zip


+ 24 - 0
custom/cicv_LKA/cicv_LKA_01_distance_nearby_lane.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.975",
+      "multiple": [
+        "0",
+        "1"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "m",
+  "name": "离近侧车道线距离"
+}

+ 162 - 0
custom/cicv_LKA/cicv_LKA_01_distance_nearby_lane.py

@@ -0,0 +1,162 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+车道宽度:3.75m
+车宽:1.8m
+车的一边距离车道边界线为0.975m为最佳,值越小,分值越低
+
+"""
+
+
+
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "离近侧车道线最小距离",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "离近侧车道线最小距离(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标01: 离近侧车道线最小距离: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        self.roadMark_df = self.data.road_mark_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadMark_df = self.roadMark_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+        # 提取距离左车道线和右车道线距离
+        # roadMark_df['nearby_distance']
+        roadMark_left_df = roadMark_df[roadMark_df.id == 0].reset_index(drop=True)
+        roadMark_right_df = roadMark_df[roadMark_df.id == 2].reset_index(drop=True)
+        roadMark_left_df['right_lateral_distance'] = roadMark_right_df['lateralDist']
+        # 计算到车道边界线距离
+        roadMark_left_df['nearby_distance_to_lane_boundary'] = roadMark_left_df.apply(lambda x: self.Compute_nearby_distance_to_lane_boundary(x, width_ego), axis=1)
+        nearby_distance_to_lane_boundary = min(roadMark_left_df['nearby_distance_to_lane_boundary'])
+        self.result['value'] = [round(nearby_distance_to_lane_boundary, 3)]
+        self.time_list_follow = roadMark_left_df['simTime'].values.tolist()
+        self.frame_list_follow = roadMark_left_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadMark_left_df['nearby_distance_to_lane_boundary'].values.tolist()
+        # print("hello world")
+
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+
+        v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+
+        self.result['reportData']['range'] = f"[0, 0.975]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_02_lateral_offset.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-160000",
+        "160000"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "m",
+  "name": "最大横向偏移量"
+}

+ 156 - 0
custom/cicv_LKA/cicv_LKA_02_lateral_offset.py

@@ -0,0 +1,156 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "最大横向偏移量",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "最大横向偏移量(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标02: 最大横向偏移量: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        # # 计算到车道边界线距离
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)
+        max_laneOffset_abs_index = roadPos_ego_df['laneOffset_abs'].idxmax()
+        row_with_max_value = roadPos_ego_df.iloc[max_laneOffset_abs_index].laneOffset
+        self.result['value'] = [row_with_max_value]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        # self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_03_heading_deviation_max.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-52300",
+        "52300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "最大航向偏差"
+}

+ 160 - 0
custom/cicv_LKA/cicv_LKA_03_heading_deviation_max.py

@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大航向偏差角
+"""
+
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "最大航向角偏差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "最大航向角偏差(rad)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标03: 最大航向角偏差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        road_mark_df = self.roadMark_df
+        ego_df = player_df[player_df.playerId == 1].reset_index(drop=True)
+
+        # 左车道线曲率,右车道线曲率,求二者平均值,计算车道线曲率,再与自车朝向相减
+        road_mark_left_df = road_mark_df[road_mark_df.id == 0].reset_index(drop=True)
+        road_mark_right_df = road_mark_df[road_mark_df.id == 2].reset_index(drop=True)
+        road_mark_left_df['curvHor_left'] = road_mark_left_df['curvHor']
+        road_mark_left_df['curvHor_right'] = road_mark_right_df['curvHor']
+        road_mark_left_df['curvHor_middle'] = road_mark_left_df[['curvHor_left', 'curvHor_right']].apply( \
+            lambda x: (x['curvHor_left'] + x['curvHor_right'])/2, axis=1)
+        ego_df['curvHor_middle'] = road_mark_left_df['curvHor_middle']
+        ego_df['heading_deviation_abs'] = ego_df[['curvHor_middle', 'posH']].apply( \
+            lambda x: abs(x['posH'] - x['curvHor_middle']), axis=1)
+        row_with_max_value = max(ego_df['heading_deviation_abs'])
+        self.result['value'] = [row_with_max_value]
+        self.time_list_follow = ego_df['simTime'].values.tolist()
+        self.frame_list_follow = ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = ego_df['heading_deviation_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_04_relative_position_oscillation_frequency.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-52300",
+        "52300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "横向相对位置振荡频率"
+}

+ 217 - 0
custom/cicv_LKA/cicv_LKA_04_relative_position_oscillation_frequency.py

@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡频率",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡频率(Hz)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标04: 横向相对位置振荡频率: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def func_center_line_cycle(self, l):
+        # print("\n穿过y=0的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1] and value > 0:
+                    number_peak += 1
+                if value < l[number + 1] and value < 0:
+                    number_trough += 1
+                continue
+            if number == length - 1:
+                if value > l[number - 1] and value > 0:
+                    number_peak += 1
+                if value < l[number - 1] and value < 0:
+                    number_trough += 1
+                continue
+            if value >= l[number - 1] and value > l[number + 1] and value > 0:
+                number_peak += 1
+            if value < l[number - 1] and value <= l[number + 1] and value < 0:
+                number_trough += 1
+        cycle = min(number_peak, number_trough) - 1
+        if cycle == -1:
+            return 0
+        return cycle
+
+    def func_normal_cycle_optical(self, l):
+        # print("正常的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        new_list = []
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number + 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if number == length - 1:
+                if value > l[number - 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number - 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if value >= l[number - 1] and value > l[number + 1]:
+                number_peak += 1
+                new_list.append(value)
+            if value < l[number - 1] and value <= l[number + 1]:
+                number_trough += 1
+                new_list.append(value)
+        if abs(number_peak - number_trough) > 1:
+            pass
+        else:
+            cycle = max(number_peak, number_trough) - 1
+
+        difference_list = []
+        for i in range(len(new_list) - 1):
+            difference = abs(new_list[i] - new_list[i + 1])
+            difference_list.append(difference)
+        if len(difference_list) == 0:
+            maximum_range = -1
+        else:
+            maximum_range = max(difference_list)
+        return cycle
+
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        cycle_number = self.func_normal_cycle_optical(roadPos_ego_list)
+        self.result['value'] = [round(cycle_number, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_05_relative_position_oscillation_difference.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-52300",
+        "52300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "横向相对位置振荡极差"
+}

+ 186 - 0
custom/cicv_LKA/cicv_LKA_05_relative_position_oscillation_difference.py

@@ -0,0 +1,186 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "横向相对位置振荡极差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "横向相对位置振荡极差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标05: 横向相对位置振荡极差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def func_normal_cycle_optical(self, l):
+        # print("正常的周期数: ")
+        length = len(l)
+        number_peak = 0
+        number_trough = 0
+        # 生成新的、只含有波峰波谷的列表
+        new_list = []
+        for number, value in enumerate(l):
+            if number == 0:
+                if value > l[number + 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number + 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if number == length - 1:
+                if value > l[number - 1]:
+                    number_peak += 1
+                    new_list.append(value)
+                if value < l[number - 1]:
+                    number_trough += 1
+                    new_list.append(value)
+                continue
+            if value >= l[number - 1] and value > l[number + 1]:
+                number_peak += 1
+                new_list.append(value)
+            if value < l[number - 1] and value <= l[number + 1]:
+                number_trough += 1
+                new_list.append(value)
+        if abs(number_peak - number_trough) > 1:
+            pass
+        else:
+            cycle = max(number_peak, number_trough) - 1
+        difference_list = []
+        for i in range(len(new_list) - 1):
+            difference = abs(new_list[i] - new_list[i + 1])
+            difference_list.append(difference)
+        if len(difference_list) == 0:
+            maximum_range = -1
+            # print(f"极差: {maximum_range}")
+        else:
+            maximum_range = max(difference_list)
+            # print(f"极差: {maximum_range}")
+        return maximum_range
+
+    def data_analyze(self):
+        roadPos_df = self.roadPos_df
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_list = roadPos_ego_df['laneOffset'].values.tolist()
+        oscillation_difference = self.func_normal_cycle_optical(roadPos_ego_list)
+        self.result['value'] = [round(oscillation_difference, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_06_absolute_center_distance_expectation.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-52300",
+        "52300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "绝对横向偏移量分布期望"
+}

+ 160 - 0
custom/cicv_LKA/cicv_LKA_06_absolute_center_distance_expectation.py

@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "绝对横向偏移量分布期望",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "绝对横向偏移量分布期望(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标06: 绝对横向偏移量分布期望: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply( \
+            lambda x: self.func_laneOffset_abs(x), axis=1)
+        # # 计算到车道边界线距离
+        mean_laneOffset_index = roadPos_ego_df['laneOffset_abs'].mean()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_07_absolute_center_distance_standard_deviation.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "-52300",
+        "52300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "绝对横向偏移量分布标准差"
+}

+ 158 - 0
custom/cicv_LKA/cicv_LKA_07_absolute_center_distance_standard_deviation.py

@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+    设计思路:
+    最大横向偏移量
+    zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "绝对横向偏移量分布标准差",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "绝对横向偏移量分布标准差(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标07: 绝对横向偏移量分布标准差: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        player_df = self.df
+        ego_df = player_df[player_df.playerId == 1]
+        width_ego = ego_df['dimY'].values.tolist()[0]
+
+        # 提取距离左车道线和右车道线距离
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply( \
+            lambda x: self.func_laneOffset_abs(x), axis=1)
+        mean_laneOffset_index = roadPos_ego_df['laneOffset_abs'].std()
+        self.result['value'] = [round(mean_laneOffset_index, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_08_fixed_driving_direction_TLC.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "0",
+        "10002300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "固定行驶方向车辆跨道时间"
+}

+ 190 - 0
custom/cicv_LKA/cicv_LKA_08_fixed_driving_direction_TLC.py

@@ -0,0 +1,190 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+    设计思路:
+    最大横向偏移量
+    zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+        self.laneInfo_df = pd.DataFrame()
+        # self.data.lane_info_df
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "固定行驶方向车辆跨道时间",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "固定行驶方向车辆跨道时间(s)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标08: 固定行驶方向车辆跨道时间: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+        self.laneInfo_df = self.data.lane_info_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def fixed_driving_direction_TLC(self, x):
+        cosA = math.cos(x['heading_deviation_abs'])
+        sinA = math.sin(x['heading_deviation_abs'])
+        V = x['velocity_resultant']
+        # if cosA==0:
+        #     cosA=0.001
+        if sinA == 0:
+            sinA = 0.001
+        if V == 0:
+            V = 0.001
+        TLC = (x['laneWidth'] / 2 - x['laneOffset_abs'] - x['dimY'] / 2 * cosA) / (V * sinA)
+        return TLC
+
+    def data_analyze(self):
+        player_df = self.df
+        mask = (player_df.playerId == 0) | (player_df.playerId == 1)
+        ego_df = player_df[mask].reset_index(drop=True)
+        width_ego = ego_df['dimY']  # 自车宽度e
+        road_mark_df = self.roadMark_df
+        # 左车道线曲率,右车道线曲率,求二者平均值,计算车道线曲率,再与自车朝向相减
+        road_mark_left_df = road_mark_df[road_mark_df.id == 0].reset_index(drop=True)
+        road_mark_right_df = road_mark_df[road_mark_df.id == 2].reset_index(drop=True)
+        road_mark_left_df['curvHor_left'] = road_mark_left_df['curvHor']
+        road_mark_left_df['curvHor_right'] = road_mark_right_df['curvHor']
+        road_mark_left_df['curvHor_middle'] = road_mark_left_df[['curvHor_left', 'curvHor_right']].apply( \
+            lambda x: (x['curvHor_left'] + x['curvHor_right']) / 2, axis=1)
+        ego_df['curvHor_middle'] = road_mark_left_df['curvHor_middle']
+        ego_df['heading_deviation_abs'] = ego_df[['curvHor_middle', 'posH']].apply(\
+            lambda x: abs(x['posH'] - x['curvHor_middle']), axis=1)  # 偏航角θ
+
+        laneInfo_df = self.laneInfo_df
+        laneInfo_df = laneInfo_df[laneInfo_df.laneId == -1].reset_index(drop=True)   # laneInfo_df['width'] 车道宽度
+
+        ego_df['velocity_resultant'] = ego_df[['speedX', 'speedY']].apply( \
+            lambda x: math.sqrt(x['speedX'] ** 2 - x['speedY'] ** 2) / 3.6, axis=1)  # 汽车行驶速度v
+
+        roadPos_df = self.roadPos_df
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)  # 横向偏移量y0
+
+        merged_df = pd.merge(roadPos_ego_df, ego_df, on='simFrame', how='inner')
+        merged_df["laneWidth"] = 3.5
+        merged_df['TLC'] = merged_df.apply(lambda x: self.fixed_driving_direction_TLC(x), axis=1)
+        row_with_min_value = min(merged_df['TLC'])
+        # self.lateral_control10_fixed_driving_direction_TLC = row_with_min_value
+        merged_df['simTime'] = merged_df['simTime_x']
+        self.result['value'] = [round(row_with_min_value, 3)]
+        self.time_list_follow = merged_df['simTime'].values.tolist()
+        self.frame_list_follow = merged_df['simFrame'].values.tolist()
+        self.dist_deviation_list = merged_df['TLC'].values.tolist()
+
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_09_fixed_steering_wheel_angle_TLC.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "0",
+        "10002300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "固定方向盘转角车辆跨道时间"
+}

+ 211 - 0
custom/cicv_LKA/cicv_LKA_09_fixed_steering_wheel_angle_TLC.py

@@ -0,0 +1,211 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+    设计思路:
+    最大横向偏移量
+    zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "固定方向盘转角车辆跨道时间",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "固定方向盘转角车辆跨道时间(s)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标09: 固定方向盘转角车辆跨道时间: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def solve_equation(self, heading_deviation_abs, GF, BF, omiga):
+        a = 0.0  # 初始猜测
+        epsilon = 0.001  # 误差容限
+        max_iterations = 6283  # 最大迭代次数
+
+        list_demo = []
+
+        for i in range(max_iterations):
+            GB = BF * math.cos(heading_deviation_abs) * math.tan(a + heading_deviation_abs) - BF * math.sin(
+                heading_deviation_abs)
+            fx = math.cos(a) * 2 * GF * BF - GF ** 2 - BF ** 2 - GB ** 2
+            if abs(fx) < epsilon:
+                list_demo.append(a)
+            # 调整猜测范围
+            a += 0.001
+
+        if len(list_demo) != 0:
+            return list_demo[0] / omiga
+
+        return 10000  # 未找到解
+
+    def fixed_steering_wheel_angle_TLC(self, x):
+        heading_deviation_abs = x['heading_deviation_abs']
+        GF = x['GF']
+        BF = x['BF']
+        omiga = x['speedH']
+        return self.solve_equation(heading_deviation_abs, GF, BF, omiga)
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        player_df = self.df
+        mask = (player_df.playerId == 0) | (player_df.playerId == 1)
+        ego_df = player_df[mask].reset_index(drop=True)
+        # width_ego = ego_df['dimY']  # 自车宽度e
+
+        road_mark_df = self.roadMark_df
+        # 左车道线曲率,右车道线曲率,求二者平均值,计算车道线曲率,再与自车朝向相减
+        road_mark_left_df = road_mark_df[road_mark_df.id == 0].reset_index(drop=True)
+        road_mark_right_df = road_mark_df[road_mark_df.id == 2].reset_index(drop=True)
+        road_mark_left_df['curvHor_left'] = road_mark_left_df['curvHor']
+        road_mark_left_df['curvHor_right'] = road_mark_right_df['curvHor']
+        road_mark_left_df['curvHor_middle'] = road_mark_left_df[['curvHor_left', 'curvHor_right']].apply( \
+            lambda x: (x['curvHor_left'] + x['curvHor_right']) / 2, axis=1)
+        ego_df['curvHor_middle'] = road_mark_left_df['curvHor_middle']
+        ego_df['heading_deviation_abs'] = ego_df[['curvHor_middle', 'posH']].apply( \
+            lambda x: abs(x['posH'] - x['curvHor_middle']), axis=1)  # 偏航角θ
+
+        # laneInfo_df = self.laneInfo_df
+        # laneInfo_df = laneInfo_df[laneInfo_df.id == -1].reset_index(drop=True)  # laneInfo_df['width'] 车道宽度
+
+        ego_df['velocity_resultant'] = ego_df[['speedX', 'speedY']].apply( \
+            lambda x: math.sqrt(x['speedX'] ** 2 - x['speedY'] ** 2) / 3.6, axis=1)  # 汽车行驶速度v
+
+        roadPos_df = self.roadPos_df
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)  # 横向偏移量y0
+
+        merged_df = pd.merge(roadPos_ego_df, ego_df, on='simFrame', how='inner')
+        merged_df["laneWidth"] = 3.5
+        merged_df['GF'] = merged_df[['velocity_resultant', 'speedH']].apply(lambda x: x['velocity_resultant'] / x['speedH'], axis=1)
+        merged_df['GF'] = 10000
+        merged_df['AD'] = merged_df[['laneWidth', 'laneOffset_abs', 'dimY', 'heading_deviation_abs']].apply( \
+            lambda x: x['laneWidth'] - x['laneOffset_abs'] - x['dimY'] / 2 * math.cos(x['heading_deviation_abs']), axis=1)
+        merged_df['AB'] = merged_df[['AD', 'heading_deviation_abs']].apply( \
+            lambda x: x['AD'] / math.cos(x['heading_deviation_abs']), axis=1)
+        merged_df['BF'] = merged_df[['GF', 'AB']].apply(lambda x: x['GF'] - x['AB'], axis=1)
+
+        merged_df['TLC_steer_wheel'] = merged_df.apply(lambda x: self.fixed_steering_wheel_angle_TLC(x), axis=1)
+        row_with_min_value = min(merged_df['TLC_steer_wheel'])
+        merged_df['simTime'] = merged_df['simTime_x']
+        # self.lateral_control11_fixed_steering_wheel_angle_TLC = row_with_min_value
+        self.result['value'] = [round(row_with_min_value, 3)]
+        self.time_list_follow = merged_df['simTime'].values.tolist()
+        self.frame_list_follow = merged_df['simFrame'].values.tolist()
+        self.dist_deviation_list = merged_df['TLC_steer_wheel'].values.tolist()
+
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

+ 24 - 0
custom/cicv_LKA/cicv_LKA_10_maximum_lateral_deviation.json

@@ -0,0 +1,24 @@
+{
+  "priority": "0",
+  "paramList": [
+    {
+      "kind": "0",
+      "spare": [
+        {
+          "param": null
+        },
+        {
+          "param": null
+        }
+      ],
+      "optimal": "0.00001",
+      "multiple": [
+        "0",
+        "100002300"
+      ]
+    }
+  ],
+  "weight": null,
+  "unit": "rad",
+  "name": "车道中心线横向距离极大值"
+}

+ 156 - 0
custom/cicv_LKA/cicv_LKA_10_maximum_lateral_deviation.py

@@ -0,0 +1,156 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+##################################################################
+#
+# Copyright (c) 2023 CICV, Inc. All Rights Reserved
+#
+##################################################################
+"""
+@Authors:           zhangyu
+@Data:              2024/02/21
+@Last Modified:     2024/02/21
+@Summary:           The template of custom indicator.
+"""
+
+"""
+设计思路:
+最大横向偏移量
+zy_center_distance_expectation
+"""
+import math
+import pandas as pd
+import numpy as np
+from common import zip_time_pairs, continuous_group
+from log import logger
+
+"""import functions"""
+
+# custom metric codes
+class CustomMetric(object):
+    def __init__(self, all_data, case_name):
+        self.data = all_data
+        self.optimal_dict = self.data.config
+        self.case_name = case_name
+        self.markline_df = pd.DataFrame(columns=['start_time', 'end_time', 'start_frame', 'end_frame', 'type'])
+
+        self.df = pd.DataFrame()
+        self.ego_df = pd.DataFrame()
+        self.df_follow = pd.DataFrame()
+        self.roadMark_df = pd.DataFrame()
+        self.roadPos_df = pd.DataFrame()
+
+
+        self.time_list_follow = list()
+        self.frame_list_follow = list()
+        self.dist_list = list()
+        self.dist_deviation_list = list()
+        self.dist_deviation_list_full_time = list()
+
+        self.result = {
+            "name": "车道中心线横向距离极大值",
+            "value": [],
+            # "weight": [],
+            "tableData": {
+                "avg": "",  # 平均值,或指标值
+                "max": "",
+                "min": ""
+            },
+            "reportData": {
+                "name": "车道中心线横向距离极大值(m)",
+                # "legend": [], # 如果有多个data,则需要增加data对应的说明,如:["横向加速度", "纵向加速度"]
+                "data": [],
+                "markLine": [],
+                "range": [],
+            },
+            "statusFlag": {}
+        }
+        self.run()
+        print(f"指标10: 车道中心线横向距离极大值: {self.result['value']}")
+
+    def data_extract(self):
+        self.df = self.data.object_df
+        self.ego_df = self.data.object_df[self.data.object_df.playerId == 1]
+        self.df_follow = self.df[self.df['LKA_status'] == "Active"].copy()  # 数字3对应LKA的Active
+        # self.df_follow = self.df[self.df['ACC_status'] == "Active"].copy()  # 数字3对应ICA的Active
+        self.roadMark_df = self.data.road_mark_df
+        self.roadPos_df = self.data.road_pos_df
+
+        if self.df_follow.empty:
+            self.result['statusFlag']['function_LKA'] = False
+        else:
+            self.result['statusFlag']['function_LKA'] = True
+
+    def dist(self, x1, y1, x2, y2):
+        dis = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
+        return dis
+
+    def Compute_nearby_distance_to_lane_boundary(self, x, width_ego):
+        if x.lateralDist < abs(x.right_lateral_distance):
+            return x.lateralDist - width_ego/2
+        else:
+            return abs(x.right_lateral_distance) - width_ego/2
+
+    def func_laneOffset_abs(self, x):
+        return abs(x.laneOffset)
+
+    def data_analyze(self):
+        # 提取自车宽度
+        roadPos_df = self.roadPos_df
+        roadPos_ego_df = roadPos_df[roadPos_df.playerId == 1].reset_index(drop=True)
+        roadPos_ego_df['laneOffset_abs'] = roadPos_ego_df.apply(lambda x: self.func_laneOffset_abs(x), axis=1)
+        max_laneOffset_abs_index = roadPos_ego_df['laneOffset_abs'].idxmax()
+        row_with_max_value = roadPos_ego_df.iloc[max_laneOffset_abs_index].laneOffset
+        # self.lateral_control08_maximum_lateral_deviation = row_with_max_value
+
+        self.result['value'] = [round(row_with_max_value, 3)]
+        self.time_list_follow = roadPos_ego_df['simTime'].values.tolist()
+        self.frame_list_follow = roadPos_ego_df['simFrame'].values.tolist()
+        self.dist_deviation_list = roadPos_ego_df['laneOffset_abs'].values.tolist()
+
+    def markline_statistic(self):
+        unfunc_df = pd.DataFrame({'simTime': self.time_list_follow, 'simFrame': self.frame_list_follow,
+                                  'dist_deviation': self.dist_deviation_list})
+        unfunc_df = unfunc_df[unfunc_df['simFrame'] > 1]
+        # v_df = unfunc_df[unfunc_df['dist_deviation'] > 0]
+        v_df = unfunc_df
+        v_df = v_df[['simTime', 'simFrame', 'dist_deviation']]
+        v_follow_df = continuous_group(v_df)
+        v_follow_df['type'] = "ICA"
+        self.markline_df = pd.concat([self.markline_df, v_follow_df], ignore_index=True)
+
+    def report_data_statistic(self):
+        time_list = self.ego_df['simTime'].values.tolist()
+        graph_list = [x for x in self.dist_deviation_list if not np.isnan(x)]
+        self.result['tableData']['avg'] = f'{np.mean(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['max'] = f'{max(graph_list):.2f}' if graph_list else 0
+        self.result['tableData']['min'] = f'{min(graph_list):.2f}' if graph_list else 0
+
+        zip_vs_time = zip_time_pairs(time_list, self.dist_deviation_list)
+        self.result['reportData']['data'] = zip_vs_time
+
+        self.markline_statistic()
+        markline_slices = self.markline_df.to_dict('records')
+        self.result['reportData']['markLine'] = markline_slices
+        self.result['reportData']['range'] = f"[-1.875, 1.875]"
+
+    def run(self):
+        # logger.info(f"Custom metric run:[{self.result['name']}].")
+        logger.info(f"[case:{self.case_name}] Custom metric:[ica_distance_deviation:{self.result['name']}] evaluate.")
+
+        try:
+            self.data_extract()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data extract ERROR!", e)
+
+        try:
+            self.data_analyze()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} data analyze ERROR!", e)
+
+        try:
+            self.report_data_statistic()
+        except Exception as e:
+            logger.error(f"[case:{self.case_name}] Custom metric:{self.result['name']} report data statistic ERROR!", e)
+
+# if __name__ == "__main__":
+#     pass

Some files were not shown because too many files changed in this diff