I have a stock that is accumulating data per hour. How can I reset it at the end of some period?
I need to accumulate dollar savings per day to reach a monthly total, then use that total as an input to another part of the model. Therefore, at the end of every month I have to reset the savings stock to start accumulating the savings of the next month. Is this even possible? If so, how can I also store that monthly value to be used somewhere else in the model?
Any help is appreciated here!
Thank you!
How to Reset a Stock?
-
- Super Administrator
- Posts: 4592
- Joined: Wed Mar 05, 2003 3:10 am
Re: How to Reset a Stock?
This structure will reset the savings at time = 30. I'm sure you can adjust it to reset the savings at the end of each month.
Code: Select all
cumulative savings = integ( savings - end of month savings reset , initial savings )
end of month savings reset = if then else ( time = 30 , cumulative savings , 0 )
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