DOpE
Public Member Functions | Static Public Member Functions | Protected Member Functions
DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR > Class Template Reference

#include <reducedtrustregionnewton.h>

Inheritance diagram for DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >:
DOpE::ReducedAlgorithm< PROBLEM, VECTOR >

Public Member Functions

 ReducedTrustregion_NewtonAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, ParameterReader &param_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0)
 
 ~ReducedTrustregion_NewtonAlgorithm ()
 
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 &param_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 &param_reader)
 
- Static Public Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR >
static void declare_params (ParameterReader &param_reader)
 

Protected Member Functions

bool ComputeTRModelMinimizer (const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &gradient, const ControlVector< VECTOR > &gradient_transposed, ControlVector< VECTOR > &hessian, ControlVector< VECTOR > &hessian_transposed, ControlVector< VECTOR > &p_u, ControlVector< VECTOR > &p_b, ControlVector< VECTOR > &min, double tr_delta, double &cost, double &model, double &expand, int &liniter)
 
virtual int SolveReducedLinearSystem (const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &gradient, const ControlVector< VECTOR > &gradient_transposed, ControlVector< VECTOR > &dq)
 
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
 

Detailed Description

template<typename PROBLEM, typename VECTOR>
class DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >

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 trust region algorithm, see, e.g., Nocedal & Wright.

Template Parameters
<PROBLEM>The problem container. See, e.g., OptProblemContainer
<VECTOR>The vector type of the solution.

Constructor & Destructor Documentation

template<typename PROBLEM , typename VECTOR >
DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::ReducedTrustregion_NewtonAlgorithm ( 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

Parameters
OPA pointer to the problem container
SThe reduced problem. This object handles the equality constraint. For the interface see ReducedProblemInterface.
param_readerA parameter reader to access user given runtime parameters.
ExceptThe DOpEExceptionHandler. This is used to handle the output by all exception.
OutputThe DOpEOutputHandler. This takes care of all output generated by the problem.
base_priorityAn offset for the priority of the output generated by the algorithm.
template<typename PROBLEM , typename VECTOR >
DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::~ReducedTrustregion_NewtonAlgorithm ( )

Member Function Documentation

template<typename PROBLEM , typename VECTOR >
bool DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::ComputeTRModelMinimizer ( const ControlVector< VECTOR > &  q,
const ControlVector< VECTOR > &  gradient,
const ControlVector< VECTOR > &  gradient_transposed,
ControlVector< VECTOR > &  hessian,
ControlVector< VECTOR > &  hessian_transposed,
ControlVector< VECTOR > &  p_u,
ControlVector< VECTOR > &  p_b,
ControlVector< VECTOR > &  min,
double  tr_delta,
double &  cost,
double &  model,
double &  expand,
int &  liniter 
)
protected

This method is used in the Solve method to calculate the minimizer of the trust-region model.

Parameters
qThe point in which we evaluate the function
gradientThe 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_transposedThe 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
hessianA vector in which l^2 representations of hessian*direction = H*d evaluations.
hessian_transposedThe corresponding transposed object. I.e., (hessian_transposed,hessian)_{l^2} = |H*d|_Q^2.
p_uStorage for minimizer of the model along stepest descend direction.
p_bStorage for minimizer of the unconstrained quadratic model minimization.
minStorage for the, approximate, model minimizer.
tr_deltaThe radius of the trust region
costThe value of the cost functional at the new point q+min
modelThe value of the model function.
expandThe factor by which the trust-region radius can be relaxed if the step is good.
liniterNumber of linear iterations used to solve the model problem.
template<typename PROBLEM , typename VECTOR >
void DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::declare_params ( ParameterReader param_reader)
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.

template<typename PROBLEM , typename VECTOR >
double DOpE::ReducedTrustregion_NewtonAlgorithm< 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.

Parameters
qThe initial point.
template<typename PROBLEM , typename VECTOR >
virtual double DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::Residual ( const ControlVector< VECTOR > &  gradient,
const ControlVector< VECTOR > &  gradient_transposed 
)
inlineprotectedvirtual

Evaluates the squared residual, i.e., the scalar product gradient*gradient_transposed

template<typename PROBLEM , typename VECTOR >
int DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::Solve ( ControlVector< VECTOR > &  q,
double  global_tol = -1. 
)
virtual

This solves an Optimizationproblem in only the control variable by a trustregion_newtons method.

Parameters
qThe initial point.
global_tolAn 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 the Trust Region Algorithm from Nocedal-Wright Alg 4.1

Implements DOpE::ReducedAlgorithm< PROBLEM, VECTOR >.

template<typename PROBLEM , typename VECTOR >
int DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >::SolveReducedLinearSystem ( const ControlVector< VECTOR > &  q,
const ControlVector< VECTOR > &  gradient,
const ControlVector< VECTOR > &  gradient_transposed,
ControlVector< VECTOR > &  dq 
)
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.

Parameters
qThe fixed point where j, j' is evaluated and H needs to be calculated.
gradientThe 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_transposedThe 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
dqThe solution of the model minimization, i.e., H(q)dq = - j'(q).

The documentation for this class was generated from the following file: