To find (a) average number of materials in the system (b) average number of materials in the conveyor (c) waiting time of each material in the system (d) waiting time of each material in the conveyor, if the arrival of materials follow poisson process with the mean interval time 10 seconds, serivice time of two lathe machine follow exponential distribution with mean serice time 1 second and average service time of robot is 7seconds.
Visual components and Python
Queuing are the most frequently encountered problems in everyday life. For example, queue at a cafeteria, library, bank, etc. Common to all of these cases are the arrivals of objects requiring service and the attendant delays when the service mechanism is busy. Waiting lines cannot be eliminated completely, but suitable techniques can be used to reduce the waiting time of an object in the system. A long waiting line may result in loss of customers to an organization. Waiting time can be reduced by providing additional service facilities, but it may result in an increase in the idle time of the service mechanism.
Developed By: Kurapati Vishnu Vardhan Reddy
Reg No: 212223040103
import math
arr_time=float(input("Enter the mean inter arrival time of objects from Feeder (in secs): "))
ser_time=float(input("Enter the mean inter service time of Lathe Machine (in secs) : "))
Robot_time=float(input("Enter the Additional time taken for the Robot (in secs) : "))
c=int(input("Number of service centre : "))
lam=1/arr_time
mu=1/(ser_time+Robot_time)
print("--------------------------------------------------------------")
print("Multiple Server with Infinite Capacity - (M/M/c):(oo/FIFO)")
print("--------------------------------------------------------------")
print("The mean arrival rate per second : %0.2f "%lam)
print("The mean service rate per second : %0.2f "%mu)
rho=lam/(c*mu)
sum=(lam/mu)**c*(1/(1-rho))/math.factorial(c)
for i in range(0,c):
sum=sum+(lam/mu)**i/math.factorial(i)
P0=1/sum
if (rho<1):
Lq=(P0/math.factorial(c))*(1/c)*(lam/mu)**(c+1)/(1-rho)**2
Ls=Lq+lam/mu
Ws=Ls/lam
Wq=Lq/lam
print("Average number of objects in the system : %0.2f "%Ls)
print("Average number of objects in the conveyor : %0.2f "%Lq)
print("Average waiting time of an object in the system : %0.2f secs"%Ws)
print("Average waiting time of an object in the conveyor : %0.2f secs"%Wq)
print("Probability that the system is busy : %0.2f "%(rho))
print("Probability that the system is empty : %0.2f "%(1-rho))
else:
print("Warning! Objects Over flow will happen in the conveyor")
print("--------------------------------------------------------------")
Thus the average number of materials in the system and conveyor, waiting time of each material in the system and conveyor is found successfully.