FlexSimPy Crashes After Repeated Simulation Runs in the Same Python Process

FlexSimPy Crashes After Repeated Simulation Runs in the Same Python Process

jenny_chungVEV4M
Enthusiast Enthusiast
66 Views
1 Reply
Message 1 of 2

FlexSimPy Crashes After Repeated Simulation Runs in the Same Python Process

jenny_chungVEV4M
Enthusiast
Enthusiast

Hello,

I am using FlexSimPy to repeatedly run a FlexSim model from Python while modifying a few parameters between runs.

The simulation runs successfully at first, but after multiple iterations, FlexSim unexpectedly crashes and closes. The crash does not occur at a consistent iteration count; in my testing, it has occurred anywhere from around 4 runs to more than 30 runs. No Python exception or error message is reported when this happens.

The issue appears to be reproducible with the attached model and Python script.

Environment:

  • FlexSim 2026
  • Python 3.11

The only reliable workaround I have found is to start a completely new Python process for each simulation run. This avoids the crash, but significantly increases execution time because FlexSim must be restarted for every iteration.

Has anyone encountered a similar issue, or is there a recommended way to repeatedly execute simulations through FlexSimPy without restarting the process?

The attached model and Python script should reproduce the issue.

Thank you for your help.

0 Likes
67 Views
1 Reply
Reply (1)
Message 2 of 2

jenny_chungVEV4M
Enthusiast
Enthusiast

Hello,

I would like to kindly follow up on this topic.

Has anyone encountered similar behavior when running multiple simulations through FlexSimPy in the same Python process, or have any suggestions on what might be causing the crashes?

Thank you very much for your help.

0 Likes