LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getProbNormConstAggr.m
1function [lNormConst] = getProbNormConstAggr(self)
2% [LNORMCONST] = GETPROBNORMCONST() Returns normalizing constant for state probabilities
3%
4% @brief Computes the logarithm of the normalizing constant for closed queueing networks
5%
6% This method returns the logarithm of the normalizing constant G, which is essential
7% for computing state probabilities in closed queueing networks. The normalizing
8% constant ensures that probability distributions sum to 1 across all possible states.
9%
10% For closed networks, state probabilities are computed as:
11% Pr[state] = (product of terms) / G
12% where G is the normalizing constant. Computing log(G) avoids numerical underflow
13% for large systems with many jobs.
14%
15% The MVA solver computes this using the exact MVA algorithm on the network lattice,
16% which is numerically stable and efficient for closed networks.
17%
18% @param self SolverMVA instance
19%
20% @return lNormConst Logarithm of the normalizing constant (base e)
21% - Single real number (can be very large for large systems)
22% - Positive value representing log(G) where G > 1
23% - Used internally for probability computation
24% - Exponentiating gives actual normalizing constant: G = exp(lNormConst)
25%
26% @note Only defined for closed queueing networks with fixed populations.
27% For open or mixed networks, returns empty or NaN.
28% Used internally by getProb_aggr() for probability calculations.
29%
30% @warning Computing the normalizing constant for very large systems may be slow.
31% This is a fundamental computation in closed network analysis and cannot
32% be significantly accelerated without changing the algorithm.
33%
34% @see getProbAggr - Uses normalization constant to return state probabilities
35% @see getProbSysAggr - Returns system-level probabilities
36% @see getAvg - Get average metrics (alternative to probability computation)
37%
38% Example:
39% @code
40% model = Network('ClosedQN');
41% % ... setup closed network ...
42% solver = SolverMVA(model, 'method', 'exact');
43%
44% % Compute normalizing constant
45% log_G = solver.getProbNormConstAggr();
46% G = exp(log_G);
47%
48% fprintf('Normalizing constant G = %.4f\\n', G);
49% fprintf('Log normalizing constant = %.4f\\n', log_G);
50% @endcode
51
52if ~isempty(self.result)
53 lNormConst = self.result.Prob.logNormConstAggr;
54else
55 optnc = self.options;
56 optnc.method = 'exact';
57 [~,~,~,~,~,~,lNormConst] = solver_mva_analyzer(self.getStruct, optnc);
58 self.result.Prob.logNormConstAggr = lNormConst;
59end
60end