question

Brandon Peterson avatar image
5 Likes"
Brandon Peterson asked Matthew Gillespie answered

How to tell if the simulation is being run by the user or the experimenter

I have a trigger that will execute at the end of the simulation run and display a message and stop the model for the user. However, if the simulation is being executed by the experimenter then I do not want to stop the model or display the message. Is there a variable, function call, or other method that I can use to tell if the simulation is being run by the user or the experimenter?

Thanks,

Brandon

FlexSim 16.1.0
experimentercodemode
5 |100000

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

Matthew Gillespie avatar image
6 Likes"
Matthew Gillespie answered

The view tree isn't loaded in an experiment run so you could check if it's there:

if(objectexists(node("VIEW:/active")))
5 |100000

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

Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered

You could use the Start of Replication trigger (on the Advanced tab of the Experimenter) to set a value on a node or in a table. You can then check that value later to determine whether you are in an experiment.

5 |100000

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

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.