Model manipulation from python using Flexsimpy

Model manipulation from python using Flexsimpy

oladosuZ2AY9
Explorer Explorer
632 Views
3 Replies
Message 1 of 4

Model manipulation from python using Flexsimpy

oladosuZ2AY9
Explorer
Explorer

Please, I need a confirmation if attributes like processing time, setup, labels and triggers be tweak from python script using Flexsimpy connection for optimization/iterative purposes?  @kavika_faleumu 

0 Likes
Accepted solutions (1)
633 Views
3 Replies
Replies (3)
Message 2 of 4

kavika_faleumu
Autodesk
Autodesk

Hey @oladosuZ2AY9, it depends on what you mean by "tweaked from python script". If you read the README in the FlexSimPy github repo, it states:

kavika_faleumu_0-1746543545946.png

FlexSim ships with PyConnector dlls for Python versions 3.9-3.12 (found in Program Files\FlexSim\program\python). It's possible to setup a Python script to return values for processing time that a Processor would use.

The FlexSimPy project is used for controlling the FlexSim application itself. If we look in the code on github, we can see some of the functionality exposed to the user:

kavika_faleumu_1-1746543725552.png

Most of it has to do with running and stopping a model, getting and setting parameters, and receiving performance measurements.

Hope this helps.

 

Message 3 of 4

oladosuZ2AY9
Explorer
Explorer

Thank You @kavika_faleumu ,

 

The FlexSimPy has been working for me effectively, just that I want to set parameters(on creation labels, process time and setup time ) from python which are already complied in an excel sheet for sensitivity analysis. It has proven abortive, because the parameters from Python is unable to override what I set in the model. I want to know if that is possible and get support with that. Thank you 

0 Likes
Message 4 of 4

kavika_faleumu
Autodesk
Autodesk
Accepted solution

@oladosuZ2AY9, the parameters FlexSimPy refers to are Model Parameters. One solution would be to setup your Processors to use Model Parameters as process times, setup times, etc. Then you can use FlexSimPy to set the parameters in your python script.

Another solution would be to import the excel sheet into a Global Table in FlexSim. Then you could have the Processors pull from the global table, no python required (at least for that part). As the excel sheet updates, you can reimport easily.