Package jline.api.mam
Class Map_m1ps
java.lang.Object
jline.api.mam.Map_m1ps
Sojourn time distribution of the MAP/M/1 processor-sharing queue.
Port of matlab/src/api/mam/map_compute_R.m,
map_m1ps_h_recursive.m and map_m1ps_sojourn.m, twin of the
native Python api.mam.mapm1ps. The processor-sharing discipline
shares the server equally, so with n customers present each is served at rate
mu/n; the sojourn law is therefore not the FCFS waiting law and is not
available in closed form.
Implements Theorem 1 of Masuyama, H. and Takine, T., "Sojourn time distribution in a MAP/M/1 processor-sharing queue", Operations Research Letters 31(6), 2003, 406-412:
Wbar(x) = (1/lambda) sum_n pi_0 R^n D sum_k p_k(x) h_{n,k}
with p_k(x) the Poisson(( theta + mu) x) mass, R the minimal nonnegative
solution of D + R(C - mu I) + mu R^2 = 0, and h_{n,k} the uniformized
coefficients of map_m1ps_h_recursive(jline.util.matrix.Matrix, jline.util.matrix.Matrix, double, int, int).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic Matrixmap_compute_R(Matrix C, Matrix D, double mu) Minimal nonnegative solution R of D + R(C - mu I) + mu R^2 = 0, by the fixed point R <- -D (C - mu I + mu R)^-1 started at R = 0.static double[][][]map_m1ps_h_recursive(Matrix C, Matrix D, double mu, int N, int K) The h_{n,k} vectors of Theorem 1, returned as h[n][k], each M x 1:static Map_m1ps.SojournResultmap_m1ps_sojourn(Matrix C, Matrix D, double mu, double[] x) map_m1ps_sojourn at the reference defaults epsilon = 1e-11, epsilon' = 1e-10.static Map_m1ps.SojournResultmap_m1ps_sojourn(Matrix C, Matrix D, double mu, double[] x, double epsilon, double epsilonPrime)
-
Method Details
-
map_compute_R
Minimal nonnegative solution R of D + R(C - mu I) + mu R^2 = 0, by the fixed point R <- -D (C - mu I + mu R)^-1 started at R = 0. -
map_m1ps_h_recursive
The h_{n,k} vectors of Theorem 1, returned as h[n][k], each M x 1:h_{n,0} = e h_{n,k+1} = [ n mu/(n+1) h_{n-1,k} + (theta I + C) h_{n,k} + D h_{n+1,k} ] / (theta + mu)with h_{-1,k} = 0 and the level dimension truncated at N, i.e. h_{N+1,k} = 0. -
map_m1ps_sojourn
map_m1ps_sojourn at the reference defaults epsilon = 1e-11, epsilon' = 1e-10. -
map_m1ps_sojourn
public static Map_m1ps.SojournResult map_m1ps_sojourn(Matrix C, Matrix D, double mu, double[] x, double epsilon, double epsilonPrime) - Parameters:
C- M x M MAP transitions without an arrivalD- M x M MAP transitions with an arrivalmu- service rate, mu > 0x- time points at which Pr[W > x] is evaluatedepsilon- queue-length truncation toleranceepsilonPrime- uniformization truncation tolerance
-