LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_mark.m
1function MMAP = map_mark(MAP, prob)
2% MAP_MARK. Marks arrivals from a MAP according to give probabilities.
3% MMAP = MAP_MARK(MAP, PROB) takes a MAP with a single arrival type and
4% returns a MMAP with same unmarked inter-arrival process but marked
5% arrivals specified by PROB. PROB(k) is the probability that the arrival
6% will be marked with type k.
7
8if (sum(prob) < 1 - 1e-6) || (sum(prob) > 1 + 1e-6)
9 warning('Input marking probabilities do not sum to 1. Normalizing.');
10 prob = prob / sum(prob);
11end
12
13MMAP = MAP;
14for k=1:length(prob)
15 MMAP{2+k} = prob(k) * MAP{2};
16end
17MMAP = mmap_normalize(MMAP);
18end