about solver gjh

56 views
Skip to first unread message

kxwang

unread,
Feb 4, 2021, 11:37:17 PM2/4/21
to ampl

Dear Sir/Madam,


I can use solver gjh in AMPL command line. Now I need to use it in python environment, where pyomo supports optimization solvers with ASL interface. I have a question that:

(1)  Is there a way to install gjh solver through conda?

(2) Or if I compiled ghj.c myself, how could I add the solver to the python environment? 


Thank you very much for your advice and expertise!


Best regards,


Kexin


AMPL Google Group

unread,
Feb 5, 2021, 2:45:28 PM2/5/21
to AMPL Modeling Language
The gjh solver writes an AMPL script file, which you then execute to create new parameters g (gradient), J (Jacobian), and H (Hessian) that contain the derivative values at the current solution. Because gjh requires an AMPL language processor to execute the script, it does not work in the Pyomo environment.

If you can work with AMPL models, then an alternative is to use AMPL's API for Python, described at https://ampl.com/products/api/. It provides your Python program with an interface to all of the features of AMPL, including everything needed to set up models and data, run solvers, and execute scripts.


--
Robert Fourer
am...@googlegroups.com
{#HS:1417101753-99943#}
Reply all
Reply to author
Forward
0 new messages