Hi, I found there is a RAM problem when FlexSim model calls python scripts -- the arguments passed to python seems not cleaned-up, which accumulate RAM usage, slows down the simulation significantly, and eventually blocked everything. This is a big problem for my team as we use external python algorithms to process large datasets from simulation. When the RAM are totally used up by FlexSim, we could no longer call the algorithms sufficiently. I use the attached model & script to identify the problem. The model does nothing but passing large inputs to a dummy python script. My RAM got peaked to 32G after 3000 python calls. I further observed that: 1) The complexity of the python script does not worsen the problem 2) The computation data generated internally in python does not worsen the problem 3) The size of the python output does not worsen the problem 4) Cleaning the input in FlexScript (e.g., rewrite it to NULL or use Map.clear()) does not mitigate the problem 5) Cleaning the input in python (e.g., rewrite it to NULL or use del & gc.collect()) does not mitigate the problem So, I feel the problem is only on the model side that the arguments passed to external python are not getting cleaned. Do you think there is, or will be, a solution? Thank you
Show More