diff --git a/ra2ce/analysis/analysis_config_data/analysis_config_data.py b/ra2ce/analysis/analysis_config_data/analysis_config_data.py index 2f2a891f5..b28839819 100644 --- a/ra2ce/analysis/analysis_config_data/analysis_config_data.py +++ b/ra2ce/analysis/analysis_config_data/analysis_config_data.py @@ -35,7 +35,6 @@ ) from ra2ce.analysis.analysis_config_data.enums.damage_curve_enum import DamageCurveEnum from ra2ce.analysis.analysis_config_data.enums.event_type_enum import EventTypeEnum -from ra2ce.analysis.analysis_config_data.enums.loss_type_enum import LossTypeEnum from ra2ce.analysis.analysis_config_data.enums.risk_calculation_mode_enum import ( RiskCalculationModeEnum, ) @@ -90,17 +89,13 @@ class AnalysisSectionLosses(AnalysisSectionBase): ) # general weighing: WeighingEnum = field(default_factory=lambda: WeighingEnum.NONE) - loss_per_distance: str = "" - loss_type: LossTypeEnum = field(default_factory=lambda: LossTypeEnum.NONE) - disruption_per_category: str = "" + # losses - traffic_cols: list[str] = field(default_factory=list) production_loss_per_capita_per_hour: float = math.nan traffic_period: TrafficPeriodEnum = field( default_factory=lambda: TrafficPeriodEnum.DAY ) hours_per_traffic_period: int = 0 - performance: str = "diff_time" # "diff_time" or "diff_length" relates to the used criticality metric trip_purposes: list[TripPurposeEnum] = field( default_factory=lambda: [TripPurposeEnum.NONE] ) @@ -111,12 +106,9 @@ class AnalysisSectionLosses(AnalysisSectionBase): # accessibility analyses threshold: float = 0.0 threshold_destinations: float = math.nan - uniform_duration: float = math.nan - gdp_percapita: float = math.nan equity_weight: str = "" calculate_route_without_disruption: bool = False buffer_meters: float = math.nan - threshold_locations: float = math.nan category_field_name: str = "" save_traffic: bool = False diff --git a/ra2ce/analysis/analysis_config_data/analysis_config_data_reader.py b/ra2ce/analysis/analysis_config_data/analysis_config_data_reader.py index 55098a7cb..ee78269c5 100644 --- a/ra2ce/analysis/analysis_config_data/analysis_config_data_reader.py +++ b/ra2ce/analysis/analysis_config_data/analysis_config_data_reader.py @@ -44,7 +44,6 @@ ) from ra2ce.analysis.analysis_config_data.enums.damage_curve_enum import DamageCurveEnum from ra2ce.analysis.analysis_config_data.enums.event_type_enum import EventTypeEnum -from ra2ce.analysis.analysis_config_data.enums.loss_type_enum import LossTypeEnum from ra2ce.analysis.analysis_config_data.enums.risk_calculation_mode_enum import ( RiskCalculationModeEnum, ) @@ -128,9 +127,7 @@ def _get_analysis_section_losses(self, section_name: str) -> AnalysisSectionLoss _section.weighing = WeighingEnum.LENGTH else: _section.weighing = WeighingEnum.get_enum(_weighing) - _section.loss_type = LossTypeEnum.get_enum( - self._parser.get(section_name, "loss_type", fallback=None) - ) + # losses _section.event_type = EventTypeEnum.get_enum( self._parser.get(section_name, "event_type", fallback=None) @@ -143,9 +140,6 @@ def _get_analysis_section_losses(self, section_name: str) -> AnalysisSectionLoss "risk_calculation_year", fallback=_section.risk_calculation_year, ) - _section.traffic_cols = self._parser.getlist( - section_name, "traffic_cols", fallback=_section.traffic_cols - ) _section.traffic_period = TrafficPeriodEnum.get_enum( self._parser.get(section_name, "traffic_period", fallback=None) ) @@ -177,16 +171,6 @@ def _get_analysis_section_losses(self, section_name: str) -> AnalysisSectionLoss "threshold_destinations", fallback=_section.threshold_destinations, ) - _section.uniform_duration = self._parser.getfloat( - section_name, - "uniform_duration", - fallback=_section.uniform_duration, - ) - _section.gdp_percapita = self._parser.getfloat( - section_name, - "gdp_percapita", - fallback=_section.gdp_percapita, - ) _section.calculate_route_without_disruption = self._parser.getboolean( section_name, "calculate_route_without_disruption", @@ -197,11 +181,6 @@ def _get_analysis_section_losses(self, section_name: str) -> AnalysisSectionLoss "buffer_meters", fallback=_section.buffer_meters, ) - _section.threshold_locations = self._parser.getfloat( - section_name, - "threshold_locations", - fallback=_section.threshold_locations, - ) _section.save_traffic = self._parser.getboolean( section_name, "save_traffic", fallback=_section.save_traffic )