question

Hanifi.Yilmaz avatar image
0 Likes"
Hanifi.Yilmaz asked Kavika F answered

FlexSimPy - run simulation from python

I just extended a genetic algorithm with flexsim. Now i have two problems, where i dont know where it comes from.

1.) The model gets "destroyed" every time it finishes an optimization process. Flexsim opens a script console for every run, i dont know why.

- Do I have to open the model in every run or just once at the start?

- When do i have to stop the controller? Only in the end or for every solution in the optimization?


1678795268870.png

2.) Python automatically restarts the script: I dont know if this problem has to do with flexsim or python. After some iterations, i always get the information "Restart python shell". Do you know where it can come from?

1678795588162.png

Thanks.

FlexSim 22.2.4
flexsimpy
1678795268870.png (67.2 KiB)
1678795588162.png (3.4 KiB)
· 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.

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered
Hey @Hanifi.Yilmaz, from the looks of your screenshot, it is opening a System Console each run, which makes me think that there's an error in your model that is trying to print a statement.

If you have no license, then you can't run an optimization job with the experimenter. You also can't run any scripts within FlexSim.

· 7
5 |100000

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