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!
Population Example with Conveyors
-
- Senior Member
- Posts: 135
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
-
- Super Administrator
- Posts: 4670
- Joined: Wed Mar 05, 2003 3:10 am
Re: Population Example with Conveyors
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".
I've attached a version that does stop them going negative. Look at the equations for "young deaths" and "young adult deaths".
- Attachments
-
- convey4.mdl
- (6.55 KiB) Downloaded 158 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Population Example with Conveyors
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
JJ
-
- Senior Member
- Posts: 135
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: Population Example with Conveyors
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.
By the way, the outflows become negative in one calculation step.
Re: Population Example with Conveyors
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
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