The solvers of OptimizationODE find a minimizer as the steady state of
the gradient flow du/dt = -gradient(u), integrated from u0 with an ODE
solver until the derivative is small: the largest component of du at
most 1e-8, or at most 1e-6 times the largest component of du + u,
as DynamicSS of SteadyStateDiffEq (the integration itself uses
abstol = 1e-8, reltol = 1e-6). The solve options dt (the step of
Euler(), the initial step of the adaptive methods) and maxiters (the
largest number of steps) are passed to the ODE solver.
Usage
ODEOptimizer(alg)
ODEGradientDescent()
RKChebyshevDescent()
RKAccelerated()
HighOrderDescent()
DAEOptimizer(alg)
DAEMassMatrix()Details
ODEOptimizer(alg)uses the ODE algorithmalg;ODEGradientDescent()isEuler()(it needsdt),RKChebyshevDescent()ROCK2(),RKAccelerated()Tsit5()andHighOrderDescent()Vern7().DAEOptimizer(alg)handles equality constraintscons(u) = 0(the values oflconsanduconsare not used, only their numberm): the lastmequations of the gradient flow are replaced by the constraints, which makes the lastmunknowns algebraic. With a mass matrix ODE algorithm the system has the mass matrixdiag(c(rep(1, n - m), rep(0, m)))and is integrated to steady state;DAEMassMatrix()isRodas5P()with finite difference Jacobians. With a fully implicit DAE algorithm (such asDFBDF()) the residualdu + gradient(u)(with the constraints in the last rows) is integrated over[0, 10].
The gradient of the problem is used, finite differences when it has
none. The return code is "Success" for ODEOptimizer and that of the
integration for DAEOptimizer; the statistics of ODEOptimizer give the
accepted steps as iterations and gradient evaluations, the right hand
side evaluations as fevals. A callback is called after every step.