1%{ @file sn_has_sd_routing.m
2 % @brief Checks
if the network has state-dependent routing strategies
4 % @author LINE Development Team
8 % @brief Checks
if the network has state-dependent routing strategies
11 % Returns
true if the network contains routing strategies that are state-dependent
12 % and therefore violate the product-form assumption. State-dependent routing
13 % strategies include Round-Robin, Weighted Round-Robin, Join Shortest Queue,
14 % Power of K Choices, and Reinforcement Learning.
18 %
bool = sn_has_sd_routing(sn)
23 % <tr><th>Name<th>Description
24 % <tr><td>sn<td>Network structure
29 % <tr><th>Name<th>Description
30 % <tr><td>bool<td>True
if the network has state-dependent routing
33function
bool = sn_has_sd_routing(sn)
35% Product-form requires state-independent (Markovian) routing.
36% PROB and RAND are product-form compatible.
37% RROBIN, WRROBIN, JSQ, KCHOICES, RL are state-dependent and violate product-form.
44% Check
for any state-dependent routing strategy
45bool = any(sn.routing(:) == RoutingStrategy.RROBIN | ...
46 sn.routing(:) == RoutingStrategy.WRROBIN | ...
47 sn.routing(:) == RoutingStrategy.JSQ | ...
48 sn.routing(:) == RoutingStrategy.KCHOICES | ...
49 sn.routing(:) == RoutingStrategy.RL);