Skip to content

Pretty Damn Quick queueing-network modeling package

License

Notifications You must be signed in to change notification settings

pjpuglia/pdq-qnm-pkg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDQ: Pretty Damn Quick

PDQ is an analytic solver library for queueing-network models (QNM) of computer systems, manufacturing systems, and data networks, that can be written optionally in a variety of conventional programming languages (see below). Perl is the language used in the book Analyzing Computer System Performance with Perl::PDQ, which explains the fundamental queue-theoretic concepts with example PDQ models for computer performance analysis.

Overview: What is PDQ?

Languages: C, Perl, Python, R

Platforms: Linux, OS X, Windows

Maintainers: Neil Gunther and Paul Puglia

Contributors: Denny Chen, Phil Feller, Neil Gunther, Peter Harding, Paul Puglia, Sam Zallocco

License: PDQ is distributed as OSS under the MIT license.

Synopsis: PDQ library functions

Examples: See the examples/ directory.

Here is a simple PDQ model of four bank tellers serving a single waiting-line of customers, written in C:

#include <stdio.h>
#include "PDQ_Lib.h"

int main(void) {
    int    tellers = 4;
    double aRate   = 0.35; // customers per minute
    double sTime   = 10.0; // minutes per customer

    PDQ_Init("Bank Model");
    PDQ_CreateMultiNode(tellers, "Tellers", CEN, FCFS);
    PDQ_CreateOpen("Customers", aRate);
    PDQ_SetDemand("Tellers", "Customers", sTime);
    PDQ_SetWUnit("Customers");
    PDQ_SetTUnit("Minute");
    PDQ_Solve(CANON);
    PDQ_Report();
}

How long can a customer arriving at the bank expect to wait for a teller? Predicted performance metrics that result from solving a PDQ model can easily be displayed using the generic Report() function:

                        PRETTY DAMN QUICK REPORT         
               ==========================================
               ***  on   Tue May 17 13:23:24 2016     ***
               ***  for  Bank Model                   ***
               ***  PDQ  Version 7.x.x Build 051116   ***
               ==========================================

               ==========================================
               ********    PDQ Model INPUTS      ********
               ==========================================

WORKLOAD Parameters:

Node Sched Resource   Workload   Class     Demand
---- ----- --------   --------   -----     ------
  4  MSQ   Tellers    Customers  Open     10.0000

Queueing Circuit Totals
Streams:   1
Nodes:     1

Arrivals       per Minute     Demand 
--------       --------     -------
Customers      0.3500       10.0000


               ==========================================
               ********   PDQ Model OUTPUTS      ********
               ==========================================

Solution Method: CANON

               ********   SYSTEM Performance     ********

Metric                     Value    Unit
------                     -----    ----
Workload: "Customers"
Number in system          8.6650    Customers
Mean throughput           0.3500    Customers/Minute
Response time            24.7572    Minute
Stretch factor            2.4757

Bounds Analysis:
Max throughput            0.4000    Customers/Minute
Min response             10.0000    Minute


               ********   RESOURCE Performance   ********

Metric          Resource     Work              Value   Unit
------          --------     ----              -----   ----
Capacity        Tellers      Customers             4   Servers
Throughput      Tellers      Customers        0.3500   Customers/Minute
In service      Tellers      Customers        3.5000   Customers
Utilization     Tellers      Customers       87.5000   Percent
Queue length    Tellers      Customers        8.6650   Customers
Waiting line    Tellers      Customers        5.1650   Customers
Waiting time    Tellers      Customers       14.7572   Minute
Residence time  Tellers      Customers       24.7572   Minute

PDQ predicts the average customer waiting time will be 14.7572 minutes.

Alternatively, customized reports can be created using specific performance metrics like, GetUtilization() or GetThruput().

About

Pretty Damn Quick queueing-network modeling package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 81.2%
  • R 10.1%
  • Python 3.3%
  • Perl 2.5%
  • C++ 1.6%
  • Makefile 1.0%
  • Other 0.3%