question

diego-rt avatar image
0 Likes"
diego-rt asked diego-rt commented

How I can conect a python file with a flexsim model

Good night,

I have a problem with a FlexSim model. I want to connect a process flow with a Python file, where I have a solution for a linear optimization problem. I tried like you have in the next image, but I couldn´t get an answer.

1706571743344.png

In this picture, the first line is the file´s name, and the second one is the function´s name.

Can anyone help me, please?

Regards.


FlexSim 23.0.3
processs flowanswers.flexsim.cominteraction between flexsim and python
1706571743344.png (5.9 KiB)
· 5
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered diego-rt commented

Here's an example of how to call your Python module from a process flow via a user command and have the returned array added to the token as a label.

minCostFlow.zip


mincostflow.zip (28.7 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.