question

Arath Prieto avatar image
1 Like"
Arath Prieto asked Jason Lightfoot answered

How to connect 2 flexsim models in real time?

Hello everyone!!!

I am trying to connect one model to another in FlexSim separately. I don't know if there is any software, extension, plugin or something to synchronize both models. I would like to know if it is possible to do it in a separate simulation with another one without affecting the runtime and both simulations running at the same time.

Thank you.

FlexSim 23.1.2
connectionsruntimeconnectionsynchronizationseparately
· 4
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
What is the purpose of this? What communication other than synchronisation would you be passing between the two models?
0 Likes 0 ·
Arath Prieto avatar image Arath Prieto Jason Lightfoot ♦ commented ·

I have 2 complex models that I need to integrate.


They must run together doing their own tasks but in certain moments I need to transfer container with pieces from one to another, download them and return the container to the first. This task takes some time (simulation time, eg. 1 hour). Both models are performing other tasks in parallel, I can't stop the first and wait for the other to return containers.


Both models have different complexity and can run at different speed its own Flexsim instance. Suppose Model 1 runs at a maximum of 500X and Model 2 is running at 100X.

If I have to wait 1 hour (simulation time) in the second model to return the containers, how can I synchronize both models ?


Is there a way to both Flexsim’s can connect internally to synchronize between instances so both runs at same speed executing their own logic ?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Arath Prieto commented ·
FlexSim has the communication hooks for you to be able to communicate between the two models and develop something that would attempt to keep them aligned but even if you get that to work, you'll be constraining the fast running model to the speed of the slower one and so wouldn't gain very much performance. If you're doing replications you're better having one model and increasing the number of parallel replications by changing hardware (more memory/more cores).

If you are able to predict key events that cross between the models then you could fast run to those but often times these events emerge in the model and you discover that one has already gone past that event time. This topic has been the subject of many papers over the years about Time Warp Simulation for multicore models, which last I heard involves rolling back to a restored state before continuing - something that FlexSim doesn't currently support.

1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @Arath Prieto,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered
FlexSim has the communication hooks for you to be able to communicate between the two models and develop something that would attempt to keep them aligned but even if you get that to work, you'll be constraining the fast running model to the speed of the slower one and so wouldn't gain very much performance. If you're doing replications you're better having one model and increasing the number of parallel replications by changing hardware (more memory/more cores).

If you are able to predict key events that cross between the models then you could fast run to those but often times these events emerge in the model and you discover that one has already gone past that event time. This topic has been the subject of many papers over the years about Time Warp Simulation for multicore models, which last I heard involves rolling back to a restored state before continuing - something that FlexSim doesn't currently support.

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.