question

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro asked Gui Vaccaro answered

How to use layout automation with the Experimenter?

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

FlexSim 25.0.2
experimentermodel layoutuserlibrarydropuserlibraryobject
· 6
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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 0 ·
Gui Vaccaro avatar image Gui Vaccaro Joerg Vogel commented ·
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 0 ·
Joerg Vogel avatar image Joerg Vogel Gui Vaccaro commented ·
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 0 ·
Show more comments
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Gui Vaccaro commented

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

ExperimentLayoutScenario.fsm


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

Gui Vaccaro avatar image Gui Vaccaro commented ·
Thank you, @Jason Lightfoot ,

this is really helpful!


0 Likes 0 ·
Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro answered
5 |100000

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