1function self = initFromSolver(self, initSolver)
2% SELF = INITFROMSOLVER(INITSOLVER)
4% Warm-start the simulation from the steady-state solution of an auxiliary
7% If the auxiliary solver
is a SolverCTMC, the exact stationary distribution
8% over the aggregate state space
is computed and the initial state
is set to
9% the mode of that distribution (the most probable aggregate state). For any
10% other network solver, the steady-state mean queue lengths are used instead
11% and rounded to an integer placement that conserves each closed-
class
12% population (see NetworkSolver.warmStartPlacement).
14% Since the simulation starts (approximately) in steady state, the transient
15% removal filter
is disabled (tranfilter =
'fixed' with warmupfrac = 0), so
16% every simulated sample contributes to the estimators.
20% solver = SolverLDES(model, SolverMVA(model),
'samples', 50000);
21% solver.getAvg(); % simulation starts from the MVA steady-state placement
24sn = self.model.getStruct(
true);
28placement = NetworkSolver.warmStartPlacement(initSolver, sn);
30% LDES consumes the placement through options.init_sol (station-major vector)
31% rather than the model initial state.
32self.options.init_sol = reshape(placement
', 1, M * K);
33self.options.config.tranfilter = 'fixed
';
34self.options.config.warmupfrac = 0;