LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getProbSysAggr.m
1function ProbSysAggr = getProbSysAggr(self)
2% PROBSYSAGGR = GETPROBSYSAGGR() Returns joint aggregated system state probability via DES simulation
3%
4% @brief Estimates joint steady-state probability of the entire aggregated system state via DES simulation
5%
6% This method estimates the probability of observing the current system state
7% (combined per-class job counts across all stateful nodes) using simulation.
8% States are aggregated over service phases - only job counts per class matter.
9%
10% @param self SolverDES instance
11%
12% @return ProbSysAggr Estimated joint aggregated system state probability value
13% - 0 if state not seen during simulation (rare event)
14%
15% @note DES estimates probabilities from finite simulation. Accuracy improves with
16% more samples. For complex systems with large state spaces, the target state
17% may be rarely visited.
18%
19% @warning Simulation-based estimate - results vary between runs unless seed is set.
20%
21% @see getProbSys - Returns joint phase-detailed system state probabilities
22% @see getProbAggr - Returns aggregated state probabilities for a single node
23%
24% Example:
25% @code
26% solver = SolverDES(model, 'samples', 100000, 'seed', 42);
27%
28% % Estimate probability of current joint aggregated system state
29% prob_sys_aggr = solver.getProbSysAggr();
30% fprintf('Estimated joint aggregated probability = %.6f\n', prob_sys_aggr);
31% @endcode
32
33if GlobalConstants.DummyMode
34 ProbSysAggr = NaN;
35 return
36end
37
38% Convert model to Java
39jmodel = LINE2JLINE(self.model);
40
41% Create Java DES options
42joptions = jline.solvers.des.DESOptions();
43joptions.samples = self.options.samples;
44joptions.seed = self.options.seed;
45
46% Create Java solver
47jsolver = jline.solvers.des.SolverDES(jmodel, joptions);
48
49% Call Java getProbSysAggr method and extract probability value
50jresult = jsolver.getProbSysAggr();
51
52% Extract the probability value from the ProbabilityResult object
53ProbSysAggr = jresult.probability;
54
55end
Definition mmt.m:92