Dynamic C-server Queueing System Simulation  1.0
Simulating data for delay prediction
Dynamic C-server Queueing System Simulation Documentation

We follow a object oriented approach for creating a general Queueing System and getting simulated wait time data. Further, we are also going to change the linear model to incorporate other ML techniques and hopefully create a better predictor.

Check out our code repository here.(Currently in work).


Tutorials

Please visit our examples for various application.

Following are few examples exaplained briefly.

  1. Single Server Queue Simulation
  2. Graph of Queue Simulation

Simulation Models

We follow a object oriented approach for creating a general Queueing System. Three main classes are declared in the components folder:

  1. station : A single queueing system. You can define the number of servers (even dynamic i.e. changing with time).

    Also you can provide custom departure time distribution by providing the inverse distribution function ( pass a function { float -> float } to station class that generates the random service times).

    You'll have to use one the following constructor:

    station (long init_mxN, C_type C_para, event_type dept_para, float t=0, int init_n=0)
    
    station (long init_mxN, C_type C_para, float init_dept, float t=0, int init_n=0)
    
    station (long init_mxN, int init_C, float init_dept, float t=0, int init_n=0)
    
    station (long init_mxN, int init_C, event_type init_dept, float t=0, int init_n=0)
    

    Here C_type is Function type float -> int and event_type is Function type float -> float.

    Example of simple queueing system and more information on how to simulate can be found in examples folder.

  2. tandem : You can pass in a vector of station objects to group multiple queueing system in series.
  3. graph : Currently in work but the idea is to create a directed acyclic graph of station objects.

If you have already generated distribution for arrival or service times you can use,

std::vector<float> read_csv(std::string filename,int index); //index is the column to be read.

to read the data out of a csv file. and then the data can be used in our model in the following way:

std::vector<float> service_times = read_csv("lognormal.csv",1);
std::vector<float> interarrivaltimes = read_csv("lognormal.csv",2);

station MG1(1,1,
[service_times](float t) -> float
{
    float U = random;
    int index = (int)(U*service_times.size());
    try
    {
        return service_times[index];
    }
    catch(const std::exception& e)
    {
        // std::cerr << e.what() << '\n'; 
        return service_times[index-1];
    }
});

Project by-

Nalin Shani Nalin.nosp@m..Sha.nosp@m.ni.me.nosp@m.118@.nosp@m.mech..nosp@m.iitd.nosp@m..ac.i.nosp@m.n

Achintya Eeshan me118.nosp@m.0094.nosp@m.@iitd.nosp@m..ac..nosp@m.in

B.Tech IIT Delhi Mechanical Engineering