Re: Nonlinear constraint in MPS format

2023-07-18 Thread Michael Hennebry

On Tue, 18 Jul 2023, Prabhu Manyem wrote:


I have a non-linear model in AMPL format (which is very similar to
GMPL format)... I would like to convert this to free-MPS format..
Unfortunately,  glpsol  is unable to convert non-linear models to
MPS.. (And the free version of AMPL which I have does NOT allow file
conversions).

The objective function is linear..  Most of the constraints are
linear, except one constraint which is non-linear..  The single
non-linear constraint looks like this:


My understanding is that standard MPS allows
for linear constraints and objectives only.
There are extentions allowing quadratic objectives and constraints.


ax + b(x)(x) + c(x)(x)(x) + d/x + e/x/x + f/x/x/x = C.


I know of no extention that allows seven distinct, -3..3, powers of x.



If we remove the constraint above, then we have an LP.



My question -- Is it easy to edit the MPS file obtained above, and
input the single non-linear constraint?

Or, is there any other way to obtain an MPS file for the entire
non-linear model?


No.
No.

--
Michael   henne...@mail.cs.ndsu.nodak.edu
"Occasionally irrational explanations are required"  --  Luke Roman



Nonlinear constraint in MPS format

2023-07-17 Thread Prabhu Manyem
I have a non-linear model in AMPL format (which is very similar to
GMPL format)... I would like to convert this to free-MPS format..
Unfortunately,  glpsol  is unable to convert non-linear models to
MPS.. (And the free version of AMPL which I have does NOT allow file
conversions).

The objective function is linear..  Most of the constraints are
linear, except one constraint which is non-linear..  The single
non-linear constraint looks like this:

ax + b(x)(x) + c(x)(x)(x) + d/x + e/x/x + f/x/x/x = C.

If we remove the constraint above, then we have an LP.

So I removed this non-linear constraint and converted the rest of
the model to free MPS format using GLPK (using glpsol in the Linux
command line).

My question -- Is it easy to edit the MPS file obtained above, and
input the single non-linear constraint?

Or, is there any other way to obtain an MPS file for the entire
non-linear model?

Thanks.

-Prabhu Manyem