 If you had looked at Wensham, that functions help when you open the screen on the left side bottom, there are lot of functions. We have seen a few of them, pulse, step, random normal, if, if then else mean possibly is a max. There are so many other functions which if situation demands it, just go over those list and see whichever is applicable we can use it in our model. There is one other way in which this kind of non-linear functions are captured within our model. One is of course, if we know the analytical expression, we can always put it y equal to whatever x power z or something, then we can directly capture it within the model. But many times such an analytical expression may not be available for us. So, in those cases either we use min max kind of functions or we use what is called as the table or lookup function. So, for second example we will study how to model table or lookup function. Table lookup function is to capture the non-linear response function. We do not know the analytical expression, but we can somehow guess the shape of the function and we are going to include it graphically or using several points or several pair of points are going to be given. So, basically what we are going to do is, use several set of points for inputs and outputs of the variable and when simulation model runs, it is going to extrapolate or interpolate between those variables and give me the output response as simple as that. So, if I know the shape of the function, then I am going to feed those pair of points in my model and it is going to interpolate or extrapolate. So, simulation model then creates a curve through these points which is used to determine necessary values to run the simulation. So, today's class we will learn how to implement this table or lookup function in Vensim with a different example. So, we will get familiar on how to input it. So, for this we will take up a non-inventory kind of an example. We will move into this rat population growth model, this fire bit of text bear with me and just go through it. The experiment has been conducted on population of rats. Rats are kept in a controlled environment of area 11000 square feet with sufficient food and water supplies. Soon the population began to thrive. New rats were born, old ones died after an average lifetime of 22 months. No migration or predation of population was allowed. The experiment found that population density affected infant mortality which reduced the birth rate, but the death rate remained unaffected. Initial rat population was 10. Assume age does not matter for reproduction male-female ratio is 1 is to 1. Also, normal rat fertility is 0.4 rats per female per month. We need to build a stock flow diagram of the model. This is actually based on a paper. So, there are some assumptions given. No migration which we just saw it is controlled environment ample and sufficient food supply and the infant survival multiplier. Let us say how the infant survival affects is affected by the population density. That let us assume it is given by this curve right here. Rat population density is in the x-axis and that gives us an output of infant survival multiplier according to this particular curve right here. We do not have the analytical expression for that, we just know this curve. So, what we are going to learn is how to input this curve directly in our Vensim model is what we are going to see. So, as density is large the survival multiplier goes down. Density is low then everything survives because on the topmost y-axis it is 1. So, the dots you see on the lines are the actual points. So, when I simulate if a density is between any two points it is going to interpolate. If it is outside the range it is going to extrapolate the last two points ok. I hope everybody knows how to interpolate and extrapolate. Good thing is you do not need to do it Vensim will do it. We have zoomed in view of the same graph along with all the numbers of inputs and outputs ok. We will model this in Vensim using what is called as a lookup function. So, but this is just one parameter within the entire model we have the remaining set of model which anyway we have to model to make our life easy. Partial model of it is already available please download it. So, already downloaded it open it. This is entire equations underlying it, but the model which your downloader will not have any equations in it please write the equations as per what is shown here. Again here the stock is shown as a d of rad pop. So, differentiating it based on birth rate and death rate. So, the stock here is represented in this format. So, using this equations and the constant parameters are also given you may go ahead and write the equations. Except for the last one infant survival multiplier which is a function of the density. Density is nothing, but population divided by area. Do not write anything there do not need to open it because I have not shown you how to enter a table function. So, you finish all the other equations. You do not need to go the equation of infant survival multiplier, but for all the other variables ensure equations are written or the constant value is mentioned. The initial rad population is 10, initial rad population is 10 that is also mentioned. So, first before we go into that let us just quickly look observe the model. So, that we can get a feel of the kind of behaviors of a population of at a birth and death rate very simple model. So, either we need to get an exponential growth or we are going to get a exponential decay. However, there seems to be some population density affecting it. So, we are going to get expect what kind of behavior as a carrying capacity of the system affects my birth rate. Let us assume infant survival multiplier is 1 initially. So, if you look at the equation birth rate will be rad population into sex ratio which is 0.5 multiplied by rad fertility which is 0.4. So, and so, rad population is 10 to 10 into 0.5 into 0.4 and on the right side we have death rate which is 22 months which is greater 10 by 22 or 10 into 0.5 into 0.4. So, birth rate is more than death rate right. Assume infant multiplier is 1 anything complicated we just what do we do analytically we assume it is 1 and get rid of the multiplication effect which is there infant survival multiplier is 1. So, its effect is made redundant. So, birth rate is more than death rate. So, we need to get exponential growth correct. The previous slide we are seeing that as a density becomes larger my infant survival multiplier is going to go down to up to 0.1 from 1 it is going to 0.1. So, the same model if I multiply it by 0.1 at the extreme. So, that means, my death rate at that point is going to exceed my birth rate. Once death rate exceeds birth rate then I am going to get a exponential or goal seeking behavior. So, what is the final behavior? It has to be a shift initially we just saw if it is 1 I am going to get exponential growth but later final stage it is going to get death rate is more than birth rate goal seeking behavior. So, that means, it has to be an a shift behavior right. So, why I am saying that is that is important because if you have to construct this infant survival multiplier that is what we will do initially infant survival multiplier will be large because birth rate is larger than death rate and initially there is no restriction. So, it can keep changing. Later when the density is going to reduce my birth rate that will indicate it by increasing the infant or reducing infant survival multiplier from 1 to a very small number logically if it becomes 0 then death rate is very high. It has to come close to 0 or whatever is the value. So, this is how we will argue to figure out what kind of shapes we can get and think about it not many other shapes are possible in case of such how density affects it not many other shapes are possible because you have first values are 1 up to the density up to some point it will be 1 when below with some density it will be some small value. So, how many shapes of line can we draw connecting these 2 points not many ok. So, that is the logic it is going to work. So, to input it open the infant survival multiplier dialogue box and do step 1 first then step 2 then step 3. Then step 1 you have to change the drop down to say with look up and in step 2 ensure rad population density is inside that with look up and then 3 click as graph got the next dialogue box ok. Next dialogue box you need to enter the numbers the input output combination we gave the few slides earlier I have just replicated it here or reproduced it here. So, you just manually type it 0 then write output 1 enter this input and output what I have shown in pink circle you can set that y max and x max. So, what you can start saying the graph similar to that the x axis goes in the increment of 0.0025, 0.0025, 0.005, 0.0075, 0.1 it goes in increment of 0.0025 is increment size in x axis y axis goes kind of non-linear you have to see it. After you finish do not click ok just keep the screen open do not click ok. I am sure you have written the few values remember as you go down you have to add there will be two entries with 0.1. So, starting there are two entries with 1 as you go bottom there will be two entries with 0.1 on the y axis I just scrolled it. So, if you go look at the scroll bar here it is starting with 0 here, but it goes only to 0.025 actually it goes up to 0.0275 the scroll ball went down to add one more point you have to just use this new area. Any reason why we are doing that why we have two values at the end with 0.1. So, that if x axis there is a population density grows more than that still my infant survival multiplier will be 0.1 else it will extrapolate the last two values and it further decrease. If you do not want it then we need to ensure that it extrapolates correctly. So, you got this finished it then you can click ok and click simulate and see the results. Those are simulating I hope you get a shaped curve observe the inflection point. What is the point of saturation of the population? From 10 where does it saturate? What kind of behaviors that occur? You can observe that, you can observe how birth rate changes, you can observe how death rate changes. So, you can observe this when does population reach stability, what is stable size, when is the inflection point? We can try a few what if scenarios also. What if initial rat population is 0? Then we do not expect any dynamics right which is multiplied by 0. So, no dynamics occur. What if initial population 150 rats or 250 rats? What kind of dynamics occur do you still get as shaped? Just check for 150 and 250 rats population to see whether we will always get a shaped or is it beyond inflection point. And a stable population the same in all the cases or is it different? The stable population affected with initial population you can simulate it. So, what we have seen is another way to simulate a shaped growth. We had seen a few ways to simulate a shaped growth. So, in this case in a shaped causal link there is a net rate affecting my stock, but then the stock affects the on the carrying capacity in turn influence the net birth rate which becomes a negative feedback loop which becomes a dominant loop and net birth rate goes down. See here we have captured how that relation is affecting the net birth rate in a non-linear fashion explicitly. The non-linear function is shown explicitly. In the examples that we studied I think we had a simple relation for population where it just went from to 1 to 0 to just simulate it. The shape of the curve is quite similar except it is more realistic now where it goes from 1 to 0.1 in a non-linear fashion. So, this is how we built various kind of non-linearities within a simulation model including capturing the stable function. Many times you will find it quite useful because the relationship between the many variables may not be explicit like if I want to model the effect of workload on the amount of hours worked on the fatigue. In those kind of scenarios I might actually need to think logically and come up with a non-linear kind of a graph based function instead of analytical expression. So in those cases this kind of models are quite useful. So, let me stop here. Thank you.