 Today, we are going to be looking at delays and how to model them in system dynamics what it means. So, delays exist in almost all the systems, some delays create instability in oscillation, others filter out unwanted variability within the system so that we can get rid of the short term variability and look at the long term performance or remove noise from the signal. So, these are the aspect in all the systems whatever process we take there will be some form of delay which is incurrent part of all the systems. If you just think about it in modeling perspective delays are nothing, but where the output lags behind its input by some time duration right whatever it may be. So, that is a very simple definition of delay so broadly speaking we can think of two types of delays one is called as a material delay which captures a physical flow of materials for example, if say we send in raw materials into the factory after a time delay of say 2 days it comes out as a finished product as raw material comes in maybe after 2 days it comes out as a car. So, there is a delay and there the material is conserved so whatever material goes in it either comes out as a finished product or as a scrap right. So, that is a kind of a mass balance or you can think of say letters that is being posted say through courier or postal service so whatever goes into a system then remains in transit for some duration after end of it which it is delivered. So, those are material delays where the material gets conserved and or when you send an application for say applying for IIT your application was a physical material it went to the admissions office it stayed there for some time many different people would have processed it and then finally, you would have got some response to that correct. So, those are also material delay or when you finish an exam you give the exam papers to me then I have to grade the papers and give it back. So, even those are also considered as material delay so material does not mean it has to be a physical you know object or anything it can also be like an order or the exam papers etcetera. So, those are also material delay or the act of sending an emails so when you send an email assume it nothing is lost, but after some delay the material gets read. So, until you read it the material is in your inbox even after that it can go into your archives or it continues to remain until you delete it right. So, there also the material is conserved. So, those are all considered as part of a physical flow of material. So, I am just having a very broad description of the physical flow. The second kind of delay is called as a perception delay or information delay which represent gradual change in perceptions and beliefs. I mean change in beliefs is going to take time. So, these kind of delays are called as perception delays or information delays or delays of beliefs. This is also quite interesting given a certain people's background they will have certain kind of perception about things. You cannot just pass a law and make it change overnight it takes some time for it to gradually change in especially in social customs. Another more related information delay could be how you process whatever has been taught in class right it takes time to observe it. If at all at some point some amount gets observed it takes some time to retain it and over time that can also we tend to forget normally. So, those are called as information delay. So, there there is no conservation of mass it cannot be like you know I taught you so much hours of material and that much hours gets stored in memory it does not happen like that right it is a maybe some few abstract pieces of information that gets stored which also erodes or gets updated over time. When you get new information you process new information and the old one either gets replaced or reinforced or you just forget them. So, those kind of perceptions is what we call as information delay. Some form of both you might have seen in other courses also. Today's class we will start with the material delay which is kind of more easy to grasp and handle we will get a hang of that. So, material delay. So, when you look at material delay essentially in modeling in system dynamics method we consider two things one is average delay time as is distribution of deliveries or output around this mean delay like as I told the example of sending letters I send letters and after a delay of say a week or a week suppose all the letters are delivered exactly at the same time then I know that there is a fixed delay right, but it does not happen so. Sometimes when I post a letter today some letters get delivered after three days some after four days some after five days right. So, there is a distribution around this average time of delay. So, those are two things that we want for modeling the delays what is it average time and what is the distribution around that average time that we expect and based on that we will be choosing the kind of models we want around that. Let us take the simplest case saying that where output lags behind its input by a fixed and a constant duration we call that as a pipeline delay. So, whatever you send in at this end of the pipe comes out at the other end of the pipe the same quantity after fixed duration. So, it is very common in like say an assembly line kind of setup where material is sent and after a time a finished product comes out whatever the time scale might be and order of exit from delay is also same as order of entry delay times are constant. So, this is one of the simplest model. So, let us do delay as a topic let us consider a simple pipeline delay we represent it as. So, imagine again letters being posted so, we can consider it as material in a drawer to small box, but you can correct it because in is your outflow average delay time D. So, we are going to be using capital D for the average delay time throughout. So, input is kind of exogenous so, whatever it can be material in transit is nothing but the difference of the flows. So, only equation of concern is what is this output. So, output time t is nothing but inner time t minus d ok. It is a very simple equation output lags behind input after d time periods. So, in Wensum if you want to model it we cannot write these equations as you might have observed in Wensum there is no way to give it subscript of time t time t is taken as implicit correct. So, they have defined functions for that. So, if you want to model this in Wensum out we simply model as that is a function called as delay fixed it takes as parameters d time and in it that is in refers to your inflow or the input d t is your delay time D delay duration and in it is initial value of output when time is less than D or the delay duration. So, these are two or three input parameters for this function which fully captures this. Now, internally what Wensum will do is do the same equation output is in of t minus d where d is your delay duration and in refers to your in here which is same as the in here this is a variable name and in it is initial value. So, observe the equation when t is less than d it becomes negative. So, we need to know what happens when t is less than d. So, that is also specified in Wensum as what is the initial value typically we take it as 0 that means, there is no output until actually input starts working. So, that is a simple lag. So, if you want to may write a proper equation. So, this works when t is greater than equal to d yeah that is it. It is quite simple to visualize your flows for example, if there is a assume a pulse input at say time 0 at time 0 there is a pulse input and assume there is a d equal to say phi that means, after phi periods the entire thing is going to come out as an output. So, this becomes your out that this pulse input is your in it is very simple delays whatever you are going to put in is going to come out. So, whatever profile it comes here it is just going to be offset by d time units and the same profile is going to come out after d time units for the output. So, we look at few types of delays then we can move to Wensum for trying it out it is not that difficult look at it. So, this is what we have seen. So, this is one extreme where whatever you do after time delay starts coming out we can take the other end of the spectrum a kind of delay which we have already seen. Since, we look at delay I am introducing it as a first order material delay. What you are saying is in this case output is proportional to the stock. So, assume that whatever inflow occurs this stock is mixed perfectly the analogy here is again the same water tank. So, in this water tank as you can see there is inflow happen and suppose there is a tap below it is not water is not going to follow first end first out policy as soon as it comes it is going to be assume there is also mixer which keeps mixing it. So, water is going to just come out almost instantaneously as long as inflow started immediately outflows will also start and tank will continue to drain in this model. This is nothing but a simple first order model that we have already seen you know when there is a outflow which is proportional to the inflow and the stock in hand. So, tank is going to keep draining until the entire tank is drained right. So, that simple first order negative feedback system is also called as a first order material delay. We will do the Vensim one and couple of questions we can think about. If it is a first order material like a first order negative feedback system. So, what are inflow occurs and it system starts draining almost instantaneously. So, what time does the maximum value of stock occur will be a time 0 will be at the initial point how long an average it spends.