Multiclass M/M/1 queue which can simultaneously have one customer per class
$begingroup$
Suppose there is a queue with exponential service time $frac{1}{mu}$ which accepts customers from K classes with Poisson distribution and rate $lambda_k$ but if a customer from any class arrives at the queue while there is already another customer from the same class either waiting or receiving service, leaves.
I have performed a simulation to find the total service time $T = W_q + frac{1}{mu}$ but failed.
These are what I have found out from simulations so far:
service time $T_k$ is diffrent in every class.
$lambda_k$ changes while leaving the queue server and becomes $lambda_k'=frac{lambda_k}{1+lambda_k*T_k}$ beacause when one customer arrives and stays in the queue for $T_k$, $lambda_k*T_k$ customers arrive and leave immediatly without service. So one out of every $1+lambda_k*T_k$ gets service from the queue, hence $lambda_k'=lambda_k*frac{1}{1+lambda_k*T_k}$.
$sum_k (lambda_k'T_k)=(sum_k lambda_k')T$ in which T is the total mean service time of all customers regardless of class.
Update:
So I found out that if we consider this queue as K M/M/1/1 queues with $T_k$ service times, this could lead to finding the average number of customers in the system.
The followings are verified by simulation.
Every class has a separate M/M/1/1 queue with service time equal to $T_k$ that we are looking for. $P_0$ is the probability of each of these queues being empty which is by M/M/1/1 standards:
$P_0^k = frac{1}{1+lambda_kT_k}$
The average number of customers of K in the system is equal to $1-P_0^k$, because every one of them could only have one customer:
$P_1^k=n_k=frac{lambda_kT_k}{1+lambda_kT_k}$
The total number of customers in the system is the sum of $n_k$:
$N=sum_kn_k$
By this point these are all verified by simulations. After this I tried to find $T_k$s and failed. I thought $T_k$ should be like this:
$T_k=(N-n_k+1)*frac{1}{mu}$
or
$T_k=(1-P_1^k)(N-n_k+1)*frac{1}{mu}$
These have very close results to $T_k$s but don't work. I thought that every customer, by entering the queue will have to wait for each one of the customers from other classes be served for $frac{1}{mu}$ and then be served itself. None of the above work.
Any suggestions?
probability stochastic-processes markov-chains queueing-theory
$endgroup$
add a comment |
$begingroup$
Suppose there is a queue with exponential service time $frac{1}{mu}$ which accepts customers from K classes with Poisson distribution and rate $lambda_k$ but if a customer from any class arrives at the queue while there is already another customer from the same class either waiting or receiving service, leaves.
I have performed a simulation to find the total service time $T = W_q + frac{1}{mu}$ but failed.
These are what I have found out from simulations so far:
service time $T_k$ is diffrent in every class.
$lambda_k$ changes while leaving the queue server and becomes $lambda_k'=frac{lambda_k}{1+lambda_k*T_k}$ beacause when one customer arrives and stays in the queue for $T_k$, $lambda_k*T_k$ customers arrive and leave immediatly without service. So one out of every $1+lambda_k*T_k$ gets service from the queue, hence $lambda_k'=lambda_k*frac{1}{1+lambda_k*T_k}$.
$sum_k (lambda_k'T_k)=(sum_k lambda_k')T$ in which T is the total mean service time of all customers regardless of class.
Update:
So I found out that if we consider this queue as K M/M/1/1 queues with $T_k$ service times, this could lead to finding the average number of customers in the system.
The followings are verified by simulation.
Every class has a separate M/M/1/1 queue with service time equal to $T_k$ that we are looking for. $P_0$ is the probability of each of these queues being empty which is by M/M/1/1 standards:
$P_0^k = frac{1}{1+lambda_kT_k}$
The average number of customers of K in the system is equal to $1-P_0^k$, because every one of them could only have one customer:
$P_1^k=n_k=frac{lambda_kT_k}{1+lambda_kT_k}$
The total number of customers in the system is the sum of $n_k$:
$N=sum_kn_k$
By this point these are all verified by simulations. After this I tried to find $T_k$s and failed. I thought $T_k$ should be like this:
$T_k=(N-n_k+1)*frac{1}{mu}$
or
$T_k=(1-P_1^k)(N-n_k+1)*frac{1}{mu}$
These have very close results to $T_k$s but don't work. I thought that every customer, by entering the queue will have to wait for each one of the customers from other classes be served for $frac{1}{mu}$ and then be served itself. None of the above work.
Any suggestions?
probability stochastic-processes markov-chains queueing-theory
$endgroup$
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19
add a comment |
$begingroup$
Suppose there is a queue with exponential service time $frac{1}{mu}$ which accepts customers from K classes with Poisson distribution and rate $lambda_k$ but if a customer from any class arrives at the queue while there is already another customer from the same class either waiting or receiving service, leaves.
I have performed a simulation to find the total service time $T = W_q + frac{1}{mu}$ but failed.
These are what I have found out from simulations so far:
service time $T_k$ is diffrent in every class.
$lambda_k$ changes while leaving the queue server and becomes $lambda_k'=frac{lambda_k}{1+lambda_k*T_k}$ beacause when one customer arrives and stays in the queue for $T_k$, $lambda_k*T_k$ customers arrive and leave immediatly without service. So one out of every $1+lambda_k*T_k$ gets service from the queue, hence $lambda_k'=lambda_k*frac{1}{1+lambda_k*T_k}$.
$sum_k (lambda_k'T_k)=(sum_k lambda_k')T$ in which T is the total mean service time of all customers regardless of class.
Update:
So I found out that if we consider this queue as K M/M/1/1 queues with $T_k$ service times, this could lead to finding the average number of customers in the system.
The followings are verified by simulation.
Every class has a separate M/M/1/1 queue with service time equal to $T_k$ that we are looking for. $P_0$ is the probability of each of these queues being empty which is by M/M/1/1 standards:
$P_0^k = frac{1}{1+lambda_kT_k}$
The average number of customers of K in the system is equal to $1-P_0^k$, because every one of them could only have one customer:
$P_1^k=n_k=frac{lambda_kT_k}{1+lambda_kT_k}$
The total number of customers in the system is the sum of $n_k$:
$N=sum_kn_k$
By this point these are all verified by simulations. After this I tried to find $T_k$s and failed. I thought $T_k$ should be like this:
$T_k=(N-n_k+1)*frac{1}{mu}$
or
$T_k=(1-P_1^k)(N-n_k+1)*frac{1}{mu}$
These have very close results to $T_k$s but don't work. I thought that every customer, by entering the queue will have to wait for each one of the customers from other classes be served for $frac{1}{mu}$ and then be served itself. None of the above work.
Any suggestions?
probability stochastic-processes markov-chains queueing-theory
$endgroup$
Suppose there is a queue with exponential service time $frac{1}{mu}$ which accepts customers from K classes with Poisson distribution and rate $lambda_k$ but if a customer from any class arrives at the queue while there is already another customer from the same class either waiting or receiving service, leaves.
I have performed a simulation to find the total service time $T = W_q + frac{1}{mu}$ but failed.
These are what I have found out from simulations so far:
service time $T_k$ is diffrent in every class.
$lambda_k$ changes while leaving the queue server and becomes $lambda_k'=frac{lambda_k}{1+lambda_k*T_k}$ beacause when one customer arrives and stays in the queue for $T_k$, $lambda_k*T_k$ customers arrive and leave immediatly without service. So one out of every $1+lambda_k*T_k$ gets service from the queue, hence $lambda_k'=lambda_k*frac{1}{1+lambda_k*T_k}$.
$sum_k (lambda_k'T_k)=(sum_k lambda_k')T$ in which T is the total mean service time of all customers regardless of class.
Update:
So I found out that if we consider this queue as K M/M/1/1 queues with $T_k$ service times, this could lead to finding the average number of customers in the system.
The followings are verified by simulation.
Every class has a separate M/M/1/1 queue with service time equal to $T_k$ that we are looking for. $P_0$ is the probability of each of these queues being empty which is by M/M/1/1 standards:
$P_0^k = frac{1}{1+lambda_kT_k}$
The average number of customers of K in the system is equal to $1-P_0^k$, because every one of them could only have one customer:
$P_1^k=n_k=frac{lambda_kT_k}{1+lambda_kT_k}$
The total number of customers in the system is the sum of $n_k$:
$N=sum_kn_k$
By this point these are all verified by simulations. After this I tried to find $T_k$s and failed. I thought $T_k$ should be like this:
$T_k=(N-n_k+1)*frac{1}{mu}$
or
$T_k=(1-P_1^k)(N-n_k+1)*frac{1}{mu}$
These have very close results to $T_k$s but don't work. I thought that every customer, by entering the queue will have to wait for each one of the customers from other classes be served for $frac{1}{mu}$ and then be served itself. None of the above work.
Any suggestions?
probability stochastic-processes markov-chains queueing-theory
probability stochastic-processes markov-chains queueing-theory
edited Dec 10 '18 at 23:44
Anais
asked Nov 30 '18 at 5:20
AnaisAnais
437
437
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19
add a comment |
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3019687%2fmulticlass-m-m-1-queue-which-can-simultaneously-have-one-customer-per-class%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3019687%2fmulticlass-m-m-1-queue-which-can-simultaneously-have-one-customer-per-class%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
I'm having trouble parsing this description. Can you clarify how this is different from $K$ different M/M/1 queues?
$endgroup$
– Brian Tung
Dec 1 '18 at 0:19