Relative Content

Tag Archive for pyomo

Use of a DLL in a Pyomo model

I am new to pyomo, so this is a basic question about the capabilities/restrictions of pyomo as a whole. I have read most of the “Optimization Modeling in Python” textbook about using pyomo, and I believe that pyomo would be a great tool for me to use for a modeling project I am currently working on. However, I do have one concern. In many equations in my model, I need to access a Fortran library linked through a DLL (it’s a commercial equation of state). The functions in this Fortran library are very non-linear. From what I understand, non-linear pyomo equations must be represented through the non-linear functions provided from the pyomo library. Is there any way to use pyomo while using this DLL, or would I need to rebuild all of the functions in the Fortran library in python with pyomo functions?

Managing Multiple solver Versions with Pyomo

I’m using Python 3.12.3 and Pyomo 6.7.0, and I use VSCode as my code editor. I have already connected GAMS 25.1 to Python. Now, I want to add GAMS 24.1 to Python. Here are my questions:

Ok in GAMS, Conflicts in Pyomo.. can you guys tell me why?

recently I have been trying to solve the optimization problem in the paper named
‘System-level analysis of lignin valorization in lignocellulosic biorefineries’
using Pyomo. But the three constraints conflicts each other, which not happened before using GAMS.
I have revisited all the data and codes, but it is totally same with what I did by GAMS.
Therefore, I’m wondering if there is an inherent difference btw GAMS and Pyomo when it comes to dealing with constraints.
Can you guys help me, please?

Not initializing variables in Pyomo

By default, variables seem to be initialized in Pyomo. Then the solver uses this initial point. Is there a way to not initialize variables in Pyomo and let the solver compute the initial point? I tried to initialized to None but an initial point is still passed to the solver