Page 1 of 1

montecarlo

Posted: Tue Jun 20, 2006 4:55 pm
by rarf5
hi i am using PLE and i need to implement Montecarlo function

any knows how can i implement a similar discrete function using Vensim PLE???

i am processing the raings in Cusco - Peru of 35 year per month

any idea

thanks

Posted: Tue Jun 20, 2006 7:23 pm
by bob@vensim.com
Monte Carlo means making a large number of simulation with different constants, or noise seeds. This capability is in Vensim PLE Plus, but not Vensim PLE.

However, this is not a discrete function so perhaps I do not understand what you are trying to do.

discrete simulation

Posted: Thu Jun 22, 2006 12:01 am
by rarf5
ok i am simulating the rainings in Cusco Peru of 37 years and the 12 months (37x12 a lot of data=

and for every month i am using discrete simulating functions
it give good results the data is big from 200 0000 to 7 000 000 m3 and in every year the difference betwenn data is 250000 m3 to 1000000 m3

and the simulation is good, but maybe somebody knows anothe method to work this kind of data.

thanks

Posted: Thu Jun 22, 2006 12:27 pm
by bob@vensim.com
I have been to Cusco, and I have been rained on there. But I still don't understand what you are doing. If you read through Chapter 15 of the User's Guide this might help you.

Posted: Fri Jul 07, 2006 5:15 pm
by rarf5
HI

After viewing chapter 15.... some days ago

do you have an example of discrete probability functions ???

i feel it´s random lookup but i don´t know how to use it

Thanks in advance

Posted: Fri Jul 07, 2006 5:49 pm
by bob@vensim.com
I am not sure what you mean by a discrete probablity function. Perhaps you want something like RANDOM POISSON which only returns integers, not a continuum?

For the RANDOM LOOKUP discussion see thread 2785 in this forum:

http://www.ventanasystems.co.uk/forum/v ... php?t=2785

Posted: Fri Jul 07, 2006 6:28 pm
by rarf5
this is an example of discrete probability functions

i can count the estudent who arrive to the university in the next time of period (interval of classes):
Absolute Relative
Frecuency Frecuency
8:00 - 8:30 6 0.041
8:30 - 9:00 20 0.137
9:00 - 9:30 18 0.124
9:30 -10:00 20 0.137
10:00 -10:30 18 0.124
10:30 -11:00 21 0.144
11:00 -11:30 11 0.075
11:30 - 12:00 20 0.137
12:00 - 12:30 3 0.020
12:30 - 13:00 8 0.055
TOTAL 145 1.000

Relative Frecuency = Absolute Frecuency / Total

so the Relative frecuency is used as the probability some studen can arrive in some the interval of time

i used this kind of simulation in EXCEL using Menu Tools\Data Analysys
Random number generation and Distribution Discrete i select the cells with the interval and relative frecuency and i generate random number with out problems and the results are good.

so i need this in VENSIM

thanks for your help

Posted: Fri Jul 07, 2006 6:46 pm
by bob@vensim.com
Yes - just use RANDOM LOOKUP - see the thread I mentioned earlier for an example.

Of course if you are simulating activity over a day (say by the minute or second) then you should use RANDOM POISSON with a the mean arrival rate determined by the above table (12/hour, 40/hour, 36/hour etc.

Alternatively, and there is a good chance you will make a lot more progress in understanding a problem doing this, don't use any randomness and instead just use an arrival rate that is time varying according to the above values - either as data or as a lookup on time of day.