question

Tuan avatar image
0 Likes"
Tuan asked Julie Weller commented

Experimenter problem

@Kavika F Hello!! I have a question

Connect flexsim and python via Socket

python as client flexsim as server

{

python is responsible for passing variables to flexsim

flexsim take variables to scenario and executes experimenter

After flexsim executes the experimenter, the value is passed to python

}

Execute the above process 100,000 times

There is no way to execute 100,000 times because the experimenter will be broken. Until a certain time you can only take variables to the scenario, but the experimenter cannot be enabled.

How to solve??

練習4.py

socket new.fsm

FlexSim 20.0.10
experimentersocket
練習4.py (1.4 KiB)
socket-new.fsm (100.8 KiB)
· 14
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
1 Like"
Kavika F answered

Hey @Tuan, I recommend that you try to run FlexSim instances in parallel to get your results faster so the Experimenter has less time to "break". There are a number of ways you could do this.

You could try increasing the number of scenarios you run in the experimenter. Simply take in multiple inputs from the python script before running, and then after running the experimenter, you can export all the results to your script to process.

You can use distributed CPUs on the Advanced tab of the experimenter to break up the work to help the experiments run faster.

You could use the FlexSim Web Server to run the experimenter and avoid crashing. This will allow you to specify the number of instances of FlexSim you can have open, and run multiple at a time so you can get results back faster.

5 |100000

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