diff --git a/ra2ce/analysis/losses/losses_base.py b/ra2ce/analysis/losses/losses_base.py index 0f3e61730..457196b1a 100644 --- a/ra2ce/analysis/losses/losses_base.py +++ b/ra2ce/analysis/losses/losses_base.py @@ -433,7 +433,7 @@ def _calculate_production_loss_per_capita( vlh_trip_type_event = sum( ( intensity_trip_type - * duration + * duration**2 * loss_ratio * occupancy_trip_type * self.production_loss_per_capita_per_hour @@ -443,6 +443,7 @@ def _calculate_production_loss_per_capita( duration_steps, functionality_loss_ratios ) ) + vehicle_loss_hours.loc[ [vlh_row.name], f"vlh_{trip_type}_{hazard_col_name}" ] = vlh_trip_type_event diff --git a/tests/test_data/losses/csv_data_for_losses/results_test_calc_vlh.csv b/tests/test_data/losses/csv_data_for_losses/results_test_calc_vlh.csv index b6413891b..e1e0e4408 100644 --- a/tests/test_data/losses/csv_data_for_losses/results_test_calc_vlh.csv +++ b/tests/test_data/losses/csv_data_for_losses/results_test_calc_vlh.csv @@ -4,4 +4,4 @@ link_id,link_type,vlh_business_EV1_ma,vlh_commute_EV1_ma,vlh_EV1_ma_total 3,motorway,196291.6,448666.6,0.0 4,motorway,458916.6,1835666.6,0.0 5,motorway,729750.0,729750.0,0.0 -6,motorway,3.333333e+01,3.333333e+01,0.0 +6,motorway,126.66666666666666,126.66666666666666,0.0