Python stops 3D model rendering

Python stops 3D model rendering

tomas_hefler
Participant Participant
364 Views
1 Reply
Message 1 of 2

Python stops 3D model rendering

tomas_hefler
Participant
Participant

Hello,

 

I'm trying to make a simulation which uses external Python code for optimization of decision making. This code can run for several seconds, and I came to a problem that the simulation itself continues while Python is running, but 3D model is not rendering, it just freezes until Python is done. 
Is it possible to somehow overcome this, with some kind of parallelism for example?

I have attached a really simple model to show the issue.

 

Thanks in advance

0 Likes
Accepted solutions (1)
365 Views
1 Reply
Reply (1)
Message 2 of 2

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

Logic decisions are using interrupts. They suspend a model run. Depending on your system power you will notice it. You can try to interact over a fast accessible data storage location with your model. Read and write data to a file that is accessible over a drive in RAM space. Address a pointer that you can update from FlexSim and external running code. But this can violate principles of encapsulation. Try to establish a socket communication. As you said, you want parallel computing. Then this is exactly the problem, interacting with needed data in mutual depending processes.

0 Likes