Reliability of Grid Networks and Recursive Decomposition Algorithms
Rice University, Department of Civil and Environmental Engineering.
Structural & Infrasturctural System Reliability & Risk Assessment (SISRRA) Research Group, 2016.
In this fiile we show how to use a Matlab implementation of the recursive decomposition algorithm for computing the s-t reliability in squared network grids. For running this example you'll need Matlab implementations files from SISRRA. Contact infromation can be found at the website of the group: https://duenas-osorio.rice.edu/.
(For best results use Internet Explorer)
NxN grids and reliability estimates between farthest diagonal pairs (Benchmark - Within 1,000 seconds - Analytical - Edge Failure Probability of 10%)
The table below shows upper and lower bound estimates of the two-terminal reliability for square grids with N-by-N nodes. The two pairs are selected at the ends of the square grids diagonals (see example of a 5x5 grid). The table also shows gap or distance between upper and lower bounds (e.g. gap = 0 means exact estimate), and running times (in seconds) are shown for reference (note truncation at 1,000 seconds).
format long
readtable('grid_table_1000.txt')
NxN grids and reliability estimates between farthest diagonal pairs (Benchmark - Within 7.8 Hours - Analytical - Edge Failure Probability of 10%)
Table below is identical to the previous except for timeout threshold that has been set to 7.8 Hours.
readtable('grid_table_28080.txt')
NxN grids and reliability estimates between farthest diagonal pairs (Benchmark - Within 8 Hours - Monte Carlo Simulation - Edge Failure Probability of 10%)
Using Monte Carlo Simulation we have simulated enough samples to guarantee that the reliability estimate has relative error below 1% with 99% confidence.
readtable('grid_table_mcs.txt')
NxN grids and Failure Probability estimates between farthest diagonal pairs (Benchmark - Within 1,000 seconds - Analytical - Edge Failure Probability of 1%)
Table below shows s-t network failure probability. Ttimeout threshold that has been set to 1,000 seconds.
readtable('grid_table_fp_1000.txt')
NxN grids and Failure Probability estimates between farthest diagonal pairs (Benchmark - Within 7.8 Hours - Analytical - Edge Failure Probability of 1%)
Table below is identical to the previous except for timeout threshold that has been set to 7.8 Hours.
readtable('grid_table_fp_28080.txt')
NxN grids and Failure Probability estimates between farthest diagonal pairs (Benchmark - Within 8 Hours - Monte Carlo Simulation - Edge Failure Probability of 1%)
Using Monte Carlo Simulation we have attempted to simulate enough samples to guarantee that the failure probability estimate has relative error below 1% with 99% confidence. As shown in the table below, the rare event condition has prevented Monte Carlo Simulation from giving an answer with approximation guarantees within the time threshold.
readtable('grid_table_fp_mcs.txt')
NxN grids and Failure Probability estimates between farthest diagonal pairs (Benchmark - Within 1,000 seconds - Monte Carlo Simulation - Edge Failure Probability of 1%)
Below we show mean and variance for s-t network failure probability estimates using Monte Carlo Simulation. Note that this estimates have no guarantees of quality of approximation.
readtable('grid_table_fp_mcs_1000.txt')
NxN grids and Failure Probability estimates between farthest diagonal pairs (Benchmark - Within 7.8 hours - Monte Carlo Simulation - Edge Failure Probability of 1%)
Below we show mean and variance for s-t network failure probability estimates using Monte Carlo Simulation. Note that this estimates have no guarantees of quality of approximation.
readtable('grid_table_fp_mcs_28080.txt')
TUTORIAL: grid graph of size 5x5
For the case of a 5x5 grid we can create its adjacency as follows
N = 5; % 25 nodes + 40 edges
A = kron(spdiags(ones(N,2),[1 -1],N,N),...
eye(N))+kron(eye(N),spdiags(ones(N,2),[1 -1],N,N)); % Adjacency
[X,Y] = meshgrid(linspace(0,1,N),linspace(0,1,N)); % Coordinates
Node Failure probabilities (100% Reliable - Uncomment for different cases)
format short
P = zeros( size(A) );
% P ( 1 : length(A)+1 : length(A)^2 ) = rand(length(A),1); %Node failure probability
% P ( 1 : length(A)+1 : length(A)^2 ) = .10; %Node failure probability
P % Failure probability matrix (diagonal entries for nodes)
Edge failure probabilities (90% Reliable - Uncomment for different cases)
id = find(A);
P(id) = .1; % Same failure probability
%P(id) = rand(size(id)); %Random failure probabilities
P % Failure probability matrix (off diagonal entries for edges)
Plotting (Needs Matlab R2016a)
% Convert edges to nodes for unreliable edges
[Aout,~,~,XYout] = SSP_edge_splitting(A,[X(:),Y(:)]);
id = (1:size(Aout,1));
N1 = size(A,1);
figure
gp = plot(graph(Aout),'XData',XYout(:,1),'YData',XYout(:,2),'NodeLabel',id,...
'MarkerSize',(id<=N1)*4+eps);
% gp = plot(graph(Aout),'Layout','force','NodeLabel',id,...
% 'MarkerSize',(id<=N1)*4+eps);
title('Labeling')
axis off
Source and terminal nodes
s = 1;
t = 25;
Decomposition algorithm (default is path-based Selective RDA)
Note that below we run a few iterations for clarity but we can run this algorithms indefinitely until convergence, truncate until treshold gap, or timeout based on a treshold time.
Selective = 1; %
Recursive = 0; % DFS (1) or BFS(0)
algo = 'minpath'; % 'minpath', 'mincut', 'flow'
plotit = [1 3]; %0: None, 1: Bounds, 2:Bounds Simple, 3: Decomposition Tree, 4: Animated Tree, 5: Animated Bounds
MRP = 1; % Minimum cost shortest path (1) Dijkstra (0)
Max_k = 1e5; %Truncation by iterations
Max_gap = 0.05; %Truncation of bounds (e.g. 0 for exact)
eq = 0; % Output equation
[ R, Max_k, R_bounds, Eventk, Likelihoodk, isConnQ, minpathk, SetUp,...
SetDown, Rf_links, Rf_cuts, parentk, Prob, P] = SSP( A , P , s , t, 2, algo, Selective , Recursive , plotit , Max_k , Max_gap , MRP, eq );
Visualize decomposition process (Table iteration-by-iteration)
T = decomp_table(R_bounds,Eventk,minpathk,isConnQ,parentk,Prob, SetUp, SetDown, P)
% Write excel table
try
delete('T.xls') % Because we rewrite potentially leaving previous results
writetable(T,'T.xls')
display('T.xls file created')
catch
display('Not possible to create T.xls')
end
Some remarks from table T:
- The first iteration (0) is the root event and there are no conditional events in the column Event.
- Child events (disjoint) permute edge failures form parent's MinimumSuccessfulEvent and are created lexicographically. Note that nodes do not fail in this example however.
- true values in the LinkSetsQ column are internal nodes (with childrens) and false LinkSetQ values are leaf nodes in the decomposition process (no childrens sent to iteration queue).