# Monetary risk

Once probability of failure and consequences of failure have been calculated for each asset, monetary risk is calculated as:

$$Risk = PoF \cdot CoF$$

Risk matrices for each asset class, along with cost-benefit analyses of interventions (reinvestment and maintenance) are submitted to the regulator, allowing utility and regulator to reach concensus on the right balance of cost and reliability.

## Individual asset risk

Given an asset with a probability of failure = 0.08% per year and consequences of failure equal to £18,232, we can visualize and analyize which risk class this asset has with the following functions:

# Generate an empty 5x4 matrix
matrix_structure <- risk_matrix_structure(5,4,NA)

# Monetary risk for one asset
risk_coordinates <- risk_calculation(matrix_dimensions = matrix_structure,
id = "Transformer1",
pof = 0.08,
cof = 18232,
asset_type = "6.6/11kV Transformer (GM)")

risk_matrix_points_plot(matrix_structure,
dots_vector = risk_coordinates,
dot_radius = 4)

## Asset class risk

Given a population of assets within the same asset class, we can visualize how monetary risk is distributed with the following example:

# Generate an empty 5x4 matrix
risk_data_matrix <- risk_matrix_structure(5,4,NA)
risk_data_matrix$value <- sample(1:30,size=nrow(matrix_structure),replace = T) risk_matrix_summary_plot(risk_data_matrix) ## Non-linear bins Sometimes it is desirable to create the matrix with non-linear intervals, since each interval represents a bin of CoF and PoF, bins which typically increase in size as the CoF and health scores increase. The inputs x_intervals and y_intervals should match the x and y dimensions of the risk matrix data frame, but can contain any values, since these are internally normalised to 1. # Generate an empty 5x4 matrix risk_data_matrix <- risk_matrix_structure(5,4,NA) risk_data_matrix$value <- sample(1:30,size=nrow(matrix_structure),replace = T)

risk_matrix_summary_plot(risk_data_matrix,
x_intervals = c(0.1,0.1,0.1,0.2,0.3),
y_intervals = c(0.75,0.75,1,1.5))

## Matrices with different dimensions

Although the CNAIM standard specifies a rigid 5x4 matrix, it might be desirable to implement different size risk matrices. The CNAIM R package offers this flexibility. For example, to make a 4x4 matrix:

# Generate an empty 4x4 matrix
risk_data_matrix <- risk_matrix_structure(5,4,NA)
risk_data_matrix\$value <- sample(1:30,size=nrow(matrix_structure),replace = T)

risk_matrix_summary_plot(risk_data_matrix)