question

Paul G8 avatar image
-1 Like"
Paul G8 asked Phil BoBo edited

Is this a good process for changing seed number in manual model runs

I'm aware of how to set up the model to be controlled externally, and how to deal with the experimenter, including which seed it uses normally in manual runs ("Repeat Streams of Replication"). What Im looking at is a merge of the two if the experimenter wasnt useable.


Since there isnt a scriptable way of accessing the manual run seed number setting in Experimenter (the dropper at least doesnt show any settings when using it) - I wanted to see if there was a way of doing it with "randInit()" and "getStream()" at say, onModelOpen, and then letting the rest of the model do its thing. Eg.

int streamEg = getStream(current);
randInit(streamEg, <seedNumVariable>);

getStream(current) from the onMoelOpen errors out.


On a related point - would any call to random stream even work in a model being controlled externally - assuming it was being run via a batch file on an AWS instance where it wouldnt necessarily have a licensed version of the program?

FlexSim 22.1.2
experimenterexternal control
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo edited

If you want to programmatically set the replication number that the streams will use in a regular non-experimenter run, you can set a node in the Tools folder before resetting and running your model:

set(node("MAIN:/project/environment/settings/randomrepeat"), 1);
treenode repnrnode = assertsubnode(node("MODEL:/Tools"), "randomrepeatrep");
repnrnode.value = 2;

This is the value that the Experimenter UI sets.

This will only work with a valid FlexSim license. Without a license, the random streams are locked to a particular default seed. Each FlexSim instance will need to be licensed when using the method above.

When using the Experimenter's Distributed CPUs feature, only the FlexSim instance running the experimenter needs to be licensed. The cloud nodes running replications for that experiment will be licensed via the experimenter.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Paul G8 commented
Use a licensed version of FlexSim to give jobs to the AWS instance via the webserver interface.
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Paul G8 avatar image Paul G8 commented ·

Sorry - for some reason I had it in my head that the Flexsim version installed on the webserver didnt require a license. To clarify is that laso the case if Im just connecting to other computers on the local network via Experimenter too?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Paul G8 commented ·

The requirements for the remote computers are listed here: Running Jobs in the Cloud

0 Likes 0 ·
Paul G8 avatar image Paul G8 Jason Lightfoot ♦♦ commented ·
Thanks. So running cases via the experimenter only needs a runtime license (that includes machines accessible via AWS). Running a model directly via the webserver or from the commandline will need a license.


So, assuming licensed installs of FlexSim, will the above code actually work for altering the seed setup in much the same fashion as the experimenter would do it?

0 Likes 0 ·