Using Python PuLP solver with FlexSim

Using Python PuLP solver with FlexSim

jacopo_r
Not applicable
1,624 Views
8 Replies
Message 1 of 9

Using Python PuLP solver with FlexSim

jacopo_r
Not applicable

[ FlexSim 24.0.1 ]

Hi all,

I have a mathematical model written in Python and using the PuLP package. The model itself works if I run it directly in Visual Studio Code using some dummy input data. However, when I run it through FlexSim, I have this error message " No module named "pulp" " and the result is a zero, instead of the binary matrix I need to optimized and return.

Does anyone know why it does not work in FlexSim?

Thanks.

0 Likes
Accepted solutions (1)
1,625 Views
8 Replies
Replies (8)
Message 2 of 9

joerg_vogel_HsH
Mentor
Mentor

@jacopo_r, have you considered to rebuild all in c++?

0 Likes
Message 3 of 9

jacopo_r
Not applicable
@Joerg Vogel, can you tell me what would be the benefits by doing that, please?

Is there a better and specific solver that works better with FlexSim?

0 Likes
Message 4 of 9

joerg_vogel_HsH
Mentor
Mentor
@jacopo_r, C++ is Flexsim’s native Programming Language. You would enhance FlexSim directly instead of running an external program.
0 Likes
Message 5 of 9

FelixMoehlmann
Mentor
Mentor
Accepted solution

I do not have a lot of experience with Python and/or calling it from FlexSim. So I can only offer the most basic advice: Have you checked that FlexSim is set to use the Python version which the package was installed for?

1706522775685.png

0 Likes
Message 6 of 9

arunTTT2P
Advisor
Advisor
0 Likes
Message 7 of 9

jacopo_r
Not applicable
@Joerg Vogel ok, I see. Thank you for the answer. I need to be more comfortable with C++ before dong that.
0 Likes
Message 8 of 9

jacopo_r
Not applicable
Thank you @Felix Möhlmann , that actually helped!
0 Likes
Message 9 of 9

jacopo_r
Not applicable

@Arun Kr this looks interesting. I will give it a look, thanks for sharing.

0 Likes