## Thursday, April 11, 2013

### Introduction

Little's Law deals with averages. It can help us calculate the average waiting time of an item in the system. In project development we break the project delivery into work items. We are interested in how much time it will take for all the items to be processed by the system. And that is what Anderson's formula does - it gives us the relationship between the average lead time for an item and the finite time period over which the project will be delivered.

### Little’s Law

Let’s recall what the Little’s Law for production systems is:
Where throughput (TH) is the average output of a production process (machine, workstation, line, plant) per unit time,  work in process (WIP) is the inventory between the start and end points of a product routing, and cycle time (CT) is the average time from release of a job at the beginning of the routing until it reaches an inventory point at the end of the routing (that is, the time the job spends as WIP). Handily this result applies to any system, and particularly, it applies to systems within systems. So in a bank, the queue might be one subsystem, and each of the tellers another subsystem, and Little's result could be applied to each one, as well as the whole thing.

### Anderson’s Formula

Let’s consider project planning. On Fig.1 we have two levels of the system and hence two perspectives on it:
• Client layer – project or set of customer defined requirements meaningful to the customer.
• Service level – components or work items suitable for the development organization. User stories are just an example of a suitable work item type
The project will be delivered in the time T. We break down the project into N work items. All the items enter Project Queue. The size of the individual work items doesn't matter. When breaking a project down we do not consider how many steps the workflow of server S2 consists of. Important thing is that we have two queues - Project and Dev. Project queue has the size of N and Dev queue could be of any size in [0,N]. Server S1 could have service time of more than 0 if for instance what it does is to decide which would be the next item to leave Project queue and enter Dev queue.

Fig. 1

We can calculate the lead time for the project using the formula:

We can calculate the developers we will need to deliver for a particular lead time using the formula:

Where:

T              = time period over which the project will be delivered (lead time)
N              = the number of items to be delivered or the total arrivals in [0,T]
= average lead time at the project level or what the client can see
= average work in process at the project level
= average work in process at the development organization level
= average lead time (cycle time) at the development organization level
= average throughput at the project level
= average throughput at the development organization level

Of course THis the average of a random variable modeled by a distribution of some type. If the departure is a Poisson process with intensity THthen the required time for N-th work item to exit the system (be delivered) is modeled by a Gamma distribution Gamma(a,b) with a=N and b=1/THt.

### Proof of Anderson’s Formula

We apply Little’s Law at the client level:
Then we apply Little’s Law at the development organization level:

Consider Fig.1 where the project is presented as a queuing system consisting of two queuing systems in tandem. Client and development systems are connected in a way that they share the same output. Output from the development system is flowing into the output of the client system. Hence average throughput of the client system is equal to the average throughput of the development system or
For both systems we have to work with the same time interval for the throughput time and throughput rate i.e. minutes, hours, days, weeks, etc. Also we have to have the same work item type – it is not possible average throughput at the project level to be measured in sites, and average throughput at the development organization level to be measured in web pages.

By noting that

It follows that

As well as that
or

### Examples

#### Original example from David Anderson

We have a major project with 2200 user stories to be delivered. The business needs the project delivered in 10 months. The questions to answer are: How much money do we need? How many people do we need?
So we have N = 2200 user stories, T=10 months = 40 weeks. We also have historical data that average lead time for the development organization is 0,4 weeks. Using the Anderson’s formula (2) we have:
Development organization has the policy of 1 work item per person hence we will require 22 persons. That assumes the dev queue has finite size of 0 work items. If the dev queue has finite size of 2 user stories we will need 20 persons.
The result should be used for the second leg of the Z-curve, but that is another topic.

#### Calculating delivery date

Let’s have a similar project with major project with 2200 user stories to be delivered. The business wants to know when we will be able to deliver. There are no options for adding more developers to the development organization so we know the average work in process which is 22 user stories.  We also have historical data that average lead time for the development organization is 0.4 weeks per user story. Using the Anderson’s formula (1) we have:

The result should be used for the second leg of the Z-curve, but that is another topic.

#### References:

Little, J. D. C., S. C. Graves. 2008. Little’s Law. D. Chhajed, T. J. Lowe,eds. Building Intuition: Insights from Basic Operations Management Models and Principles. Springer Science + Business Media LLC,New York.

J. D. C. Little. Little's law as viewed on its 50th anniversary. Oper. Res. 59 (2011) 536{539.