question

Chris Ligetti avatar image
0 Likes"
Chris Ligetti asked Jason Lightfoot commented

Are there Flexscript commands for starting an Experimenter run?

I have a model that will open in the background using command line options (similar to https://answers.flexsim.com/questions/21116/automatically-configure-and-run-a-flexsim-model.html). There were tips there for the flexscript commands to reset and run the model, however, I would really like to start an Experimenter run rather than using the go(); command.

Choose One
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.

1 Answer

·
Arun Kr avatar image
3 Likes"
Arun Kr answered Jason Lightfoot commented

Hi @Chris Ligetti,

To start an experimenter use.

applicationcommand("runexperiment");

Also, you can get more information from this link.

Regards,

Arun KR

· 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.

ShabDz avatar image ShabDz commented ·

Hi @Arun KR,

Where should I use this code? When add this to "On Model Open" or "On Run Stop" it doesn't work and the software crashes.

Please advise.

0 Likes 0 ·
karthik avatar image karthik commented ·

Hello @Arun Kr

This code is not working for me in 22.1.3 version.

Do I need to make any changes in the code for this version? if so please let me know what the updated code is.

Thanks in advance

Karthik

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ karthik commented ·

You now need to specify the job you want to run.

You can try this but know that the function_s call may not be supported in a future release.

treenode experimenter = node("/Tools/Experimenter", model());
treenode job= node("jobs/myJob",variables(experimenter));
function_s(experimenter, "run", job);


1 Like 1 ·

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.