question

Hao Zhou avatar image
0 Likes"
Hao Zhou asked Hao Zhou commented

How to get scenario and replication number in child process

Hi,

In my module, I tried to log a bunch of raw data during model running. Those raw data are stored in a list of objects that are inherited from SDT. I have command to serialize those raw data to JSON file.

The problem is if I run experimenter and I want to serialize all the data for all the replications, and I want the JSON file to be named with proper scenario and replication number, how can I get scenario and replication number in those child processes?

Thanks, Hao

FlexSim 17.1.2
experimenterchild process
5 |100000

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

1 Answer

·
Phil BoBo avatar image
3 Likes"
Phil BoBo answered Hao Zhou commented

scenario:

maintree().find("project/exec/replications/CurrentScenario").value

replication:

maintree().find("project/exec/replications/CurrentRunOfScenario").value

They are also passed in as parameters to the Start of Replication, End of Warmup, and End of Replication triggers in the Experimenter.

· 1
5 |100000

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

Hao Zhou avatar image Hao Zhou commented ·

Thanks for the help Phil.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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