question about the world3-3 model

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
Post Reply
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

question about the world3-3 model

Post by LAUJJL »

I have a controversy with someone about the world-3-03 published in the Vensim documentation. When applying the extreme condition test, at a certain time, all people from cohort 0 to 14 years old die in a semester (the time step), the maturation goes negative, which means that people from cohort 15 to 44 are getting younger!.
Joined two published models in Vensim, with both results in two tables in the population view.
One with the original formulation and the other with the changed formulation.
To force mortality to 2, in a time step one uses the reality checks tool.
If one forces the mortality to 1, by setting the proportion of population 0 to 14 dying in the time step to 0.5, the number of people maturing goes to 0, which is still impossible, about half of the population from the beginning of the period maturing.
If one changes the formulation
( ( Population 0 To 14 ) )
* ( 1
- mortality 0 to 14 )
/ 15
To
( ( Population 0 To 14 ) )
* ( 1
- (mortality 0 to 14 * time step))
/ 15
The result resists the test.
The second formulation seems correct too because:
The population that matures in the time step is equal to the population at the beginning of the time step less the people that died during the time step divided by the number of time steps included in the duration of the cohort.
People maturing during the time step = (population - (population * mortality * time step)) / (15/time step) = maturation 14 to 15 * time step
Maturation 14 to 15 = People maturing during the time step / time step =
(population - (population * mortality * time step)) / 15 = population * (1 – (mortality * time step)) / 15.
The formula is too dimensionaly consistent.
People maturing during the time step (person)= (population (person) - (population * mortality * time step) (person)) / (15 (year) / time step (year)) = maturation 14 to 15 * time step
To make the formula
( ( Population 0 To 14 ) )
* ( 1
- mortality 0 to 14 )
/ 15
consistent one is obliged to affect a 1/year dimension to the 1 value and a no dimension to the 15.
For what reasons? 1 is in fact dimensionless and 15 is the duration of the cohort in years.
Both models can be read with either Vensim or the Vensim player.
Who is right?
Best regards.
Jean-Jacques Laublé
Attachments
world3.zip
2 vpm published models in zip file
(1.19 MiB) Downloaded 791 times
gwr
Senior Member
Posts: 209
Joined: Sun Oct 04, 2009 8:40 pm
Vensim version: DSS

Re: question about the world3-3 model

Post by gwr »

Hello JJ,

what a coincidence: your post came almost at the same time Irene had posted a fundamental question on how to deal with two outflows from a stock:

http://www.ventanasystems.co.uk/forum/v ... f=2&t=4715

It seems that the answer to your question is twofold: There is first the fundamental issue of how reality checks are implemented and second there is the question on how to properly (= in a robust way) to deal with several outflows from a stock.
The reality check issue has been touched in our discussion regarding my post 'Dealing with Bigger Models':

http://www.ventanasystems.co.uk/forum/v ... f=2&t=4591

One has to be very careful with how the reality checks do check reality as they change the model that describes reality. What you are testing is the exogenous influence of something (maybe an epidemic) that will raise the mortality to 1. Now, can mortality be greater than 1? Yes, it can because it is a fraction of the population (0-14 yrs) that is present in the stock when it is calculated. So with mortality being 100% and some birth rate that is independent of the stock itself (it depends on the already matured population) there will still be a population be left. The "reality check" has to have some "real meaning" otherwise you are checking how the computer handles numbers...

