terça-feira, 4 de outubro de 2011

Differential Kanban - WIP Limits Analysis

Avoiding Discreteness



When looking at a Kanban board one good and closer to people experience analogy is to imagine balls in baskets. The balls of course are the tasks on the board and each different basket is a different stage of tasks towards its completion.

For those who like a bit of mathematics/algorithms will refer to this model as a discrete one. That means that the values that are addressed are NOT continuous, they vary in a step manner like integers for example. One problem about Discrete Math is that in general problems are harder to solve comparing to continuous ones. So a common strategy is to pretend that your problem is continuous, and that's the proposal of this post.

Model


A first step in removing the discreteness of the problem is to consider a fluid instead of balls (a second one would be to consider a river instead of buckets, but let's stick with the first one). In this post I will describe the behavior of a two buckets (A and B) system in which:

  • Both buckets have the same WIP Limit, meaning that they have the same capacity.
  • At any time the rate that A and B are filled cannot be positive if the WIP limit is reached. 
  • B Will only be filled if A has any fluid in it.
  • It takes a time for the fluid to leave the bucket, to induce the delay imposed by the time to complete a task.
I will omit the technical details to be more objective, but I will inform that this yields a nice and quite simple set of coupled delayed differential equations, which tend to be chaotic, but lets be unbiased.

Results 

The graph bellow is the path that system took. The x-axis  is the amount in A and the y-axis the amount in B. 
The system started with both empty and evolved following the curve until it stopped at a stable position:



The WIP limit used here was 2, and we can see that the system explored to limits of WIP by "walking" around. 
Now changing the WIP limit to 1.2 we observe a much interesting solution:


The slight extrapolation of the WIP id due to the continuous implementation and the parameters that I used.

Different initial values
From this graphs we find an evidence of what we call a stationary point, in which the systems tends to be if it starts there, and those points could be found analytically from the differential equations.

The video bellow is the animation of the results varying the WIP limit, the different lines correspond to different initial values:


On this video the WIP limits varies from 2 to 0.5. A direct result from this "experiment" is that if the WIP limit is less than the stationary point We get a more uniform and consequently more predictable behavior. which isn't directly obvious:



 
Conclusion


The objective of this post is to try to explore this kind of continuous approach, and to validate if it could be a good model to solve more complex situations like feedback loops, varying throughput, determine optimal WIP limits.