LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
sn_has_multi_class_heter_exp_fcfs.m
1%{ @file sn_has_multi_class_heter_exp_fcfs.m
2 % @brief Checks for multi-class FCFS with heterogeneous exponential service
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Checks for multi-class FCFS with heterogeneous exponential service
9 %
10 % @details
11 % Returns true if any FCFS station serves multiple classes with different exponential service times.
12 %
13 % @par Syntax:
14 % @code
15 % bool = sn_has_multi_class_heter_exp_fcfs(sn)
16 % @endcode
17 %
18 % @par Parameters:
19 % <table>
20 % <tr><th>Name<th>Description
21 % <tr><td>sn<td>Network structure
22 % </table>
23 %
24 % @par Returns:
25 % <table>
26 % <tr><th>Name<th>Description
27 % <tr><td>bool<td>True if any multi-class FCFS station has heterogeneous exponential service
28 % </table>
29%}
30function bool = sn_has_multi_class_heter_exp_fcfs(sn)
31% Checks if the network has one or more stations with multiclass heterogeneous FCFS
32% and exponential service times
33%
34% Parameters:
35% sn - NetworkStruct object for the queueing network model
36%
37% Returns:
38% bool - true if network has multiclass heterogeneous FCFS with exponential service
39
40bool = false;
41iset = find(sn.sched == SchedStrategy.FCFS);
42
43if isempty(iset)
44 return;
45end
46
47for i = iset(:)'
48 % Check if rates vary across classes (heterogeneous)
49 if range(sn.rates(i,:)) > 0
50 % Check if all SCVs are ~1 (exponential)
51 scvs = sn.scv(i,:);
52 if max(scvs) < 1 + GlobalConstants.FineTol && ...
53 min(scvs) > 1 - GlobalConstants.FineTol
54 bool = true;
55 return;
56 end
57 end
58end
59end