one random shock

Use this forum to post Vensim related questions.
Post Reply
Bena.m
Member
Posts: 23
Joined: Thu Dec 23, 2021 10:32 am
Vensim version: PLE+

one random shock

Post by Bena.m »

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
Administrator
Super Administrator
Posts: 4680
Joined: Wed Mar 05, 2003 3:10 am

Re: one random shock

Post by Administrator »

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
tomfid
Administrator
Posts: 3868
Joined: Wed May 24, 2006 4:54 am

Re: one random shock

Post by tomfid »

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.
Bena.m
Member
Posts: 23
Joined: Thu Dec 23, 2021 10:32 am
Vensim version: PLE+

Re: one random shock

Post by Bena.m »

Thank you so much for this suggestion!
Post Reply