nist_goals_calculator

class pyrecodes.resilience_calculator.nist_goals_calculator.NISTGoalsCalculator(resilience_goals: list)

Bases: ReCoDeSCalculator

Resilience calculator class that assesses the resilience of a system based on NIST resilience goals.
The NIST resilience goals are defined as achieving the desired functionality level of a system within a certain time after a disruption.
Functionality level is defined as the ratio of the total consumption (i.e., met demand) to the total demand of a resource provided by the system.
calculate_resilience()

” | Method finds the time step at which the goal is met and MAINTAINED - the last time step at which the goal was not met. | Since the demand and consumption of resources are updated at each time step, the goal may be met at one time step and not met at the next time step. | If the goal is met at all time steps, the method returns 0.

set_resilience_goals(resilience_goals: list)
update(system)
Method compares the demand and consumption of resources in the system and checks if the desired functionality level is met.
A boolean list contains the information at which time steps the desired functionality level is met.