The Science of Kanban – Process

This is the third part of a write-up of a talk I gave at a number of conferences last year. The previous post was about the science of people.

Even though a kanban system describes knowledge work, we can still apply formal sciences such as mathematics. Rather than applying them at a detailed, micro level, we can take a system approach and apply them at the broader, macro level. As an example, if we try and predict the result of a single coin toss, we are only able to do so with 50% accuracy due to the unpredictable, random nature. However, if we to try to predict the result of 1000 coin tosses, we can be more accurate, albeit with less precision and some degree of variance.

Queuing Capacity Utilisation

The most common mathematics used with kanban systems is associated with queues and utilisation. Queuing capacity utilisation suggests that as capacity utilisation increases, queues increase exponentially. Thus extremely high utilisation will result in large queues.

scotland_karl_06

Further, Little’s Law tells us that the time something is in a queue (lead time) is equal to the size of the queue divided by the processing rate.

Lead Time = WIP / Processing Rate

It follows then, that if we want to complete work quickly (i.e. with a short lead time), then should reduce queues, which requires reducing utilisation. Reducing utilisation too much, however, will begin to have diminishing returns.

Traffic Flow Theory

Traffic Flow Theory gives an explanation as to why a work-in-process limit on one may be too low.

scotland_karl_07

Originally observed by Bruce Greenshields in 1934, Traffic Flow Theory describes how, as speed (in miles per hour) goes up, the density of traffic (in vehicles per mile) goes down, and vice versa. This is observable on roads with a low density of cars (i.e. empty) which are able to travel at high speeds, and roads with a high density of cars (i.e. gridlocked and bumper to bumper) which are stationary. Flow is defined as the product of speed and density, and thus there is an inverse u-curve, with high flow in the middle, and low flow at either end due to either low speed, or low density.

For product development, density can be viewed as work in process, speed correlates to lead time, and flow correlates to throughput. If work in process is too low for the available capacity, then lead time will be short, but throughput will be low. Similarly, if work in process is too high for the available capacity, then lead time will be long, and throughput will be low.

An interesting effect happens on either side of the flow curve.

On the left side, if density is increased (increasing work in process), speed decreases (increasing lead time), and flow decreases (decreasing throughput). The decreased flow causes a further increase in density resulting in a negative reinforcing loop.

However, on the right side, if density is increased (increasing work in process), speed decreases (increasing lead time), and flow now increases (increasing throughput). The increased flow causes a decrease in density resulting in a balancing loop.

Thus, while the optimum density is unlikely to be achieved precisely, it is better to be on the right hand side, with slightly less work in process, where a slight increase will balance itself out.

Feedback

It’s generally recognised that software development is a non-linear activity, due to the many feedback loops, so it’s useful to understand the effect that the feedback loops have on a process.

One of the impacts that a feedback loop has is related to its delay, where a long delay can lead to instability and oscillation. Taking a shower as an example, if when trying to turn the heat of the shower up, there is a long delay between turning the tap and the water temperature increasing, the natural reaction is to turn the temperature tap further. Eventually, when the change in water temperature comes through it will be too hot. The same can happen again when trying to turn the heat of the shower down again.

scotland_karl_08

Thus it is a good idea to minimise delays in feedback, or put another way, have fast feedback. Fast feedback also results in smaller queues, because less work builds up waiting for feedback. Smaller queues result in less work in process, and we have seen that lower work in process leads to shorter lead times. Shorter lead times further generate faster feedback, resulting in a positive reinforcing loop.

scotland_karl_09

In the next part we’ll cover the science of economics.

The Economics of Raking Leaves

I was out in the garden this weekend raking up leaves. Having read Geoff Watts recent post about using Scrum to clear his leaves – and as someone who can’t do anything without thinking about work (see Kanban and Quad Biking!) – my mind turned to how I would use Kanban Thinking to approach the work at hand. Surely I would advocate single piece flow by clearing up each leaf individually, visualising and measuring my progress?

I hope its clear that doing as such would be insane! But why? Maybe “single leaf flow” would be better? Why did my instincts shout out otherwise? The answer, as I have learned so often recently, comes down to making an economic trade-off. Every decision has a value and a cost, and finding the right balance is key, preferring higher value and lower cost.

image

Each leaf cleared from my lawn would have value in progressing me towards my goal of a tidy garden. However, the transaction cost of removing each leaf individually would be far too great. Therefore, a more sensible trade-off was to batch the leaves into piles, so that transaction cost was spread over a larger number of leaves.

Further, like Geoff, I also considered the risk of creating multiple piles before bagging them up. I could also run out of bags, or have the piles blown away. However, I knew I had plenty of bags, and it was an unseasonably still day, so I created multiple batches before bagging. I was even able to safely have lunch between batching and bagging without any regret. In other words I made another trade-off between the value (in terms of addressing risk) and cost. The value (or risk) wasn’t great enough to justify the cost.

I may not have designed a Kanban System to rake the leaves, but I did apply some economic thinking to decide what to do. If there’s one main lesson I’ve learned over the last few years, its that there is rarely a ‘right’ answer, but that there are trade-offs, and they are usually economic.