Page 193 - DCAP601_SIMULATION_AND_MODELING
P. 193
Unit 11: Design and Evaluation of Simulation Experiments (I)
To create a Simulation Experiment Notes
1. In the Projects view, right-click the model you are working with and choose
New|Experiment from the popup menu. The New Experiment dialog box is displayed.
2. Choose Simulation in the Experiment Type list.
3. Type the name of the experiment in the Name edit box.
4. Select the main object for the experiment from the Main active object class (root) drop-
down list.
5. If you want to apply model time settings from another experiment, leave the Copy model
time settings from check box selected and choose the experiment in the drop-down list to
the right.
6. Click Finish.
General Properties
1. Name: The name of the experiment.
!
Caution Since AnyLogic generates Java class for each experiment, please follow Java
naming guidelines and start the name with an uppercase letter.
2. Main active object class (root): Using the drop-down list, choose the major active object
for the experiment. The instance of this class will play a role of a root hierarchical tree of
active objects in your model.
3. Ignore: If selected, the experiment is excluded from the model.
4. Random number generator: Here you identify, whether you want to initialize random
number generator for this model randomly or with some fixed seed. This makes sense for
stochastic models. Stochastic models require a random seed value for the pseudorandom
number generator. In this case model runs cannot be reproduced since the model random
number generator is initialized with different values for each model run. Specifying the
fixed seed value, you initialize the model random number generator with the same value
for each model run, thus the model runs are reproducible. Moreover, here you can substitute
AnyLogic default RNG with your own RNG.
5. Random seed (unique simulation runs): If chosen, the seed value of the random number
generator is random. In this case random number generator is initialized with the same
value for each model run, and the model runs are reproducible.
6. Fixed seed (reproducible simulation runs): If selected, the seed value of the random
number generator is fixed (specify it in the Seed value field). In this case random number
generator is initialized with the same value for each model run, and the model runs are
reproducible.
7. Custom generator (subclass of Random): If for any reason you are not content with the
quality of the default random number generator Random, you can substitute it with your
own one. Just prepare your custom RNG (it should be a subclass of the Java class Random,
e.g. MyRandom), choose this particular option and type the expression returning an instance
of your RNG in the field on the right, for example: new MyRandom() or new MyRandom(
1234 )
LOVELY PROFESSIONAL UNIVERSITY 187