LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getProbSys.m
1function ProbSys = getProbSys(self)
2% PROBSYS = GETPROBSYS() Returns joint system state probability via DES simulation
3%
4% @brief Estimates joint steady-state probability of the entire system state via DES simulation
5%
6% This method estimates the probability of observing the current system state
7% (combined state across all stateful nodes) using simulation-based estimation.
8% States include phase information from service distributions.
9%
10% @param self SolverDES instance
11%
12% @return ProbSys Estimated joint 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 getProbSysAggr - Returns joint aggregated system state probabilities
22% @see getProb - Returns marginal 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 system state
29% prob_sys = solver.getProbSys();
30% fprintf('Estimated joint system probability = %.6f\n', prob_sys);
31% @endcode
32
33if GlobalConstants.DummyMode
34 ProbSys = 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 getProbSys method and extract probability value
50jresult = jsolver.getProbSys();
51
52% Extract the probability value from the ProbabilityResult object
53ProbSys = jresult.probability;
54
55end
Definition mmt.m:92