1function varargout = npfqn_traffic_split_cs(
MMAP,
P, config)
2% Given a
MMAP, produces a
new array after split and
class switching
3%
P(r,(j-1)*R+s): prob that a class-r departure flows to destination j in
4% class s out of R possible
classes
5%empty = cellfun(@isempty,
MMAP);
16 SMMAP{jst} = cell(1,2+R);
18 SMMAP{jst}{2} = 0*
MMAP{2};
20 SMMAP{jst}{2+s} = SMMAP{jst}{1} * 0;
22 SMMAP{jst}{2+s} = SMMAP{jst}{2+s} +
MMAP{2+r}*
P(r,(jst-1)*R+s);
23 SMMAP{jst}{2} = SMMAP{jst}{2} +
MMAP{2+r}*
P(r,(jst-1)*R+s);
24 SMMAP{jst}{1} = SMMAP{jst}{1} -
MMAP{2+r}*
P(r,(jst-1)*R+s);
27 SMMAP{jst} = mmap_normalize(SMMAP{jst});