If there is an epidemic that also affects the new born then you will have to include the birth rate into the death rate, e.g. deaths = f( population<14 , birth rate). Furthermore, you have to ask yourself what is happening? Obviously you assume that some real process kills the juveniles in one time step (being a model's instant). Obviously there can never die more juveniles then there are present. So the maximum death rate at any time is (note that I am dropping the indicator for the age group as everything that follows only touches the 0-14yr old population):

maximum possible death rate = birth rate + population/Time Step

Thus the robust formulation for deaths would be:

death rate = MIN ( maximum possible death rate , intended death rate )

If you override this by reality checks then again you are testing the computer's numerics but not the model's ability to depict reality.

The second part of your problem is the robust way to handle multiple stocks and regarding the units it is intricate:

The structure shown is an aggregation of lets say 15 separate stocks containing adolescents. The death rate will affect all of these, the rate to mature only the people in the last container. This is burried in the formulation. But we have the implicit assumption that it takes 15 years to mature and that each year-cohort is equally distributed thus in any year

population(t-1) / 15 years x 1 year [people!] will have matured and
death rate x 1 year [people] will have died

so the fraction of people maturing being affected by dying is 1/15 - notice that this 1/15 is dimensionless as we have divided people by people. (while maturing is people / time to mature). So the death rate affecting the maturing people is 1/15 x death rate. With this we get the following robust formulation:

maturing = MIN ( population / time step - death rate , MAX ( 0, population[people] / 15[years] - 1/15 x death rate ) )

The units should fit and the formulation should be robust. The abstraction lies in SD and flows. While birth rate and maturing rate are slow flows, the death rate might be tremendously high and can in the extreme be a pulse that eradicates everything. I personally avoid using the time step in the equation for the 'intended (natural) flow' and find the use of MAX/MIN better - as the time step is not a natural construct and in the case of the 'extreme flow' it cannot persist longer than a time step in 'reality'.

Kind regards,

Guido
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Post by LAUJJL »

Hi Guido.

As you say, reality checks should be strictly behavioral, and have nothing to do with the model and its equations, contrarily with what is exposed in the paper about RC joined in preceding threads and proposes to build RC from the equations. One sees then that RC are very personal and show how somebody sees the reality and his concerns about it.

The reality check in the model is not intended to check anything, but the objective is to generate a pulse of the mortality during a time step, while preserving the mortality values before the pulse, which is not possible by overriding the mortality value with a pulse in the synthesim. When one overrides it with the synthesim, one has to deliver the last value of mortality and this value is supposed to be constant from the beginning of the simulation.

So the RC does not check anything but generates a run where the mortality pulses during a time step without affecting preceding values. To generate the run one has to click on the RC button and chose the constraint and make the test inputs active and click on the Sim Active button to generate the run.

So the formulation I propose is still correct, in one supposes that the birth rate includes its own mortality during the birth period. So I test the hypothesis that the new born are not affected by the epidemic, which can easily be imagined, supposing that the cohort has been exposed to a virus in the preceding period, that the period of incubation takes several months and that the antidote has been discovered just before the period, permitting to save the new born, but not the rest of the cohort.

If one wants to test that the new born are affected too by the epidemia, one has to force a pulse to the birth rate.

This is exactly what should happen if there is an epidemia where all people die, except the new born. You say that the death rate should include the birth rate. It depends if the birth rate includes or not the mortality of the new born. In the original model one can imagine that the modeler has already included the new born mortality in the model. The original model can then not include the birth rate in the mortality. The mortality is then the mortality of all people in the cohort except the new born. It is not the same with the maturation where the mortality of the people is included in the maturation equation.

About your formulation it would be a good idea to change the formulation of both the death rate and the maturing rate and force the maturing rate to 2 for example with a ½ year time step and see if the results generated seem reasonable, and that one can verify them as it is possible to do with my own formulation. Use the table that I have included in the population view to see the results.
Your formulation may be valid, but nothing replaces the verification by simulation with the proposed equations.

Can you post the model with your formulations and the run generated?
I have not done it, being not sure of your formulations.

A remark: I have posted the same message to the SD forum where Bob Eberlein seems to prefer the original formulation for some reasons I do not agree with.
Anyhow, nobody seems interested by the issue, and I nearly did not answer to your post, having decided not to lose anymore time on a subject that nobody cares about, whether it is the subject that has no interest or that my suggestions do not interest anybody. I have other things to care about.

Best regards.

JJ
gwr
Senior Member
Posts: 209
Joined: Sun Oct 04, 2009 8:40 pm
Vensim version: DSS

Re: question about the world3-3 model

Post by gwr »

Hi JJ,

ok, I am starting to see what you mean -- the formulation that I have provided will correct the flows by mathematical force using MIN and MAX functions -- in accordance to stock control as proposed by Sterman and many others. Your formulation is more to the point as one indeed has to look ahead in calculating the rate of maturing. Actually this issue is addressed in the modeling guide when conveyors are touched (especially those with leakage):

http://www.vensim.com/documentation/mgu ... veyors.htm

(In many population models the immature stock of adolescents is modeled as a conveyor, e.g. the maturing rate is a fixed delay of the birth rate, in order to prevent that by perfect mixing a fraction of the new born is already maturing in the next time step.)

I have enclosed a simple model with a much narrower boundary as the worl 3 model has too much clutter in it that is not important to the issue. I believe it sheds light on where the units come from (dimensionless vs. 1/year and the like): If you split the adolescent-stock into separate compartments for each age group you will in the case of the world 3 model end up having 15 stocks connected by aging flows. The fractional aging rate would be: 1/year as everyone alive is aging at a rate of 1. This aging chain is hidden within the stocks accumulating several age groups. The only aging flow that is shown then is the maturing flow. It will be (1/15) x adolescents x 1/year. Where the dimensionless fraction gives the number of adolescents in the 14 to 15 yr compartment.

The looking ahead formulation for maturing is robust with the RC Step Check that you are proposing. But I have noted some issues regarding the RC Check - maybe you can help out, as I figure there might be bugs in Version 5.11A that I am using:
  • When I set the multiplier in the RC STEP CHECK to 0 the test will fail while at 0.001 it will succeed. That does not make sense, does it?

    Code: Select all

    maturing >= RC STEP CHECK( 
    
    		{grace} 0 , 
    		{basis} maturing , 
    		{mult}  0.001
    		
    		)
  • The test signal I am generating will cause the mortality to step to 1/Time Step for the duration of Time Step starting at RC Start Time:

    Code: Select all

    mortality=
    
    	RC STEP( 
    
    	{basis} 	mortality, 
    	{mult} 		Multiplier for Pulse/TIME STEP ,
    	{start}		RC START TIME ,
    	{duration}	TIME STEP
    	
    	)
    When I simulate this using the RC Check tool (Highlighted) then the pulse is shown in the graphs correctly but the rate of maturing will not recover. As it should return to the base value after the test this does not make sense either. Compare this to using SyntheSim ovrriding the normal behavior py a pulse starting at time 10 from 0.005 to 2 for the duration of 0.5 (or whatever time step). Here to rate of maturing correctly recovers.
  • Whatever option I choose, I will not get any graph shown in the RC Control window.
I am curious to learn about your experiences in this regard.

Best,

Guido

PS: I have not proposed to include the birth rate in the mortality -- this is just an option and the most general case.
Attachments
SimplePopulation.mdl
(7.94 KiB) Downloaded 644 times
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: question about the world3-3 model

Post by LAUJJL »

Hi Guido

I have not much time anymore to spend on this model.

About looking ahead in the formula, the original formula does it already because it uses the mortality in the maturing equation.
To avoid using the mortality one must go to a very small time step. See the discussion in the SD forum about the subject.

About the weird behavior of the RC, you must realitze that there are some bugs in the reality checks that have probably not been corrected.
See my remarks about the RC in the thread about preferences in Vensim and in other threads.
In particular, the rc step must be used with care, as it takes as value for the base, the value calculated in the preceding time step.

I advice you experiment a lot with the different RC so that you can find the bugs and some workarounds.
Now that I have identified the different RC problems, I always find some workarounds.

You must realize too that working cleverly with the RC, requires a lot of practice and is not straightforward. I do not know even if as a consultant, it is interesting for you to use such a tool, that is very time consuming, requires a continuous participation of your client and a level of rigor that maybe the client is not looking for or able to appreciate.

This is probably one of the reasons, RC are very seldom used. I have never seen any published model with RC. This is rather sad, because once one has some practice, it is a very effective tool to increase the quality of models and avoid bugs which must pollute most of the medium to big models and even small ones.

Best regards.
JJ
gwr
Senior Member
Posts: 209
Joined: Sun Oct 04, 2009 8:40 pm
Vensim version: DSS

Re: question about the world3-3 model

Post by gwr »

Hi JJ,

sorry to bother you with this - but as your thread here was still fresh I have quite naturally assumed differently.

Could you please give me the link to the previous thread on the forum that you are refering to?

From the formula:

maturing = population x (1 - mortality x time step) x 1/15

I would have assumed that differences disappear with a bigger time step, since for time step = 1 the formula converges to the orignial one for a proportional split rather than with a smaller time step.

The whole issue of course arises since it is not possible to have have everybody die before aging sets in, thus the need to look ahead.

Anyhow, I would very much like to see the thread you are refering too and I will post the RC issue in the Vensim forum as this is an issue and the RC Checks are a unique feature of Vensim. I am already working around other things to have things work out ... I would not like to do it too often.

Kind regards,

Guido
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: question about the world3-3 model

Post by LAUJJL »

Hi Guido

I talked about two links.

The first is the thread in the forum of the System dynamic Society that you probably know
http://www.systemdynamics.org/forum/vie ... f=13&t=237

The second is about different remarks that I have posted to the Vensim Forum we are in in the Vensim threads and that you will have to find by yourself, browsing it with my name LAUJJL as the author reference. These remarks have been mainly posted this year and maybe the last one. I posted
too some propositions to the Tom Fidderman thread about the wished Vensim improvements.

About the formula (see the SDS thread mentioned above) you can use the original one with a time step of 1. Just because mortality * 1 = mortality. You can too totally ignore the mortality, not looking ahead, if you choose a very small time as in differential equations.
The formula then becomes population / 15 and this is all. You do not care anymore about the mortality that becomes marginal compared to the other data in the formula. This formula is right at the condition that you choose a sufficient small time step. I think that instead of worrying it is better to chose the equation with the time step included which is valid whatever time step choosed.

RC is a good feature to improve the robustness of models but its use depends on the quality demand from the end users and their ability to judge the quality of the models they use.
Best regards.

JJ
Post Reply