Reformulation of a model with ASL

206 views
Skip to first unread message

jqn...@gmail.com

unread,
Mar 12, 2018, 9:07:43 AM3/12/18
to AMPL Modeling Language
Hello,

We have implemented a solver for Polynomial Programming problems, which needs to know the complete information about all the monomials in the objective function and the constraints in order to do a reformulation/linearization technique.

Now that the solver has been tested, we are interested in connecting it with AMPL, but after reading the 'Hooking your solver with AMPL' it seems that the only information we can get from the model via the ASL is the value of the first and second derivatives of the objective function and the constraints. However, we need much more information than that (all monomials and its coefficients involved in the objective function and the constraints). Is there any way to achieve this with the ASL or should we try to implement a parser for .nl files?

Best,
Joaquín Ossorio

AMPL Google Group

unread,
Mar 13, 2018, 3:18:24 PM3/13/18
to am...@googlegroups.com
After the ASL routines read the .nl file, they set up a data structure containing representations of the nonlinear expressions in the objective and constraints. At that point you can write your own code to scan the data structure and extract whatever information you need about the mathematical form and the specific coefficients. Unfortunately there is no guide to writing such code. A number of people have figured it out and have written quite complex structure processors -- for example, to check for convexity, to categorize the problem type, and to find structures equivalent to conic quadratic problems; but as far as I know, their code is not readily available or well documented.

The attached zipfile shows a small example that I did to walk through all the expression graphs and process different arithmetic and logical operators for use by ILOG CP. Others have used this as a start. In it you can see how to write an expression for the pointer to the root of a nonlinear expression tree, and how to use fields of the various data structures that appear in nodes of the tree. This code is designed for the original ASL at https://ampl.com/netlib/ampl/solvers/ rather than the new one in https://ampl.com/netlib/ampl/solvers2.tgz.

--
Robert Fourer
am...@googlegroups.com
{#HS:539619743-2431#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



LOGIC.zip

jqn...@gmail.com

unread,
Mar 19, 2018, 11:45:37 AM3/19/18
to AMPL Modeling Language
Thank you Robert for all the information. I think we will try your approach.

Best,
Joaquín
Reply all
Reply to author
Forward
0 new messages