Page 1 of 1

Population Example with Conveyors

Posted: Tue Jun 18, 2024 5:19 pm
by aliakhavan89
I was reviewing this example:

https://vensim.com/documentation/mgu09_ ... population

And I noticed that if I set the fractional birth rate to zero, the stocks become negative though close to zero. I could not understand the root cause and a potential solution to this. I have also tried smaller dt and made all parameters to the power of 2 to minimize integration and rounding errors. Can you please help me understand what's happening?

Thank you very much!

Re: Population Example with Conveyors

Posted: Wed Jun 19, 2024 9:37 am
by Administrator
There is no code in the model to stop the levels going negative.

I've attached a version that does stop them going negative. Look at the equations for "young deaths" and "young adult deaths".

Re: Population Example with Conveyors

Posted: Wed Jun 19, 2024 11:37 am
by LAUJJL
The use of a minimum in the 'young deaths' looks strange. Logically the maturation should calculate how many young people still alive are getting older; And this calculation should not be able to force the level to be negative. One must decide if the young people becoming young adults are still belonging to the young when they are maturing or are belonging already to the young adults people. This will change their death rate. To my opinion, the maturation equation may have to be changed to avoid the use of a minimum that may hide an error in the maturation equation. I am of course not sure of that but I have not the time to study that further on and propose a different formulation for the maturation equation.

JJ

Re: Population Example with Conveyors

Posted: Wed Jun 19, 2024 2:59 pm
by aliakhavan89
Thank you. But why does it happen? I thought that leakage was properly calculated and controlled within the conveyor function.

By the way, the outflows become negative in one calculation step.
Screenshot 2024-06-19 at 10.45.53 AM.png
Screenshot 2024-06-19 at 10.45.53 AM.png (149.78 KiB) Viewed 3816 times

Re: Population Example with Conveyors

Posted: Wed Jun 19, 2024 3:53 pm
by LAUJJL
The two errors in the maturations happen just before the levels reach zéro. Some formulation errors generate strange behaviour in limit conditions. There is probably an error somewhere in the model.
There is too an error in the population view of the world 3 model where the error disappears if one sets the time step to 1 year.
If in the model convey4.mdl you set the time step to 1. both errors disappear.

JJ