Experimenter problem

Experimenter problem

s9816358
Not applicable
5 Views
15 Replies
Message 1 of 16

Experimenter problem

s9816358
Not applicable

[ FlexSim 20.0.10 ]

@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

0 Likes
Accepted solutions (1)
6 Views
15 Replies
Replies (15)
Message 2 of 16

kavika_faleumu
Autodesk
Autodesk

Hey @Tuan, what do you mean that the "experimenter will be broken"? Is there a specific number of replications where it fails? What kind of errors are you getting?

Please note that running 100,000 experiments would take a very long time. If every iteration only took 1 second, it would take over 27 hours to run.

0 Likes
Message 3 of 16

s9816358
Not applicable

@Kavika F Hi

No errors are displayed and suddenly cannot communicate with each other because the experimenter can no longer execute!!

0 Likes
Message 4 of 16

kavika_faleumu
Autodesk
Autodesk

How do you know it is the experimenter and not the socket connection breaking?

0 Likes
Message 5 of 16

s9816358
Not applicable

@Kavika F

In the middle of the communication , when neither party takes any action, the received variables are taken into the scenario in flexsim, and I manually start the experimenter There is no way to execute the experimenter

0 Likes
Message 6 of 16

s9816358
Not applicable

As for the reason, it is not that the connection is interrupted, because I shut down the entire flexsim, and the python terminal shows that the connection has been forcibly disconnected

0 Likes
Message 7 of 16

kavika_faleumu
Autodesk
Autodesk

Is there a specific time or iteration where this happens? I can't really help you if I'm not able to replicate the problem.

0 Likes
Message 8 of 16

s9816358
Not applicable

@Kavika F

I do it many times and the timing of the stop is different every time

0 Likes
Message 9 of 16

s9816358
Not applicable

Is it possible that my IP was hacked by others and the execution was interrupted?

0 Likes
Message 10 of 16

kavika_faleumu
Autodesk
Autodesk
On average how long do you run the program before it stops? I ran it for several minutes and nothing happened.
0 Likes
Message 11 of 16

s9816358
Not applicable

This happens within two days or within five days

0 Likes
Message 12 of 16

s9816358
Not applicable

But when I encounter this situation, the file used is different. The file attached to the question is a simplified version to explain my problem.

I attach a file of the situation encountered

論文_autosave.fsm

GA for my elevator.py

0 Likes
Message 13 of 16

kavika_faleumu
Autodesk
Autodesk
Are you saying that after running the experimenter for 2-5 days, it stops working?
0 Likes
Message 14 of 16

s9816358
Not applicable

That's right, this is the problem I'm currently having

0 Likes
Message 15 of 16

kavika_faleumu
Autodesk
Autodesk
Accepted solution

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.

Message 16 of 16

julie_weller
Not applicable

Hi @Tuan, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes