Hi,
I want to set "fluctuated price1" to be "1" as long as "randomized prices" are not zero in three-consecutive time.
(otherwise set "fluctuated price1" to be "0" )
What shall I do?
I attach the model.
three consecutive values
three consecutive values
- Attachments
-
- example_vensim.mdl
- (1.18 KiB) Downloaded 348 times
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: three consecutive values
I don't understand what you want to do.
Do you want to take a random sample and make it last for a certain amount of time?
Do you want to take a random sample and make it last for a certain amount of time?
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: three consecutive values
If you want to test for price = 0, that event is incredibly unlikely, even if the mean of the distribution is 0, and three in a row will probably never happen, even if you run the model for years. Your Normal distribution is truncated at 1, and in any case 0 is 14 standard deviations below the mean, so it will definitely never happen.
However, if you change the distribution and the test so that there's some likelihood of price<=0, you could count those instances with a stock:
However, if you change the distribution and the test so that there's some likelihood of price<=0, you could count those instances with a stock:
/*
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: three consecutive values
Great!.
Thanks Tom.
Cheers,
Bahri
Thanks Tom.
Cheers,
Bahri