Class Qsys_mtmstm_dets
A customer arrives at time 0 to the FCFS Mt/M/st+M queue (exponential service of rate mu, exponential patience of rate theta, a staffing level that changes at known times) and finds all servers busy with nq customers waiting ahead. Its position in the queue is a transient CTMC. Between two staffing changes it moves down at rate s*mu + q*theta and is absorbed when the customer enters service; at a change it jumps by a matrix L(k), so P(W > tau) = beta0 * prod_k exp(Q(k-1)(t_k - t_(k-1))) L(k) * exp(Q(K)(tau - t_K)) * e (Theorem 1). Customers behind the tagged one never overtake it, so the result holds for any arrival process (Gt).
The policy says what happens to a busy server whose shift ends:
"pe"preemptive: its customer goes back to the head of the queue;"ec"exhaustive completion: it finishes its customer and serves nobody else;"eh"exhaustive handoff: it keeps its customer until a staying server frees up and takes the customer over, which needs a second state variable, the number r of servers still waiting to leave. A server joining under"eh"first takes over a leaving server's customer.
CONVENTIONS. The change at tk[k] is applied at tau = tk[k] itself, so
Fc is the right-continuous P(W > tau): a server added at tk[k] can
admit the tagged customer exactly then, so the law has an atom there. The
paper's Theorem 1 applies only the changes strictly before tau, which gives the
left limit P(W >= tau) at the change points and the same values elsewhere.
Arrays are 0-based here; they hold the same entries as the MATLAB column
vectors. The means are integrals of the CCDF computed exactly piece by piece,
a finite piece through the block exponential [Q e; 0 0]; meanPWT is Inf when
the final staffing is 0 and theta = 0.
Twin of MATLAB qsys_mtmstm_dets and of the Python
api.qsys.qsys_mtmstm_dets; the errors carry the same ids
(LINE:input:Option for the wait option, LINE:input:Argument
otherwise).
Reference: K. Konrad, Y. Liu, "Real-time estimations for the waiting-time distribution in time-varying queues", Proc. Winter Simulation Conference 2023, 315-326.
- Since:
- LINE 3.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWaiting-time CCDF and its moments. -
Method Summary
Modifier and TypeMethodDescriptionstatic Qsys_mtmstm_dets.Resultqsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[][] dsk, int nq, double[] tau, String policy) Potential waiting time with [added, removed] staffing changes.static Qsys_mtmstm_dets.Resultqsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[][] dsk, int nq, double[] tau, String policy, String wait) DETS with servers joining and leaving at the same time.static Qsys_mtmstm_dets.Resultqsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[] dsk, int nq, double[] tau, String policy) Potential waiting time with signed net staffing changes.static Qsys_mtmstm_dets.Resultqsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[] dsk, int nq, double[] tau, String policy, String wait) DETS with signed net staffing changes.
-
Method Details
-
qsys_mtmstm_dets
public static Qsys_mtmstm_dets.Result qsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[] dsk, int nq, double[] tau, String policy) Potential waiting time with signed net staffing changes. -
qsys_mtmstm_dets
public static Qsys_mtmstm_dets.Result qsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[] dsk, int nq, double[] tau, String policy, String wait) DETS with signed net staffing changes.- Parameters:
mu- service rate (> 0)theta- abandonment rate of a waiting customer (>= 0)s0- servers at time 0 (>= 0), all busytk- staffing change times, strictly increasing and > 0, measured from the tagged customer's arrival (null or empty for constant staffing, the myopic predictor of the paper)dsk- net change at each tk (null or empty when tk is)nq- customers waiting ahead of the tagged customer (>= 0)tau- waiting-time targets (>= 0), non-emptypolicy- "pe", "ec" or "eh"wait- "pwt" (potential waiting time) or "awt" (actual waiting time min(W, patience), Remark 1)- Returns:
- Fc, cdf, meanPWT, meanAWT, poa and s
-
qsys_mtmstm_dets
public static Qsys_mtmstm_dets.Result qsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[][] dsk, int nq, double[] tau, String policy) Potential waiting time with [added, removed] staffing changes. -
qsys_mtmstm_dets
public static Qsys_mtmstm_dets.Result qsys_mtmstm_dets(double mu, double theta, int s0, double[] tk, int[][] dsk, int nq, double[] tau, String policy, String wait) DETS with servers joining and leaving at the same time. The two forms of the staffing changes differ only under "ec" (Remark 2): a joining server takes a customer from the queue, and a leaving one only lowers the service rate.- Parameters:
dsk- K-by-2 matrix, row k = [added, removed] at tk[k] (null or empty when tk is)- See Also:
-