About random seeds

192 views
Skip to first unread message

Yi Li

unread,
May 16, 2016, 1:13:08 PM5/16/16
to Jaamsim Users Discussion Group

Hi Harry,

 

My model includes a probabilistic distribution.

 

I ran the model for several times, with the same RandomSeed and GlobalSubstreamSeed. The same result was obtained for each run. So, the same RandomSeed and GlobalSubstreamSeed generate the same result. It is understandable, because of the same random seed specified by both parameters.

 

If we want to run the model with different RandomSeed and GlobalSubstreamSeed, we just change the values for both manually at GUI? (Assuming 100 different sets.) Or, any other efficient way?

 

Regards

Yi

 

Harry King

unread,
May 16, 2016, 1:45:06 PM5/16/16
to Jaamsim Users Discussion Group
Yi,

You only need to change the GobalSubstreamSeed for each replication - it will give you a different random sequence for each random generator in the model. The purpose of the GlobalSubstreamSeed input is to avoid having to change each individual RandomSeed input in the model.

You can generate all 100 replication with a single input file and execution of JaamSim. Use the inputs under the Multiple Runs tab for Simulation. Section 13.5 of the User Manual describes how to use these inputs. If you just want to make 100 replication of a single model, then you can set the input to the GlobalSubstreamSeed to the expression [Simulation].RunNumber, and set the inputs to the RunIndexDefinitionList and EndingRunNumber keywords to 100.

Use the RunOutputList keyword for Simulation to generate a table of outputs for the replications that can be opened with Excel.

Harry

Yi Li

unread,
May 16, 2016, 4:37:16 PM5/16/16
to Jaamsim Users Discussion Group

Thanks Harry,

 

RunOutputList seems to be problematic.

 

I input [VesselsFromDownstream].NumberProcessed into RunOutputList. (VesselsFromDownstream is an EntityGenerator.) Multiple Runs were performed (two runs), as you described.

 

The resultant .dat file only provides the following information:

[VesselsFromDownstream].NumberProcessed

SI

 

The .dat file is supposed to provide two rows, each showing a NumberProcessed. However, no such information is found.

 

Regards

Yi

Harry King

unread,
May 16, 2016, 4:58:18 PM5/16/16
to Jaamsim Users Discussion Group
Yi,

The error handling for RunOutputList is not very good in the present release. The next release will have an improved version.

It looks like you have set the RunOutputList input without setting the UnitTypeList input. These two lists must match. You must set the UnitTypeList input before the RunOutputList, so the first step is to clear your present input. You have specified just one output, which is dimensionless, therefore your input to UnitTypeList should be { DimensionlessUnit }. Attach your input file to another post if you get stuck.

Harry

Yi Li

unread,
May 16, 2016, 5:49:14 PM5/16/16
to Jaamsim Users Discussion Group
Thanks Harry.

Yes, your suggestion works.

Firstly, clear RunOutputList;
Secondly, specify UnitTypeList; and
Lastly, specify RunOutputList;

It did not work if we specify RunOutputList first. This may be a challenge for people who don't know it. Hope this part can be improved in the next release.

Regards
Yi

Harry King

unread,
May 31, 2016, 10:20:01 PM5/31/16
to Jaamsim Users Discussion Group
Yi,

The problem you observed with the RunOutputList keyword has been fixed in release 2016-12. Any mismatch between the UnitTypeList and the RunOutputList will now be detected when either inputs are entered.

Harry

Yi Li

unread,
Oct 27, 2016, 3:05:37 PM10/27/16
to Jaamsim Users Discussion Group
Thanks Harry.
Reply all
Reply to author
Forward
0 new messages