NLPInterfacePack::NLPSecondOrder Class Reference

NLP second order information interface class {abstract}. More...

#include <NLPInterfacePack_NLPSecondOrder.hpp>

Inheritance diagram for NLPInterfacePack::NLPSecondOrder:
Inheritance graph
[legend]

List of all members.

Classes

struct  SecondOrderInfo
 Struct for zero, first and second order quantities (pointers). More...

Public Types

typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixSymOp > > 
mat_sym_fcty_ptr_t
 

Protected Member Functions

const SecondOrderInfo second_order_info () const
 Return objective gradient and zero order information.

Constructors



 NLPSecondOrder ()
 Initialize to no reference set to calculation quanities.

NLP initialization



void initialize (bool test_setup)
 Initialize the NLP for its first use.

Matrix factory objects



virtual const mat_sym_fcty_ptr_t factory_HL () const =0
 Return a matrix factory object for creating HL.

<<std aggr>> members for the Hessian of the Lagrangian HL



virtual void set_HL (MatrixSymOp *HL)
 Set a pointer to a matrix object to be updated when this->calc_HL() is called.
virtual MatrixSymOpget_HL ()
 Return pointer passed to this->set_HL().
virtual MatrixSymOpHL ()
 Returns non-const *this->get_HL().
virtual const MatrixSymOpHL () const
 Returns const *this->get_HL().

Unset calculation quantities



void unset_quantities ()
 Call to unset all storage quantities (both in this class and all subclasses).

Calculation Members



virtual void calc_HL (const Vector &x, const Vector *lambda, bool newpoint=true) const
 Update the matrix for HL at the point x, lambda, lambdaI and put it in the stored reference.

Number of function evaluations



virtual size_type num_HL_evals () const
 Number of Hessian evaluations.

Protected methods to be overridden by subclasses



virtual void imp_calc_HL (const Vector &x, const Vector *lambda, bool newpoint, const SecondOrderInfo &second_order_info) const =0
 Overridden to compute Gc(x) and perhaps Gf(x), f(x) and c(x).

Detailed Description

NLP second order information interface class {abstract}.

Overview:

This class adds second order inforamtion to the first order information and basic information given in the NLPFirstOrder and base interfaces.

Specifically the Hesssian of the Lagrangian is defined as:


 HL = Hf + sum( Hc(j) * lambda(j), j = 1...m )
 

Where:

Client Usage:

ToDo: Finish Documentation!

Subclass developer's notes:

ToDo: Finish Documentation!

Definition at line 64 of file NLPInterfacePack_NLPSecondOrder.hpp.


Member Typedef Documentation

Definition at line 69 of file NLPInterfacePack_NLPSecondOrder.hpp.


Constructor & Destructor Documentation

NLPInterfacePack::NLPSecondOrder::NLPSecondOrder (  ) 

Initialize to no reference set to calculation quanities.

Definition at line 40 of file NLPInterfacePack_NLPSecondOrder.cpp.


Member Function Documentation

void NLPInterfacePack::NLPSecondOrder::initialize ( bool  test_setup  )  [virtual]

Initialize the NLP for its first use.

This function implementation should be called by subclass implementations in order to reset counts for f(x), c(x), h(x), Gf(x), Gc(x), Gh(x) and HL(x) evaluations. This implementation calls this->NLPFirstOrder::initialize()

Postconditions:

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 45 of file NLPInterfacePack_NLPSecondOrder.cpp.

virtual const mat_sym_fcty_ptr_t NLPInterfacePack::NLPSecondOrder::factory_HL (  )  const [pure virtual]

Return a matrix factory object for creating HL.

The returned matrix object may not support the creation of any sub-matrix spaces (i.e. return->sub_space(rrng,crng).get() == NULL for all rrng and crng).

void NLPInterfacePack::NLPSecondOrder::set_HL ( MatrixSymOp HL  )  [virtual]

Set a pointer to a matrix object to be updated when this->calc_HL() is called.

Parameters:
HL [in] Pointer to Hessian of the Lagrangian matrix. May be NULL.

Preconditions:

Postconditions:

Definition at line 52 of file NLPInterfacePack_NLPSecondOrder.cpp.

