19
RANDOM BUILTIN FUNCTION IN STELLA RANDOM BUILTIN FUNCTION IN STELLA

RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Embed Size (px)

Citation preview

Page 1: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

RANDOM BUILTIN FUNCTION IN STELLARANDOM BUILTIN FUNCTION IN STELLA

Page 2: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

RANDOM(<min>, <max>, [<seed>])The RANDOM builtin generates a series of uniformly distributed random numbers between min and max.

RANDOM samples a new random number in each iteration of a model run.

If you wish to replicate the stream of random numbers, specify seed as an integer between 1 and 32767.

To replicate a simulation, all entities that use statistical functions must have seeds specified. Each entity using a statistical function should use a separate seed value.

Page 3: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Examples:RANDOM(0,1) creates a non-replicable uniformly distributed stream of numbers between 0 and 1.

RANDOM(0,1,147) creates a replicable uniformly distributed stream of numbers between 0 and 1.

RANDOM(0,10,12) gives a replicable uniformly distributed stream of numbers between 0 and 10.

RANDOM(10,13,12) gives a replicable uniformly distributed stream of numbers between 10 and 13.

Page 4: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Build the flower model of Chapter 6 to reproduce the output shown on the next page. Or get it from http://www.atmosedu.com/WSU/esrp310-550/PP/Flowers.STM

Page 5: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM
Page 6: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Now add a new converter for temperature and connect itTo the intrinsic growth rate. In the original model the intrinsic growth rate was fixed at 1.0. Here we’ll let Temperature be Random (20,30,999) and intrinsic growth rate = temperature/25.0We added the seed here so all simulations will look the same.

Page 7: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Paste your resulting graphs ofFlower area, growth, and decay here.

Page 8: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Try letting Temperature be Random (15,35,999) and intrinsic growth rate = temperature/25.0

What do you expect to be different for this new simulation? ANSWER

Page 9: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Paste your resulting graphs ofFlower area, growth, and decay here.

Page 10: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

NORMAL(<mean>,<std>, [<seed>])The NORMAL builtin generates a series of normally distributed random numbers with a specified mean and std (standard deviation).

NORMAL samples a new random number in each iteration of a simulation.

If you wish to replicate the stream of random numbers, specify seed as an integer between 1 and 32767. To replicate a simulation, all entities that use statistical functions must have seeds specified. Each entity using a statistical function should use a separate seed value.

Page 11: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Examples:NORMAL(0,1) gives a non-replicable normally distributed stream of numbers (mean=0, standard deviation=1)

NORMAL(0,1,147) gives a replicable normally distributed stream of numbers (mean=0, standard deviation=1)

NORMAL(5,1,12) gives a replicable normally distributed stream of numbers (mean=5, standard deviation=1)

NORMAL(10,5,102) gives a replicable normally distributed stream of numbers (mean=10, standard deviation=5)

Page 12: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Now let Temperature be Normal (25,5,999) and intrinsic growth rate = temperature/25.0

We added the seed here so all simulations will look the same and make it easier for your instructor to see if you got things set correctly.

Page 13: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Paste your resulting graphs ofFlower area, growth, and decay here.

Page 14: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Now let Temperature be Normal (25,10,999) and intrinsic growth rate = temperature/25.0

What do you expect to be different for this new simulation?ANSWER

Page 15: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Paste your resulting graphs ofFlower area, growth, and decay here.

Page 16: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Download the 3rd version of the MonoLake Model.http://www.atmosedu.com/WSU/esrp310-550/monoLake/MonoLake3.STMThis has a comparitive graph set for volume in the lake.

Page 17: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Run the model once to get a graph of water in the lake with a fixed export of 100.

Now run with export set to Normal (100,50,999) . Run this 7 times.(don’t expect big things here)

Now run with export set to Normal (100,50) . Run this 7 times

Page 18: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Paste your resulting graphs ofFlower area, growth, and decay here.

Page 19: RANDOM BUILTIN FUNCTION IN STELLA. RANDOM(,, [ ]) The RANDOM builtin generates a series of uniformly distributed random numbers between min and max. RANDOM

Comment on the advantages and disadvantage of the seed