How to use layout automation with the Experimenter?

How to use layout automation with the Experimenter?

guiroehe
Advocate Advocate
66 Views
9 Replies
Message 1 of 10

How to use layout automation with the Experimenter?

guiroehe
Advocate
Advocate

[ FlexSim 25.0.2 ]

Hello,

please see the attached model. In it I am trying to dynamically configure a model layout. However, I could not find a way to make it work properly in the Experimenter, despite it works manually.

Thank you for your help.

experimenterdropuserlibraryobject.zip

0 Likes
Accepted solutions (1)
67 Views
9 Replies
Replies (9)
Message 2 of 10

joerg_vogel_HsH
Mentor
Mentor

Some actions require a reset of a model. This is a not a default feature of a running flexsim model to be started from within again. But you can call an external program, scheduler or something similar to start a model by a comand line. This brings you near to your requested feature.

A classic approach is to build all possible transformations in one model and then you restrict connections in experiments.

0 Likes
Message 3 of 10

guiroehe
Advocate
Advocate
Hi, @Joerg Vogel ,

thank you for your answer. The example I sent uses the "onStartOfReplication" as the experimenter does not have an "onStartOfScenario" to be set before the replications are started to run. I believe that would solve the request, as the layout configuration could be done in that point of the execution flow, before each replication is loaded and reset, hence ensuring integrity of the model.

On a different attempt, I tried to call the layout configuration function during the onReset, but it also does not work.

The problem with external commands in this case is that it is not easily transferable to other users and it creates difficulties to keep all information in the same results file for output analysis (it is not impossible, just adds complexity to other users).

Any other suggestions I could try or that could make this work, please?

Thank you!


0 Likes
Message 4 of 10

joerg_vogel_HsH
Mentor
Mentor
As I said, there are actions that need a reset to compile the model. And this is actually doable after a model runstop, reset and start model run again. You are not the first person who tries to change a model layout while experiments are running. It gets even more complicated because an experiment is an instance of a static model copied into an additional cpu thread.

Some of very first versions of FlexSim were depending on an external visual studio compiler. Currently versions have an integrated compiler.

0 Likes
Message 5 of 10

guiroehe
Advocate
Advocate
Hi, @Joerg Vogel , I understand what you say. So there is no current solution for this, would you confirm? Thank you.
0 Likes
Message 6 of 10

jason_lightfootVL7B4
Autodesk
Autodesk
Perform your build/layout actions as part of parameter OnSet - then you can use those parameters in the experimenter to construct your scenarios.
Message 7 of 10

guiroehe
Advocate
Advocate

Hi, @Jason Lightfoot ,

yep, I tried that as my first method. But I faced a bug that is reported here (unfortunately not answered yet):

https://answers.flexsim.com/questions/175178/bug-parameters-on-set-event-is-triggered-before-va.html

That is what thrown me off to a path of trying the model's "onReset" and then the experimenter's "onStartOfReplication". If you have any Ideas about how to sort out the issue with the onSet, I believe it could work.

Thank you!

0 Likes
Message 8 of 10

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Here's an example of using a parameter to choose a Model Layout.

ExperimentLayoutScenario.fsm

Message 9 of 10

guiroehe
Advocate
Advocate
Thank you, @Jason Lightfoot ,

this is really helpful!


0 Likes
Message 10 of 10

guiroehe
Advocate
Advocate
0 Likes