MatrixSymOp * NLPInterfacePack::NLPSecondOrder::get_HL (  )  [virtual]

Return pointer passed to this->set_HL().

Preconditions:

Definition at line 57 of file NLPInterfacePack_NLPSecondOrder.cpp.

MatrixSymOp & NLPInterfacePack::NLPSecondOrder::HL (  )  [virtual]

Returns non-const *this->get_HL().

Preconditions:

Definition at line 62 of file NLPInterfacePack_NLPSecondOrder.cpp.

const MatrixSymOp & NLPInterfacePack::NLPSecondOrder::HL (  )  const [virtual]

Returns const *this->get_HL().

Preconditions:

Definition at line 67 of file NLPInterfacePack_NLPSecondOrder.cpp.

void NLPInterfacePack::NLPSecondOrder::unset_quantities (  )  [virtual]

Call to unset all storage quantities (both in this class and all subclasses).

Preconditions:

Postconditions:

This method must be called by all subclasses that override it.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 72 of file NLPInterfacePack_NLPSecondOrder.cpp.

void NLPInterfacePack::NLPSecondOrder::calc_HL ( const Vector x,
const Vector lambda,
bool  newpoint = true 
) const [virtual]

Update the matrix for HL at the point x, lambda, lambdaI and put it in the stored reference.

The referenced storage for f, c, Gf and Gc may also be changed but are not guarentied to be. But no other quanities from possible subclasses are allowed to be updated as a side effect.

Parameters:
x [in] Unknown primal variables
lambda [in] Lagrange muitipliers for equality constriants. If m() == 0 then lambda must be NULL. However, if m() > 0 then lambda == NULL is still allowed and is treated as lambda = 0.
newpoint [in] (default true) If false, the values in x, lambda and lambdaI are the same as the last call to this->calc_HL(). If true, then this is a new point.

Preconditions:

  • this->is_initialized() == true (throw NotInitialized)
  • x.space().is_compatible(*this->space_x()) == true (throw VectorSpace::IncompatibleVectorSpaces)
  • this->get_HL() != NULL (throw NoRefSet)
  • [this->m() == 0] lambda == NULL (throw std::invalid_argument)
  • [this->m() != 0 && lambda != 0] lambda->space().is_compatible(*this->space_c()) == true) (throw std::invalid_argument)

Postconditions:

  • this->HL() is updated to HL(x)

Definition at line 80 of file NLPInterfacePack_NLPSecondOrder.cpp.

size_type NLPInterfacePack::NLPSecondOrder::num_HL_evals (  )  const [virtual]

Number of Hessian evaluations.

This function can be called to find out how many evaluations the client requested since initialize() was called.

Definition at line 91 of file NLPInterfacePack_NLPSecondOrder.cpp.

const NLPSecondOrder::SecondOrderInfo NLPInterfacePack::NLPSecondOrder::second_order_info (  )  const [inline, protected]

Return objective gradient and zero order information.

Definition at line 298 of file NLPInterfacePack_NLPSecondOrder.hpp.

virtual void NLPInterfacePack::NLPSecondOrder::imp_calc_HL ( const Vector x,
const Vector lambda,
bool  newpoint,
const SecondOrderInfo second_order_info 
) const [protected, pure virtual]

Overridden to compute Gc(x) and perhaps Gf(x), f(x) and c(x).

Parameters:
x [in] Unknown vector (size n).
lambda [in] Lagrange multipliers for equality constraints c(x). Must be NULL if m() == 0. If NULL, then treated as lambda = 0.
newpoint [in] (default true) If false, the values in x, lambda and lambdaI are the same as the last call to this->calc_HL(). If true, then this is a new point.
second_order_info [out] Pointers to HL, Gc, Gh, Gf, f, c and h On output *second_order_info.HL is updated to HL(x). Any of the other objects pointed to in second_order_info may also be updated but are not guaranteed to be.

Preconditions:

  • x.space().is_compatible(*this->space_x()) (throw IncompatibleType)
  • second_order_info.HL != NULL (throw std::invalid_argument)

Postconditions:

  • *second_order_info.HL is updated to HL(x).

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 10:09:30 2011 for NLPInterfacePack: C++ Interfaces and Implementation for Non-Linear Programs by  doxygen 1.6.3