 Let us look at example 2, this is model on infectious diseases, total population region is initially 10,000 citizens, 10,000 media. New infections make citizens of susceptible population become part of infected population which initially has just one person, ok. So, then it is getting closer to the existing model that we already seen. The number of infections is infection ratio and contracted susceptible population infected population. Again the model is quite straight forward there and values of contact rate is given and infection rate value is also given and the fraction infected equals infected population over some of all other subpopulations. Let us see what are other subpopulations, right now it is only susceptible infected. If citizens of infected population die they enter statistics of diseased population else they recover, ok. Now, it is interesting now we have diseased population and recovered population. So, we are susceptible, infected, diseased and recovered. The recovering could be modeled as 1 minus fatality ratio into infected population divided by the recovery time. So, how long it takes to recover affects that. Suppose average recovery time and average disease time that is average time we take to die are both 2 and half days, the fatality ratio is 90 percent. Only recovered infected population can spread disease to susceptible population, ok. So, that means once people die they do not spread the disease. Assume they do not spread the disease further it is only the susceptible and infected population spread the disease and even recovered also I mean recovered infected spread the disease to the susceptible population, ok. So, let us look at what the model says and see whether we can spot the errors in the model. So, it is open, it is going on diseased population so you can take it, ok. So, this susceptible population, infected population, recovering population, diseased population finds susceptible the flow seems to be make some logical sense, infection moves them here, recovered moves them here and or here either one of the places. The infection was given as a product of contact rate, infection ratio, societal population, infected fraction. So, they are all seems to be connected there, infected fraction has given as a relation between this and this, infected population, total population so that seems to be fine. Recovery dependent on infected population, time and fatality ratio so that seems to be connected fine, deaths also is given similar relation that seems to be fine. Let us quickly look at model settings, final time 0.25 time step, weakest time units is weak, ok. So, quickly look at the equations, societal population is minus infection which is fine because there is only half flow, there is no inflow here. So, initial population, initial total population is minus infected initial value, initial total population is 10,000 which is fine, initial infected is 1 that is fine. The equation for infected is infection minus recovery minus death that is also fine, flows are fine. Recurring population initial is 0, ads recovery which is fine only inflows are there, diseased population again 0 which is fine and deaths plus which is fine. So, recovery time is just a product of all which is fine, value should be ok, yeah recovery rate is 1 minus fatality ratio and infected population recovery time that was the description given that is also fine, deaths is infected and fatality ratio. So, those who did not die recovered that is how it is modeled so that is say 1 minus fatality ratio is there, fatality ratio is given as 0.9 which is fine, ok. Recovery time was actually given as 2 and a half days, so it is converted into weeks or 2 by 7, 0.35 which is fine, contact rate is given as 20 per person per week which is fine, infection ratio is 0.75 which is fine which is what has given, ok. Model seems generally ok, let us run it, ok. Again I am getting floating point error, 3.75, the model seems structurally ok, let us see. So, recovery time was 0, recovery time was 0.35 per week, right, ok, let us go to model settings, yeah let us look at the time step, here time step is 0.25, where in our case the smallest time step was 0.35, recovery time, here it was 20 into 0.75, so here the time step the smallest was 0.35 while here the time step uses 0.25, so ideally we want time step is much lower than the smallest delay, right. So, that could be a cause for unusual dynamics. We can actually look at the dynamics, let us look at infected population, it is just going negative, large infected population or recovered population, everything just crashes and become negative, so susceptible population is increasing which also does not make any sense, there is no inflows, it is increasing, right. So, let us see whether time step is only true here, other seems ok. So, instead of 0.25, let us go to 0.0315, let us try that, let us click ok, let us run it, ok, error stopped at least, let us look at infected population, let me run it again, just 2, let me get rid of the data set, it is, I am getting some other data set, test 2 is loaded, so just delete the test 2, ID 001 is what we need to see, ID 001, ok, susceptible seems reasonable, I mean, infected seems reasonable, susceptible has to decrease and went to 0, that is also reasonable, recovering, showing classical shape growth, that is the dynamics we expect from this model. Deceased population again shows a shape growth, but 9000 people die and 1000 people recover, that is because fatality ratio is 0.9, so it makes sense, yeah. So, this is the overall dynamics and this is the only thing that seems to be error in this particular scenario, ok. Questions in this case? So, in this case the main error was caused by incorrect simulation time step, so one way to check it is, let us create a ID 002, so in this case I am going to change the simulation time step further down on 0156, because we do not know what simulation time step we choose, let us choose another time step to see whether there is any difference in the curves. So, I reduce the time step further, let us simulate again, let us look at infected population, there is a difference, that means, still we need to choose a more appropriate time step, such a way that we are getting a curve where it should not keep changing, whenever there is a change occur, that means, you have to keep reducing until you hit a time step where the change is almost nil. So, let us do one more, let us do an ID 03, let us look at settings, let us further reduce it to smallest one possible, at least in Euler method, let us run it, ID 03 shows the further small changes in the model. The first simulation time step to second it was from point, what is it? From point 03 to point 125, there is huge jump, there is further jump when we further reduce the time step. So, in these kind of population dynamics or rather the infection disease model, we should remember that the origins of the model came from, not from the system dynamics community, but from the epidemics modeling community who used differential equations to model. So, if you want higher accuracy to represent it better, then it is good idea to go for other integration types. So, instead of Euler method, a more powerful integration tool would be a Ranjiquita method, those who have done a numberical methods will know that Ranjiquita is higher accuracy. So, let us just change it to R K 4 and call it R K. Simulate it, let us see what happens, that gives us the most accurate results. This style, it seems to still improve based on earlier ones. So, in this particular case, we may want to prefer R K 4 methods and check whether different time scales also makes a difference as you will do the lowest time step where results does not change significantly. Let us look at the recovery population. So, these are things we would like to observe in the sense where the steady state value is exactly the same. So, steady state value is what we are interested in, it does not matter what we use, it all converges to the same 1000 as you can see right here, but the transient shape of the curve also does not change. So, the actual dynamics does not change, but we are interested in a more accurate results, the trajectory changes a bit. There is no large change, deviations in the dynamics. In this large deviation then there is a major error in your logic. So, you need to choose an appropriate time step, but once you get kind of similar results then if you want more and more accurate results, it is better to have a smaller time step with a better method of integration. So, starting point is similar, ending point is similar only the transient life will change. So, we saw two things, one first one was a small error in the flow equations, stock flow equations, second one had a floating point error because of time step selection. Let us look at a third scenario and see what kind of errors it can have.