4 % @brief Expand per-station metrics from reduced model to original dimensions.
10 % @brief Expand per-station metrics from reduced model to original dimensions.
11 % @fn pfqn_expand(QN, UN, CN, mapping, M_original)
12 % @param QN Queue lengths from reduced model (M
' x R).
13 % @param UN Utilizations from reduced model (M' x R).
14 % @param CN Cycle times from reduced model (M
' x R).
15 % @param mapping Mapping vector from pfqn_unique (1 x M), mapping(i) = unique station index.
16 % @param M_original Original number of stations M.
17 % @return QN_full Queue lengths in original dimensions (M x R).
18 % @return UN_full Utilizations in original dimensions (M x R).
19 % @return CN_full Cycle times in original dimensions (M x R).
22function [QN_full, UN_full, CN_full] = pfqn_expand(QN, UN, CN, mapping, M_original)
23% PFQN_EXPAND Expand per-station metrics from reduced model to original dimensions
25% [QN_FULL, UN_FULL, CN_FULL] = PFQN_EXPAND(QN, UN, CN, MAPPING, M_ORIGINAL)
27% Expands performance metrics computed on a reduced model (with unique stations)
28% back to the original model dimensions by replicating values according to mapping.
31% QN - M' x R queue lengths from reduced model
32% UN - M
' x R utilizations from reduced model
33% CN - M' x R cycle times from reduced model
34% mapping - 1 x M vector from pfqn_unique (mapping(i) = unique station index)
35% M_original - original number of stations M
38% QN_full - M x R queue lengths in original dimensions
39% UN_full - M x R utilizations in original dimensions
40% CN_full - M x R cycle times in original dimensions
43QN_full = zeros(M_original, R);
44UN_full = zeros(M_original, R);
45CN_full = zeros(M_original, R);
48 unique_idx = mapping(i);
49 QN_full(i, :) = QN(unique_idx, :);
50 UN_full(i, :) = UN(unique_idx, :);
51 CN_full(i, :) = CN(unique_idx, :);