solution precision

148 views
Skip to first unread message

bydesign

unread,
Jul 17, 2009, 4:57:54 PM7/17/09
to am...@googlegroups.com

I am trying to use ampl and minos for some nonlinear feasibility programs.
However, in some of my test instances, the solutions does not pass the
verification tests that I coded. I would like to have a tolerance of 1e-15
if possible.

I tried using
option solution_precision 16
option minos_options 'scale=no feasibility_tolerance=1e-15';
I have made sure that the coefficients on the constraints themselves have a
precision of 16 digits as well.
but I am still getting solutions ( in rare cases ) where the solution that
ampl gives violates the constraints by as much as 1e-5.

Help would be appreciated. Thanks!
--
View this message in context: http://www.nabble.com/solution-precision-tp24541614p24541614.html
Sent from the AMPL mailing list archive at Nabble.com.

Robert Fourer

unread,
Jul 18, 2009, 10:18:05 AM7/18/09
to am...@googlegroups.com, bydesign

The solution_precision option determines how much precision is kept in the
solution when it is returned from the solver to AMPL, but it doesn't have
any effect on the precision of the solver's calculations.

Apparently the MINOS directive feasibility_tolerance applies to variable
bounds and linear constraints. For nonlinear constraints the corresponding
directive is row_tolerance: "This directive specifies how accurately the
nonlinear constraints should be satisfied at an optimal solution, relative
to the magnitudes of the variables." The default value is 1e-6, but since
it is a relative tolerance the absolute violation might be greater. A
tolerance of 1e-15 might be unrealistically tight, but you can experiment
with different settings.

Bob Fourer
4...@ampl.com

bydesign

unread,
Jul 23, 2009, 1:43:07 AM7/23/09
to am...@googlegroups.com

Thanks, that helped a lot.

On the other hand, does the precision/quality of the solution depend on the
value of solve_result_num? The ampl documentation says that a value of 0-99
means an optimal solution is found; but does a larger solve_result_num (say
99) mean that a somewhat "inferior" solution was found?


--
View this message in context: http://www.nabble.com/solution-precision-tp24541614p24619583.html

Robert Fourer

unread,
Jul 25, 2009, 8:12:41 PM7/25/09
to am...@googlegroups.com, bydesign

Each value of solve_result_num has a particular, solver-dependent meaning.
For example, in the case of CPLEX, the AMPL-CPLEX documentation states given
the correspondences

Value Message

0 optimal solution
1 primal has unbounded optimal face
2 optimal integer solution
3 optimal integer solution within mipgap or absmipgap
4 primal optimal (no dual solution available)
100 best solution found, primal-dual feasible
102 optimal (non-)integer solution
103 optimal (non-)integer solution within mipgap or absmipgap

and so forth. Values not listed are not used by CPLEX and have no meaning.
For other solvers the values used and their meanings may be completely
different. In general it is not the case that a higher value of
solve_result_num between 0 and 99 corresponds to a poorer solution.

Bob Fourer
4...@ampl.com


> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com]
> On Behalf Of bydesign [saman...@gmail.com]

Reply all
Reply to author
Forward
0 new messages