calculates severity Sev (see Matzinger et al. 2018) of failures for time series of performance P(t). Entire time period is used, failure is defined by acceptable performance Pa and maximal failure Pmax.

resilience.severity(time_stamp, Pt, Pa, Pmax, integral_method = 2)

Arguments

time_stamp

vector containing timestamp (sorted in ascending order)

Pt

vector with performance P(t) (same length as timestamp)

Pa

accpetable performance

Pmax

maximal failure (worst case)

integral_method

either 1 or 2. Switches between two different versions of integral calculation. Both methods should return the same but method 2 should be much faster when applied to long vectors. Default is method 2.

Value

Returns severity integrated over entire time series (one number)