MPS files (at least the standard ones that AMPL generates) do not specify a direction of optimization, so it is always a good idea to check that you are not, say, maximizing in AMPL but minimizing outside of AMPL.
Also MPS files do not accommodate a constant in the objective function. If you give an AMPL command of the form "solexpand <obj-name>;" and it shows something like "... + 3.3327" at the end, then there is a constant term in the problem sent to the solver, but this constant will not show up in the MPS file.
MPS files allow 12 characters for numerical values, so fractional coefficients will be rounded somewhat. Often this results in only minor differences in the solution, but much greater differences are possible.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of Thiago Nogueira
Sent: Thursday, March 29, 2012 8:49 PM
To: am...@googlegroups.com
Subject: [AMPL 5635] MPS FILE ERROR
--You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.To post to this group, send email to am...@googlegroups.com.
To unsubscribe from this group, send email to ampl+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ampl?hl=en.
There isn't any convenient way to arrange for an AMPL parameter that will automatically equal the constant term in the objective that is sent to the solver.
With option presolve set to 0, you can generally use your knowledge of the objective to deduce an AMPL expression for the constant term, which you can use to adjust the objective. But when presolve is turned on, it may find many variables that can be fixed prior to optimization, and fixing those variables may lead to a constant term whose value is hard to predict.
Bob Fourer
From: am...@googlegroups.com [mailto:am...@googlegroups.com]
On Behalf Of Thiago Nogueira
Sent: Saturday, March 31, 2012 12:31 PM
To: am...@googlegroups.com
Subject: Re: [AMPL 5639] MPS FILE ERROR
Robert,
I used the solexpand. My FO is FO +Constant. Is there a way to get the Constant value in some param of AMPL?
thanks,
Thiago
.