question

jacopo-r avatar image
0 Likes"
jacopo-r asked jacopo-r commented

Using Python PuLP solver with FlexSim

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.

FlexSim 24.0.1
pythonoptimizationoptimization solverpulp
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

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

-1 Like -1 ·
jacopo-r avatar image jacopo-r Joerg Vogel commented ·
@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 0 ·
Joerg Vogel avatar image Joerg Vogel jacopo-r commented ·
@jacopo_r, C++ is Flexsim’s native Programming Language. You would enhance FlexSim directly instead of running an external program.
0 Likes 0 ·
Show more comments
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

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


1706522775685.png (4.5 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.

jacopo-r avatar image jacopo-r commented ·
Thank you @Felix Möhlmann , that actually helped!
0 Likes 0 ·
Arun Kr avatar image
0 Likes"
Arun Kr answered jacopo-r commented
· 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.

jacopo-r avatar image jacopo-r commented ·

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

0 Likes 0 ·