Hi there!
I have a time series of 50 years, and I want to have just one random shock during the entirety of these 50 years, is there any particular function that serves this purpose?
Thanks
one random shock
-
- Super Administrator
- Posts: 4680
- Joined: Wed Mar 05, 2003 3:10 am
Re: one random shock
You could do a random uniform sample at time = initial time that is in the range 0-50. That would give you the year when to have the shock.
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: one random shock
So something like:
shock time = INITIAL( RANDOM UNIFORM(0,50,0) )
output value = initial value + STEP( shock size, shock time )
If the shock is brief, you could use PULSE instead.
shock time = INITIAL( RANDOM UNIFORM(0,50,0) )
output value = initial value + STEP( shock size, shock time )
If the shock is brief, you could use PULSE instead.
/*
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: one random shock
Thank you so much for this suggestion!