multiple iteration in simulation

Use this forum to post Vensim related questions.
Post Reply
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

multiple iteration in simulation

Post by adjie »

Dear all,

sorry my previous massage is in welcome and general information section. the massage is the same as before, that is;

i do really need some helps from the forum. i use several random formulas in my model. when i simulate the model, i think, the model will pick different values in random formula. is that true? if yes, how can we become confidence with that result since it is only simulate by single iteration. some time, the model can pick the maximum value while other times will pick the minimum values. it is important particularly when i want to compare one simulation to others. will it be consistent picking the same values on random formulas for each of simulation? i was thinking to use multiple iteration in simulation. but i can not find the way to do it in vensim. do you know how to do it? fyi, I can do multiple iteration in sensitivity test but not in simulation or simultaneous simulation.

look forwards for your kind responses and ideas.

thanks.
Administrator
Super Administrator
Posts: 4842
Joined: Wed Mar 05, 2003 3:10 am

Re: multiple iteration in simulation

Post by Administrator »

The easiest way to do it is to create a constant called NOISE SEED. Now in your random functions, use this noise seed constant.

Next run some sensitivity tests, and modify noise seed which will in turn change the random number generation for all other functions in the model.
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
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: multiple iteration in simulation

Post by adjie »

Dear administrator,

thanks for your prompt response. but, i have some further questions. how can i make the NOISE SEED. so far, i use random normal formula. and the seed is the default value from the software. it is 0. if yes, when i want to compare between several simulations with some changes on the variables, i still find inconsistency on the results.

or

do you mean in sensitivity test? there is NOISE SEED in sensitivity simulation setup tab. i also use the default value (1234). can you give me the explanation on this? for example, what is the different when i use 1 compared to 1234 value?

another question is; for vensim, is it possible to make multiple iterations in one simulation mode ?

thanks and look forward for your responses.

best regards,
adjie
Administrator
Super Administrator
Posts: 4842
Joined: Wed Mar 05, 2003 3:10 am

Re: multiple iteration in simulation

Post by Administrator »

In your equation, change the 0 to be NOISE SEED instead (NOISE SEED it just Vensim constant, you could call it RN SEED or anything else). For example, if I have the following samples,

uniform sample = RANDOM UNIFORM ( 0 , 100 , 0 )
normal sample = RANDOM NORMAL ( 0 , 10 , 5 , 2 , 0 )

change them to

uniform sample = RANDOM UNIFORM ( 0 , 100 , NOISE SEED )
normal sample = RANDOM NORMAL ( 0 , 10 , 5 , 2 , NOISE SEED )
NOISE SEED = 0

Now when running sensitivity tests, you can modify NOISE SEED and run many simulations to see the effects. You can even run in SyntheSim and modify NOISE SEED there as well.

Does this help?
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: 3999
Joined: Wed May 24, 2006 4:54 am

Re: multiple iteration in simulation

Post by tomfid »

Actually you don't need to do this - as long as the last argument of your RANDOM function (the stream ID, often called a seed) is set to 0, changing NOISE SEED will change the random stream, even though it is not directly an argument to the function. On the other hand, if you have multiple noise inputs and you want to control them independently, you can give them unique IDs. For example:

weather = RANDOM UNIFORM ( 0 , 100 , weather seed )
economy = RANDOM NORMAL ( 0 , 10 , 5 , 2 , economy seed )

would permit you to vary the realization of randomness in the weather and economy separately.

One other thing to be aware of is that streams with the same ID interact, so if you vary the sampling of one variable in a stream, it will affect the realization of other variables using the same stream. See the 'economy' variables in the attached model for an example.
noise seed.mdl
(2.76 KiB) Downloaded 1040 times
Tom
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: multiple iteration in simulation

Post by adjie »

thanks for your kind helps. but, i am still have this issue after following your suggestions. i have changed the seed from 0 to a variable called seed. then i put 1 for the value of seed (as a control variable). but, the results make no different. there is inconsistency on the results. for example on the inundation height variable. when we do reforestation, the inundation will be logically down consistently. but on the pictures (as i attached them), they show us a little bit strange pattern. in Pic A, the red line is as a result of reforestation. so, majority of inundation pattern through week 1000 is lower than the base line (blue colour). sorry, i mismatch them. but, the blue line show us the maximum on week 700 while the red line shows it on week 800. when i change the random formula by using the variable of seed. the result is like in Pic B. there is an inconsistency of the results. the blue line have maximum value of nearly 1000 whil the red line is on week 150.

other, if i put 1 on the seed. what does it meant actually? is it one simulation ? when i put 2000, will it be considered as 2000 simulations?

thanks and look forward fro your responses.
Attachments
graphics.docx
(26.03 KiB) Downloaded 1108 times
Administrator
Super Administrator
Posts: 4842
Joined: Wed Mar 05, 2003 3:10 am

Re: multiple iteration in simulation

Post by Administrator »

Can you post the model so we can take a look? Graphs without the model itself are difficult to comment on, the model could have errors, or some other problem that is giving the results you see.

I do think the results look normal though. Changing the noise seed will result in different behaviour.

This post might help explain what the noise seed is (it does not mean 2000 simulations.
http://diydrones.com/forum/topics/noise ... t%3A207847
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
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: multiple iteration in simulation

Post by adjie »

yes. can i ask your email address? i prefer to go to the private rather than forum.

thanks for your help.
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: multiple iteration in simulation

Post by adjie »

sorry i miss some thing. i prefer to send the model to your private email rather than to the forum.
tomfid
Administrator
Posts: 3999
Joined: Wed May 24, 2006 4:54 am

Re: multiple iteration in simulation

Post by tomfid »

You can send it to vensim@vensim.com
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: multiple iteration in simulation

Post by adjie »

thanks for both of you (adminstrator and tom). i have sent the file to the administrator and have an adequate feedback. thanks a lot
Post Reply