1function [QNclass_t, UNclass_t, TNclass_t] = getTranAvg(self,Qt,Ut,Tt)
2% [QNCLASS_T, UNCLASS_T, TNCLASS_T] = GETTRANAVG(SELF,QT,UT,TT)
3% Returns transient mean performance metrics over time
5% @brief Computes transient queue length, utilization, and throughput time series
7% This method returns transient performance metrics (time-dependent averages)
8%
for each station and job
class. The transient analysis tracks how metrics
9% evolve from the initial state toward steady state over the specified time span.
11% The Fluid solver uses ODE-based mean-field approximations to compute transient
12% behavior efficiently. The method returns different data structures depending on
13% whether optional handles are provided.
15% @param self SolverFluid instance (must have timespan configured, e.g.,
16% SolverFluid(model,
'timespan', [0, 50]))
17% @param Qt (optional) Queue length handle from previous computation. If provided,
18% returns cached results. Otherwise computes
new QN(t).
19% @param Ut (optional) Utilization handle. If provided, uses cached results.
20% Otherwise computes
new UN(t).
21% @param Tt (optional) Throughput handle. If provided, uses cached results.
22% Otherwise computes
new TN(t).
24% @
return QNclass_t Nested cell array of queue length time series
25% - Structure: {station_1, station_2, ...} where each station contains
26% {class_1_timeseries, class_2_timeseries, ...}
27% - Each element
is a vector of queue lengths at each time point
28% - Shape: [num_stations][num_classes] with each element a time-series array
30% @
return UNclass_t Nested cell array of utilization time series
31% - Same structure as QNclass_t but containing utilization values
33% @
return TNclass_t Nested cell array of throughput time series
34% - Same structure as QNclass_t but containing throughput values
36% @note Transient analysis
is only available
for certain solvers (CTMC, Fluid, JMT).
37% Must configure timespan when creating solver instance:
38% solver = SolverFluid(model,
'timespan', [0, 100]);
40% @warning The Fluid approximation
is mean-field based and provides estimates
41% rather than exact transient probabilities. Use CTMC
for small models
42% requiring exact transient analysis.
44% @see getTranHandles - Get result handles
for transient metrics
45% @see getAvg - Get steady-state average metrics
49% model = Network(
'example');
50% % ... model construction ...
51% solver = SolverFluid(model,
'timespan', [0, 50]);
52% [QN_t, UN_t, TN_t] = solver.getTranAvg();
54% % Access queue length time series
for station 0,
class 1
55% qlen_time_series = QN_t{1}{2};
56% plot(qlen_time_series);
59% Copyright (c) 2012-2026, Imperial College London
62% temporarily switch to closing method
64 [Qt,Ut,Tt] = self.getTranHandles;
67options = self.options;
69 case {
'default',
'matrix',
'closing'}
70 % These methods can
switch to closing silently
for transient analysis
71 self.options.method =
'closing';
73 line_warning(mfilename,
'getTranAvg is not offered by the specified method. Setting the solution method to ''''closing
''''.\n');
74 self.options.method =
'closing';
78[QNclass_t, UNclass_t, TNclass_t] = getTranAvg@NetworkSolver(self,Qt,Ut,Tt);
79self.options = options;