3
$\begingroup$

The questions says:

A printer is used to process print jobs. The interarrival times between jobs are exponentially distributed with a mean of 70 seconds. The time that is required to perform a job is exponentially distributed with a mean of 35 seconds.

a) Assume that 2 printers are used to process the incoming print jobs. Determine the mean time an incoming job has to wait until it can be processed (in seconds).

So I tried to figure this out:

In seconds: $\lambda=70$, $\mu=35$, $\rho=\frac{70}{35}=2$ we have two printers so my $c=2$.

Now to see if there's a steady state: $\frac{\rho}{c}=\frac{2}{2}=1\nless1$, so there is no steady state.

So with the formulas I know I can't calculate the Wq, can someone help me figure this out?

$\endgroup$
6
  • 2
    $\begingroup$ Don't we actually have $\lambda=1/70$ and $\mu=1/35$ (from which $\rho=1/4$)? $\endgroup$ Dec 17, 2021 at 13:09
  • $\begingroup$ @TheSimpliFire This works thanks, why do we have to do this tho? $\endgroup$ Dec 17, 2021 at 13:22
  • $\begingroup$ Why you have to do what exactly? $\endgroup$ Dec 17, 2021 at 13:23
  • $\begingroup$ @TheSimpliFire Why it is 1/70 and not just 70. Because 70 is also in seconds or did I miss the definition of lambda? $\endgroup$ Dec 17, 2021 at 13:55
  • 4
    $\begingroup$ $\lambda$ is the mean arrival rate. An interarrival time of $70$ seconds means one arrival every $70$ seconds (so $1/70$ per second). If $\lambda=70$ that would mean $70$ arrivals per second. $\endgroup$ Dec 17, 2021 at 13:57

1 Answer 1

0
$\begingroup$

Most of the formulas I have come across in queueing theory assume steady state, and I don't know of a purely mathematical approach for all cases. So let me show you a simple simulation approach.

Using Ciw, let us simulate for $10^4$ jobs.

import ciw
import pandas as pd

ciw.seed(2018)


network = ciw.create_network(
    arrival_distributions = [ciw.dists.Exponential(1/70)],
    service_distributions = [ciw.dists.Exponential(1/35)],
    number_of_servers = [2]
    )

simulation = ciw.Simulation(network)

simulation.simulate_until_max_customers(10000)

records = pd.DataFrame(simulation.get_all_records())


print(
    (
        records.waiting_time
        .describe()
        .to_markdown()
        )
    )

And here are the results.

waiting_time
count 10000
mean 2.14293
std 9.50576
min 0
25% 0
50% 0
75% 0
max 161.518

And here is a plot of the arrival time vs waiting time:

enter image description here

$\endgroup$
6
  • $\begingroup$ Would you say what does the waiting time equal to $160$ mean on top of $300000$ arrival_date? $\endgroup$
    – A.Omidi
    Dec 20, 2023 at 10:33
  • $\begingroup$ @A.Omidi Right, I see that spike. It means that one of the jobs waited on the queue for $\approx 160$ units of time and they arrived on the queue at time $\approx 300000$. $\endgroup$
    – Galen
    Dec 20, 2023 at 17:09
  • $\begingroup$ thanks for the clarification. As the arrival rate is more than the service rate, it seems there would be no queue on the server queue. It is a bit different from what you proposed on the graph. Do you check this? $\endgroup$
    – A.Omidi
    Dec 23, 2023 at 8:49
  • 1
    $\begingroup$ There are different notions of stochastic dominance if it peaks your interest to get into the mathematics of order relations on statistical populations. $\endgroup$
    – Galen
    Dec 23, 2023 at 16:59
  • 1
    $\begingroup$ thanks for the clarification. $\endgroup$
    – A.Omidi
    Dec 23, 2023 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.