Changing a random number each time period

Use this forum to post Vensim related questions.
Post Reply
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Changing a random number each time period

Post by miller2158 »

I cannot get a new random number at each time step. I downloaded the project_generator (http://www.ventanasystems.co.uk/forum/v ... php?t=2825). When I load this it creates a uniform random number for each time period, but my model creates a single value at time 1 and remains constant for the rest of the simulation. My variable is Auxiliary:Normal with the following argument [integer(RANDOM UNIFORM(0,max random, 0))].

I checked all of the settings between the example and my settings, but I can't find any difference.
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Have you changed the value of "max random"? If so, what have you changed it to?
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Post by miller2158 »

It is currently set at 100 to generate a 1% distribution for a decision at each time step.
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Can you post the model on here? Or just copy the offending parameters into another model and upload that?
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Post by miller2158 »

Here is the portion of the model
Attachments
random number model.mdl
(1.27 KiB) Downloaded 192 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

If I simulate the model you posted it generates a 101 points in a random sequence. Are you trying to use this in gaming mode?

[Edited on 2010-1-25 by bob@vensim.com]
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Post by miller2158 »

I just ran that small model and it generates a random number each period. This is a copy/paste from the model and both where run as simulations.

I originally had some game variables, but these were changed back to constants.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

The only thing that I can think of is that there may be an INITIAL(xxxx) function trapping a single random value.
Post Reply