LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
sn_is_bas_model.m
1%{ @file sn_is_bas_model.m
2 % @brief Checks if the network is a closed single-class Blocking-After-Service model
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Checks if the network is a closed single-class BAS model
9 %
10 % @details
11 % Returns true for a closed, single-class network with Blocking-After-Service
12 % (BAS) finite-buffer blocking, which solver_sqd handles but exact/AMVA MVA
13 % does not. The Smith queue-decomposition approximation models a single
14 % circulating population, so an open class or more than one class disqualifies
15 % the model.
16 %
17 % @par Syntax:
18 % @code
19 % bool = sn_is_bas_model(sn)
20 % @endcode
21 %
22 % @par Parameters:
23 % <table>
24 % <tr><th>Name<th>Description
25 % <tr><td>sn<td>Network structure
26 % </table>
27 %
28 % @par Returns:
29 % <table>
30 % <tr><th>Name<th>Description
31 % <tr><td>bool<td>True if the model is a closed single-class BAS model
32 % </table>
33%}
34function bool = sn_is_bas_model(sn)
35bool = false;
36if sn.nclasses ~= 1 || sn.nclosedjobs <= 0 || isempty(sn.droprule)
37 return;
38end
39if any(isinf(sn.njobs))
40 return; % open class present
41end
42bool = any(sn.droprule(:) == DropStrategy.BAS);
43end
Definition Station.m:245