[AMPL 3531] how to turn off analytic derivatives

72 views
Skip to first unread message

Fabio Schoen

unread,
May 21, 2010, 9:20:58 AM5/21/10
to am...@googlegroups.com
Is there a way to avoid passing analytical derivatives to the solver,
thus forcing it (e.g. snopt) to use finite differences?
thanks

Fabio Schoen
Professor of Operations Research
Dipartimento di Sistemi e Informatica - via di Santa Marta, 3 - 50139 Firenze (Italy)
Adjunct professor, New York University
Web page - Global Optimization Laboratory "Gerardo Poggiali": http://gol.dsi.unifi.it

--
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.

Robert Fourer

unread,
May 24, 2010, 6:46:46 PM5/24/10
to am...@googlegroups.com, Fabio Schoen
The AMPL-solver library only computes exact derivatives for solvers (by
automatic differentiation). Thus it is up to each solver developer whether
to provide an option that does not ask AMPL for these derivatives but that
instead computes approximations by finite differencing. It is necessary to
check the documentation of each solver's interface to AMPL to see whether
such an option exists for that solver.

The SNOPT manual (www.stanford.edu/group/SOL/guides/sndoc7.pdf) does list
what appear to be such options (section 7.7), though I haven't tried them
with AMPL. Note that to set, say, "derivative level" to 0, you would
specify "option snopt_options 'derivative_level=0 ...';" with ... replaced
by any other options you might want to give.

Bob Fourer
4...@ampl.com

Michael A. Saunders

unread,
May 24, 2010, 6:00:22 PM5/24/10
to am...@googlegroups.com, Fabio Schoen
Bob is right that SNOPT (and MINOS) allow you to say Derivative level 0.
However, this is for people who know some of the derivatives but not all.
Both solvers set the gradient array to a magic number before calling
the nonlinear functions. If the user sets some of the gradient values
to a real (non-magic!) number, the solvers go ahead and use them.
They fill in the missing gradients by finite differences.

Most likely, AMPL will fill in all gradients, so Derivative level 0
will be equivalent to Derivative level 3, except linesearches will be
conducted by a function-only procedure.

Michael

fabio.schoen

unread,
May 31, 2010, 2:34:40 PM5/31/10
to AMPL Modeling Language
So the answer to my question, I guess, is that you cannot turn off
analytical derivatives from within AMPL, but you have to change in
some way the solver.

I understand this might seem quite a bizzarre request (why truning off
derivatives if you can compute them??).

The reason I was asking is that several times I have to referee papers
in which exotic optimization methods are proposed accompanied by
numerical results - I would be happy if I could show that, even
without resorting to analytical derivatives, standard optimization
methods can perform quite well.
Any help?

Thanks,
fabio schoen
> > For more options, visit this group athttp://groups.google.com/group/ampl?hl=en.

Robert Fourer

unread,
Jun 5, 2010, 3:35:48 PM6/5/10
to am...@googlegroups.com, fabio.schoen
Indeed, the AMPL-solver library offers solvers the option of having exact
derivatives computed automatically, but it doesn't have an option for
providing solvers with derivatives estimated by finite differences. So any
code for finite differences has to be provided in the solver itself, and its
availability is solver-dependent. I noticed that KNITRO seems to have some
options for using only finite differences, but since it uses algorithms
different from those of MINOS, one has to specify a method for Hessian as
well as gradient estimation.
Reply all
Reply to author
Forward
0 new messages