From c6459d3e628373c77b6bda70031fc2f52afc0be3 Mon Sep 17 00:00:00 2001 From: Maruf Rahman Date: Mon, 9 Dec 2024 15:14:42 +1100 Subject: [PATCH] simulation --- sira/infrastructure_response.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sira/infrastructure_response.py b/sira/infrastructure_response.py index 86198f0..cc21593 100644 --- a/sira/infrastructure_response.py +++ b/sira/infrastructure_response.py @@ -720,18 +720,7 @@ def write_system_response(response_list, infrastructure, scenario, hazards): # ------------------------------------------------------------------------------------- -@njit -def _calculate_class_failures(response_array, comp_indices, threshold=2): - """Vectorised calculation of class failures""" - mask = response_array[:, :, comp_indices] >= threshold - return np.sum(mask, axis=2) / len(comp_indices) - -@njit -def _calculate_exceedance_probs(frag_array, num_samples): - """Calculate exceedance probabilities for damage states""" - return np.sum(frag_array >= 0, axis=0) / float(num_samples) - -@njit +# @njit def _pe2pb(pe): """Numba-optimized version of pe2pb""" pex = np.sort(pe)[::-1]