 So, let us go back to the slides, I am just going to write stock, here I mentioned outflow is proportional to the stock, so we are going to include model it like this, where the average delay d is here, here the system is outflow, there is nothing but your stock divided by d, again here we are assuming the delay time is not going to change and stock is going to keep reducing by the amount of the outflow at every time point. So, we already know this is like a first order negative feedback system or a zero value goal if you assume the initial at time 0 there is some initial quantity after there is nothing happening it will constantly drain and the outflow that you will get will be something like for this is your time and these are your flows assuming a pulse input at time 0, your outflows will immediately start and you will have a exponential goal seeking system and of course, here so this is your outflow profile for this particular system. So, here we have modeled we have assumed that average delay time is d will it indeed be d will the average indeed be d, let us just answer this question max of stock occurs at time equal to 0, this for this particular example, max of outflow also will be the same occurs at time equal to 0, just proportional to the stock, question was what is average, is the average delay or average time spent by the material in stock for the pulse delay. Intuitively we know that the average time spent or let us not use the same terminology, let us just call it average time spent in delay logically speaking it should map out to d correct because d is the we assumed it as the average delay and then we are modeling the system, but we can see whether this kind of representation actually ensures that the average time the material spends in the stock is actually equal to the time d, we can try to verify that. When you are set of materials how do we compute the average delay? Let me give a let us take a to compute that let us take a simple discrete example, what is example? Yeah suppose we mail 10 items today, 4 items delivered after 5 days, 4 items delivered after 8 days and 2 items delivered after 9 days or the 9th day, you can assume it is a delivered on the 5th day, on the 8th day and on the 9th day. So, what will be the average delay? It will be the time multiplied by the quantity supplied in that time plus 8 into 4 plus 9 into 2 divided by the 10 that is the total quantity correct. This is nothing but a total time and transit divided by the total items correct that is what we have here. This if you solve it comes to about for a discrete case it is quite intuitive we can compute it. Now, let us see how we can do it for the continuous case that we have right now, where at every time instant we are having a some unit that is getting out of the stock. So, let us go there, so delay. Let us suppose pulse input occurs at time 0 and there is no other input. So, inflow occurs at time 0 that means, stock has initial value of some pulse 1 unit and we want to see what is the average time it takes to drain it. So, this system as I mentioned is similar to exponential decay where we actually had solved to estimate that stock at time t is equal to S naught and e power minus t by d. We have actually done that S naught is the initial value of stock e power minus t by d that will give you an exponential curve. So, we have this. So, this means that your outflow at time t is nothing but S of t by d right. So, we already know this equation Now, let us compute the average time and delay which is in the same idea as a discrete case where we are multiplying the quantity that is being delivered at each time multiplied by that time unit correct that is what we did. So, the time unit is t quantity delivered at each time period is nothing but your outflow at time t and we have to divide it by the total unit in transit. Total unit in transit or I have assumed a pulse input. So, pulse input means that is the value of stock at time 0. So, S naught stock at time 0, but now it is going to occur at all time units t from 0 to infinity. So, instead of doing summation I am just going to do integration dt right. Now, from the above equation I can get this 0 to infinity t into S naught by d into e power minus t by d divided by S naught. I am just substituting the equation for outflow from here from 1. I am just substituting it here dt 0 to infinity S naught just got cancelled. So, I have t into 1 by d into e power minus t by d dt and this will be equal to d. This equation is nothing but if you just close this it is 1 by d into e power minus t by d is nothing but exponential distribution. So, t into 1 by d e power minus t d is nothing but you are computing the mean of exponential distribution. Mean of exponential distribution is 1 over its parameter. So, 1 by 1 by d. So, which is d. So, if you can spot it early. So, all your probability distributions will come into play here. So, here we are assuming that the outflow output is exponentially distributed with the mean time. So, if you want to capture it you do it in first order delay. So, as you go to higher order delays we are looking at exponential family of distributions. They are looking at Weibull distributions, they are looking at some of exponential like Erlang distributions and things like that. So, which is what is used to capture actual delay processes in reality. Exponential is a very popular time between arrivals of say buses which is modeled. So, if you have some of your done probability models course it will come up very often that we are assuming a lifetime of a bulb is exponentially distributed. There is nothing but the delay is exponentially distributed. So, instead of worried about one bulb you are worried about hundreds of bulbs and figure out how many is getting you know fail at different points in time at a very aggregate level we are operating instead of one event. So, as we move into higher order delays it is nothing but a sum of exponential distributions it is kind of idea is what we will be exploring. First order and pipeline delays this is t and this is your flows. Suppose this is your pulse input a pipeline delay will give me this kind of output if it is a pipeline delay. So, this is your all your output curves this is your output this is a pipeline delay. If it is a first order exponential delay it is going to go like this. So, these represents two extremes of how the material delay is functioning. One where everything comes out at one particular point in time where the variability is 0. For the pipeline delay variability around mean is 0. First order delay there is a variability around the mean very large variability. As we start modeling other higher order delays second order third order and so on then. So, all these curves here represent what we call as a higher order delays. As we have higher and higher order of delays it will converge for example, infinite order delay is somewhat similar to a pipeline delay. As higher and higher order delays we go the variability around the mean delay will be smaller. So, if you know that output has some variability around the mean but not much that means you are looking at a very higher order delay. If there is lot of variability around the mean then probably looking at a lower order delay something like first order, second order or something. This figure is not exactly to scale because which we will simulate it properly. But the idea here is if it is lower order delays you may peak much before the mean delay. When higher order delays probably you will peak very close to that mean delay, but if lower order delays for example, extreme cases first order delay where you peak at time 0 itself you do not peak near the mean. Second order delay you may peak little closer towards the mean third order delay etcetera, but as you go closer you may peak close to the mean. For whatever modeling purposes third order delay is quite popular up to third order delay people try to capture the performance of many systems and we have some shortcut functions for that. Moving back to this the model this in Vensim one way is you can directly draw this in Vensim right there is no formulas no explicit formulas there, but in case we want to use the Vensim formula this structure will continue to be the same, but here inflow will directly be connected to the outflow and the equation for outflow I just write the very general version delay n will lack of space I am just writing what is in the parenthesis here I have in d time initial value exactly same as the previous case of fixed delay except I have one more variable called as order one more input order defines what order I want. So, first order I put 1, second order I put 2 etcetera, but here this diagrammatic representation continues to remain the same inflow directly connected to the outflow either I do this or I do this thing no I do not want all these formulas let me directly do the equation then I go ahead and do this there is nothing wrong in that if you want to do this that is also fine because if you want to do like a say a fifth order delay then doing so many stocks and flows may be look quite cumbersome you may want to do this one in d time initial value and order in is inflow that is here d time is d initial values what is the initial value and order is this example says first order. So, here it will be 1.