DOpE
|
#include <reducednewtonalgorithm.h>
Public Member Functions | |
ReducedNewtonAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, ParameterReader ¶m_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0) | |
virtual | ~ReducedNewtonAlgorithm () |
virtual int | Solve (ControlVector< VECTOR > &q, double global_tol=-1.) |
double | NewtonResidual (const ControlVector< VECTOR > &q) |
Public Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR > | |
ReducedAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, ParameterReader ¶m_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0) | |
virtual | ~ReducedAlgorithm () |
virtual void | ReInit () |
virtual void | SolveForward (ControlVector< VECTOR > &q) |
virtual void | CheckGrads (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.) |
virtual void | FirstDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq) |
virtual void | CheckHessian (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.) |
virtual void | SecondDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq) |
DOpEExceptionHandler< VECTOR > * | GetExceptionHandler () |
DOpEOutputHandler< VECTOR > * | GetOutputHandler () |
Static Public Member Functions | |
static void | declare_params (ParameterReader ¶m_reader) |
Static Public Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR > | |
static void | declare_params (ParameterReader ¶m_reader) |
Protected Member Functions | |
virtual int | SolveReducedLinearSystem (const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &gradient, const ControlVector< VECTOR > &gradient_transposed, ControlVector< VECTOR > &dq) |
virtual int | ReducedNewtonLineSearch (const ControlVector< VECTOR > &dq, const ControlVector< VECTOR > &gradient, double &cost, ControlVector< VECTOR > &q) |
virtual double | Residual (const ControlVector< VECTOR > &gradient, const ControlVector< VECTOR > &gradient_transposed) |
Protected Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR > | |
PROBLEM * | GetProblem () |
const PROBLEM * | GetProblem () const |
const ReducedProblemInterface < PROBLEM, VECTOR > * | GetReducedProblem () const |
ReducedProblemInterface < PROBLEM, VECTOR > * | GetReducedProblem () |
int | GetBasePriority () const |
This class provides a solver for equality constrained optimization problems in reduced form, i.e., the dependent variable is assumed to be eliminated by solving the equation. I.e., we solve the problem min j(q)
The solution is done with a linesearch algorithm, see, e.g., Nocedal & Wright.
<PROBLEM> | The problem container. See, e.g., OptProblemContainer |
<VECTOR> | The vector type of the solution. |
DOpE::ReducedNewtonAlgorithm< PROBLEM, VECTOR >::ReducedNewtonAlgorithm | ( | PROBLEM * | OP, |
ReducedProblemInterface< PROBLEM, VECTOR > * | S, | ||
ParameterReader & | param_reader, | ||
DOpEExceptionHandler< VECTOR > * | Except = NULL , |
||
DOpEOutputHandler< VECTOR > * | Output = NULL , |
||
int | base_priority = 0 |
||
) |
The constructor for the algorithm
OP | A pointer to the problem container |
S | The reduced problem. This object handles the equality constraint. For the interface see ReducedProblemInterface. |
param_reader | A parameter reader to access user given runtime parameters. |
Except | The DOpEExceptionHandler. This is used to handle the output by all exception. |
Output | The DOpEOutputHandler. This takes care of all output generated by the problem. |
base_priority | An offset for the priority of the output generated by the algorithm. |
|
virtual |
|
static |
Used to declare run time parameters. This is needed to declare all parameters a startup without the need for an object to be already declared.
double DOpE::ReducedNewtonAlgorithm< PROBLEM, VECTOR >::NewtonResidual | ( | const ControlVector< VECTOR > & | q | ) |
This returns the natural norm of the newton residual. This means the norm of the gradient of the reduced cost functional.
q | The initial point. |
|
protectedvirtual |
Performs an Armijo-type linesearch to find a point of sufficient descent for the functional j along the direction dq.
dq | The search direction. |
gradient | The l^2 gradient of the costfunctional at q, i.e., the gradient_i = {q_i} j(q) where q_i denotes the i-th DoF for the control. |
q | The control. Needs to be the last evaluation point of j in the begining and is at the end the updated control q+ dq. |
|
inlineprotectedvirtual |
Evaluates the squared residual, i.e., the scalar product gradient*gradient_transposed
Reimplemented in DOpE::ReducedNewtonAlgorithmWithInverse< PROBLEM, VECTOR >.
|
virtual |
This solves an Optimizationproblem in only the control variable by a newtons method.
q | The initial point. |
global_tol | An optional parameter specifying the required tolerance. The actual tolerance is the maximum of this and the one specified in the param file. Its default value is negative, so that it has no influence if not specified. |
Implements DOpE::ReducedAlgorithm< PROBLEM, VECTOR >.
Reimplemented in DOpE::ReducedNewtonAlgorithmWithInverse< PROBLEM, VECTOR >.
|
protectedvirtual |
Solves the linear system corresponding to the unconstrained quadratic model j(q) + j'(q)p + 1/2 p^TH(q)p
The values for j'(q) need to be provided. The hessian is not required, but multiplications H(q)*d are necessary since the linearsystem is solved by a CG-algorithm.
q | The fixed point where j, j' is evaluated and H needs to be calculated. |
gradient | The l^2 gradient of the costfunctional at q, i.e., the gradient_i = {q_i} j(q) where q_i denotes the i-th DoF for the control. |
gradient_transposed | The transposed of the gradient. This is assumed to be such that if q lives in a Hilbert space Q, then (gradient_transposed,gradient)_{l^2} = |j'(q)|_Q^2 |
dq | The solution of the model minimization, i.e., H(q)dq = - j'(q). |
Reimplemented in DOpE::ReducedNewtonAlgorithmWithInverse< PROBLEM, VECTOR >.