OpenQTSim

This page lists all functions and classes available in the OpenQTSim modules. For examples on how to use these submodules please check out the Examples page, information on installing OpenQTSim can be found on the Installation page.

Submodules

The main components are the Model module and the Core module. All of their components are listed below.

openqtsim.arrival_process module

class openqtsim.arrival_process.ArrivalProcess(symbol='M', arr_rate=8)[source]

Bases: object

Arrival process class for use in the OpenQTSim package

get_IAT(customer_nr=[])[source]

Return the inter arrival time based on the inter arrival time distribution or deterministic list

openqtsim.customer module

class openqtsim.customer.Customer(Env, Sim)[source]

Bases: object

Customer class for use in the OpenQTSim package

move(IAT, AT)[source]

” Method to move Customer through the system

openqtsim.queue module

class openqtsim.queue.Queue(A=<openqtsim.arrival_process.ArrivalProcess object>, S=<openqtsim.service_process.ServiceProcess object>, c=1, K=inf, N=inf, D='FIFO')[source]

Bases: object

Queueing class based on Kendall’s notation, in which: - A is the arrival process - S is the service time distribution - c is the number of servers - K is the number of places in the system - N is the calling population - D is the queue discipline

kendall_notation

Return queue name according to the Kendall notation.

occupancy_to_waitingfactor(utilisation=0.3, nr_of_servers_to_chk=4, poly_order=6)[source]

Waiting time factor (E2/E2/n or M/E2/n) queueing theory using 6th order polynomial regression)

populate(Env, Sim)[source]

While the simulation time does not exceed the maximum duration, generate customers according to the distribution of the arrival process to populate the queue

waitingfactor_to_occupancy(factor=0.3, nr_of_servers_to_chk=4, poly_order=6)[source]

Waiting time factor (E2/E2/n or M/E2/n) queueing theory using 6th order polynomial regression)

openqtsim.service_process module

class openqtsim.service_process.ServiceProcess(symbol='M', srv_rate=9)[source]

Bases: object

Server process class for use in the OpenQTSim package

get_ST(server, customer_nr=[])[source]

Return the inter arrival time based on the inter arrival time distribution or deterministic list

openqtsim.simulation module

class openqtsim.simulation.Simulation(queue, max_arr=100, priority=False, seed=None)[source]

Bases: object

A discrete event simulation that simulates the queue. - queue is a queue based on the queue class - seed is a random seed to have retraceable simulations

get_stats()[source]

Post processing of logs to print basic simulation statistics

log_customer_state(customer_id, IAT, AT, ST, TSB, TSE, ITS, s_id)[source]

# the following items are logged per customer that enters the system: # c = customer id # IAT = inter arrival time # ST = service time # AT = arrival time # TSB = time service begins # TSE = time service ends # TCSS = time customer spends in the system # TCWQ = time customer waits in the queue # ITS = idle time of the server # s_id = id of server assigned to customer

log_system_state(t, c_s, c_q)[source]

# the following items are logged for the state of the system: # t = time (from start of simulation) # c_s = number of customers in the system # c_q = number of customers in the queue

plot_IAT_ST(fontsize=20)[source]

Plot histograms of IAT’s and ST’s

plot_system_state(fontsize=20)[source]

Plot number of customers in the system and in the queue as a function of time

return_log()[source]

Return the log in the form of a pandas data frame.

run(max_arr=1000)[source]

Run simulation

Module contents

Top-level package for queueing.