Pretty Damn Quick queueing-network modeling package
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

PDQ: Pretty Damn Quick

(version 7.0.0-beta —- Not ready for prime time)

This is a development repository. The current release, PDQ 6.2.0, has its own repository with separate download and installation instructions.

PDQ is a library of functions for solving queueing-network models of systems of resources such as, distributed computer systems, manufacturing systems, and packet networks. PDQ models can be written optionally in a variety of conventional programming languages. The book Analyzing Computer System Performance with Perl::PDQ presents example applications for computer system performance analysis written in Perl. Another example below is written in Python.

Overview: What is PDQ?

Languages: C, Perl, Python, R

Platforms: Linux, MacOS, 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 a Call Center serving a single waiting-line of customers, written in Python:

#!/usr/bin/env python

import pdq

agents  = 4     # available to take calls
aRate   = 0.35  # customers per minute
sTime   = 10.0  # minutes per customer

pdq.Init("Call Center")
pdq.CreateMultiNode(agents, "Agents", pdq.CEN, pdq.FCFS)
pdq.CreateOpen("Customers", aRate)
pdq.SetDemand("Agents", "Customers", sTime)

How long can a calling customer expect to wait to speak with an agent? To answer that question, you simply run the PDQ model. All the resulting queueing metrics are displayed in a default format using the Report() function:

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

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

WORKLOAD Parameters:

Node Sched Resource   Workload   Class     Demand
---- ----- --------   --------   -----     ------
  4  MSQ   Agents    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        Agents      Customers             4   Servers
Throughput      Agents      Customers        0.3500   Customers/Minute
In service      Agents      Customers        3.5000   Customers
Utilization     Agents      Customers       87.5000   Percent
Queue length    Agents      Customers        8.6650   Customers
Waiting line    Agents      Customers        5.1650   Customers
Waiting time    Agents      Customers       14.7572   Minute
Residence time  Agents      Customers       24.7572   Minute

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

Optionally, you can create customized reports by retrieving specific performance metrics like, GetUtilization() or GetThruput().