Call external functions in pyomo and send models to GAMS to solve them.

18 views
Skip to first unread message

xi jack

unread,
Jul 8, 2021, 9:07:52 AM7/8/21
to Pyomo Forum
Hello. I'm writing a model in which some variables are obtained through external functions. The external function needs to pass in related parameters and returns the numerical results. Because the formula is complex, I can't write it by Constraints of pyomo.
I tried to use ipopt to solve this model, but it was infeasible. Then I use  GAMSShell Solver to solve it, but gams's equation shows that it does not call external functions to calculate.
The actual situation is that the initial value is passed to the external function, and the return value is given to the model, but not converted into the corresponding formula
How to solve this situation? Looking forward to your reply
Reply all
Reply to author
Forward
0 new messages