The use of 'TIME STEP' in equations
The use of 'TIME STEP' in equations
Hi, I'm trying to define the variable 'resident income growth rate' using the variable 'resident income.' Is it possible to use (resident income(TIME STEP)) * 100 in the equation to express the meaning of ((Resident Income - Previous Resident Income) / Previous Resident Income) * 100?
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: The use of 'TIME STEP' in equations
I'm not sure I follow what you are trying to do.
You definitely cannot use (resident income(TIME STEP)) * 100 to give the growth rate in the way you are thinking.
Can you upload your model and explain a little more?
You definitely cannot use (resident income(TIME STEP)) * 100 to give the growth rate in the way you are thinking.
Can you upload your model and explain a little more?
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: The use of 'TIME STEP' in equations
I am trying to recreate a SD model from a paper. In the paper, the researchers used this structure for one of the subsystems (I attached a screenshot of that SD model). There are only two variables ('resident income' & 'TIME STEP') leading to the variable 'resident income growth rate.' Unfortunately, the researchers didn't provide the equation for 'resident income growth rate' in the paper.Administrator wrote: ↑Mon Jul 24, 2023 8:22 pm I'm not sure I follow what you are trying to do.
You definitely cannot use (resident income(TIME STEP)) * 100 to give the growth rate in the way you are thinking.
Can you upload your model and explain a little more?
- Attachments
-
- 截屏2023-07-24 21.18.09.png (581.49 KiB) Viewed 4307 times
Re: The use of 'TIME STEP' in equations
How should I use <TIME STEP> in an equation?Xizhu He wrote: ↑Tue Jul 25, 2023 4:24 amI am trying to recreate a SD model from a paper. In the paper, the researchers used this structure for one of the subsystems (I attached a screenshot of that SD model). There are only two variables ('resident income' & 'TIME STEP') leading to the variable 'resident income growth rate.' Unfortunately, the researchers didn't provide the equation for 'resident income growth rate' in the paper.Administrator wrote: ↑Mon Jul 24, 2023 8:22 pm I'm not sure I follow what you are trying to do.
You definitely cannot use (resident income(TIME STEP)) * 100 to give the growth rate in the way you are thinking.
Can you upload your model and explain a little more?
Re: The use of 'TIME STEP' in equations
It sounds like you're trying to recover the value of a variable at a previous time step? This appears to be computing a growth rate or derivative?
You could write something like:
Previous Resident Income = SMOOTH(Resident Income,TIME STEP)
income trend = ( (Resident Income - Previous Resident Income ) / Previous Resident Income )/TIME STEP
If the behavior is not smooth, or this represents a perception process, TIME STEP should be replaced with a longer explicit time constant.
You might also consider the TREND function, https://www.vensim.com/documentation/fn_trend.html
I'd strongly encourage adding units.
You could write something like:
Previous Resident Income = SMOOTH(Resident Income,TIME STEP)
income trend = ( (Resident Income - Previous Resident Income ) / Previous Resident Income )/TIME STEP
If the behavior is not smooth, or this represents a perception process, TIME STEP should be replaced with a longer explicit time constant.
You might also consider the TREND function, https://www.vensim.com/documentation/fn_trend.html
I'd strongly encourage adding units.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: The use of 'TIME STEP' in equations
Thank you so much for your reply! I have some follow-up questions: I modified the structure of my model by adding a new variable 'previous resident income.' I input the equation for the 'previous resident income' and the equation of income trend for 'resident income growth rate'. But is there any way that does not require me to add a variable in the model? Can I somehow write both equations in the same equation box through formatting?tomfid wrote: ↑Tue Jul 25, 2023 9:43 pm It sounds like you're trying to recover the value of a variable at a previous time step? This appears to be computing a growth rate or derivative?
You could write something like:
Previous Resident Income = SMOOTH(Resident Income,TIME STEP)
income trend = ( (Resident Income - Previous Resident Income ) / Previous Resident Income )/TIME STEP
If the behavior is not smooth, or this represents a perception process, TIME STEP should be replaced with a longer explicit time constant.
You might also consider the TREND function, https://www.vensim.com/documentation/fn_trend.html
I'd strongly encourage adding units.
- Attachments
-
- 截屏2023-07-26 09.34.05.png (73.73 KiB) Viewed 4279 times
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: The use of 'TIME STEP' in equations
No, you'll need a separate variable. This is good practice anyway, we see too often users making equations far too complicated. Keep things easy and simple, others will be able to follow what you are doing, and you will find it easier to debug your model.Xizhu He wrote: ↑Wed Jul 26, 2023 4:47 pm Thank you so much for your reply! I have some follow-up questions: I modified the structure of my model by adding a new variable 'previous resident income.' I input the equation for the 'previous resident income' and the equation of income trend for 'resident income growth rate'. But is there any way that does not require me to add a variable in the model? Can I somehow write both equations in the same equation box through formatting?
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: The use of 'TIME STEP' in equations
Administrator wrote: ↑Wed Jul 26, 2023 6:45 pmNo, you'll need a separate variable. This is good practice anyway, we see too often users making equations far too complicated. Keep things easy and simple, others will be able to follow what you are doing, and you will find it easier to debug your model.Xizhu He wrote: ↑Wed Jul 26, 2023 4:47 pm Thank you so much for your reply! I have some follow-up questions: I modified the structure of my model by adding a new variable 'previous resident income.' I input the equation for the 'previous resident income' and the equation of income trend for 'resident income growth rate'. But is there any way that does not require me to add a variable in the model? Can I somehow write both equations in the same equation box through formatting?
I see! Thank you so much for your help!
Re: The use of 'TIME STEP' in equations
However ... the TREND function does essentially what I proposed, without requiring the extra equation.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/