MoochoPack : Framework for Large-Scale Optimization Algorithms  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Protected Member Functions | List of all members
MoochoPack::NLPAlgoState Class Reference

Reduced space SQP state encapsulation interface. More...

#include <MoochoPack_NLPAlgoState.hpp>

Inheritance diagram for MoochoPack::NLPAlgoState:
Inheritance graph
[legend]

Classes

class  InvalidType
 Thrown if an iteration quantity is of an invalid type. More...
 
struct  iq_id_encap
 

Protected Member Functions

void update_iq_id (const std::string &iq_name, iq_id_encap *iq_id) const
 
void update_index_type_iq_id (const std::string &iq_name, iq_id_encap *iq_id)
 
void update_value_type_iq_id (const std::string &iq_name, iq_id_encap *iq_id)
 
void update_vector_iq_id (const std::string &iq_name, const VectorSpace::space_ptr_t &vec_space, EVecSpaceType vec_space_type, iq_id_encap *iq_id)
 

Public Types

typedef Teuchos::RCP< const
VectorSpace > 
vec_space_ptr_t
 

Constructors/initializers

 STANDARD_COMPOSITION_MEMBERS (DecompositionSystem, decomp_sys)
 Set the DecompositionSystem object that all share. More...
 
 STANDARD_CONST_COMPOSITION_MEMBERS (VectorSpace, space_x)
 Set the VectorSpace of x. More...
 
 STANDARD_CONST_COMPOSITION_MEMBERS (VectorSpace, space_c)
 Set the VectorSpace of c. More...
 
void set_space_range (const vec_space_ptr_t &space_range)
 Set the VectorSpace of the range space (py). More...
 
vec_space_ptr_tget_space_range ()
 
const vec_space_ptr_tget_space_range () const
 
const VectorSpace & space_range () const
 
void set_space_null (const vec_space_ptr_t &space_null)
 Set the VectorSpace of the null space (pz). More...
 
vec_space_ptr_tget_space_null ()
 
const vec_space_ptr_tget_space_null () const
 
const VectorSpace & space_null () const
 
 NLPAlgoState (const decomp_sys_ptr_t &decomp_sys=Teuchos::null, const vec_space_ptr_t &space_x=Teuchos::null, const vec_space_ptr_t &space_c=Teuchos::null, const vec_space_ptr_t &space_range=Teuchos::null, const vec_space_ptr_t &space_null=Teuchos::null)
 Construct. More...
 
virtual ~NLPAlgoState ()
 

Decomposition information

Scaled KKT error for optimality ||rGL||

Scaled KKT error for feasibility ||c|| and ||hl <= h <= hu|| Scaled KKT error for complementarity (bounds) GL: Gradient of the Lagrangian ( n x 1 ) rGL: Reduced gradient of the Lagrangian ( (n-m) x 1 ) lambda: Lagrange multipliers for the equality constraints 'c' ( m x 1 ) nu: Difference between Lagrange multipiers for the upper and lower bounds ( n x 1 )

 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, var_dep)
 Range of dependent variables [1,r]. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, var_indep)
 Range of independent varaibles [r+1,n]. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, equ_decomp)
 Range of decomposed equality constraints [1,r]. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Range1D, equ_undecomp)
 Range of undecomposed equality constraints [r+1,m]. More...
 

Basis Pivot Info (variable reduction decompositions only)

 STANDARD_COMPOSITION_MEMBERS (Permutation, P_var_current)
 Current permutation for variables. More...
 
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_var_last)
 Previous permutation for variables. More...
 
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_equ_current)
 Current permutation for equality constraints. More...
 
 STANDARD_COMPOSITION_MEMBERS (Permutation, P_equ_last)
 Previous permutation for equality constraints. More...
 

Detailed Description

Reduced space SQP state encapsulation interface.

This in an interface to a set of data specific to a reduced space SQP algorithms. The iteration quantites are abstracted within IterQuantityAccess<> objects. A set of boilerplate macros are used to add the necessary declarations and implemetations of these iteration quantity access functions. As shown by these macros the access methods are declared virtual so that subclasses can override these methods. Otherwise, much of these could have been declared inline.

The implementation defined in this class uses IterQuantityAccessContiguous<> for iteration quantities of type index_type, value_type and VectorMutable with a default of one storage location. The default implementation is able to create the VectorMutable iteration quantities by using VectorSpace objects that the client sets this up with.

For all other types of iteration quantities (i.e. MatrixOp etc.) the client is responsible for setting the iteration quantity object of type IterQuantityAccess<>. The client can also change the type of class used for any iteration quantity by simply calling AlgorithmState::set_iter_quant(...).

The number of storage locations for any iteration quantity of type IterQuantityAccessContiguous<> can be changed by fetching the iteration quantity using the access methods defined here and then using dynamic_cast<> and calling the IterQuantityAccessContiguous<>::resize(...) method.

Note that the underlying AlgorithmState object will not know about the iteration quantity objects with default implementations until the access functions have been called at least once.

ToDo: Finish documentation.

Definition at line 264 of file MoochoPack_NLPAlgoState.hpp.

Member Typedef Documentation

Definition at line 277 of file MoochoPack_NLPAlgoState.hpp.

Constructor & Destructor Documentation

MoochoPack::NLPAlgoState::NLPAlgoState ( const decomp_sys_ptr_t &  decomp_sys = Teuchos::null,
const vec_space_ptr_t space_x = Teuchos::null,
const vec_space_ptr_t space_c = Teuchos::null,
const vec_space_ptr_t space_range = Teuchos::null,
const vec_space_ptr_t space_null = Teuchos::null 
)

Construct.

Initializes num_basis() == 0

Definition at line 115 of file MoochoPack_NLPAlgoState.cpp.

virtual MoochoPack::NLPAlgoState::~NLPAlgoState ( )
inlinevirtual

Definition at line 340 of file MoochoPack_NLPAlgoState.hpp.

Member Function Documentation

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( DecompositionSystem  ,
decomp_sys   
)

Set the DecompositionSystem object that all share.

MoochoPack::NLPAlgoState::STANDARD_CONST_COMPOSITION_MEMBERS ( VectorSpace  ,
space_x   
)

Set the VectorSpace of x.

MoochoPack::NLPAlgoState::STANDARD_CONST_COMPOSITION_MEMBERS ( VectorSpace  ,
space_c   
)

Set the VectorSpace of c.

void MoochoPack::NLPAlgoState::set_space_range ( const vec_space_ptr_t space_range)

Set the VectorSpace of the range space (py).

Calling this method will cause all of the vector iteration quantity objects set in this space to be updated with this vector space (factory) object.

Definition at line 103 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::set_space_null ( const vec_space_ptr_t space_null)

Set the VectorSpace of the null space (pz).

Calling this method will cause all of the vector iteration quantity objects set in this space to be updated with this vector space (factory) object.

Definition at line 109 of file MoochoPack_NLPAlgoState.cpp.

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
var_dep   
)

Range of dependent variables [1,r].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
var_indep   
)

Range of independent varaibles [r+1,n].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
equ_decomp   
)

Range of decomposed equality constraints [1,r].

MoochoPack::NLPAlgoState::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Range1D  ,
equ_undecomp   
)

Range of undecomposed equality constraints [r+1,m].

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_var_current   
)

Current permutation for variables.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_var_last   
)

Previous permutation for variables.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_equ_current   
)

Current permutation for equality constraints.

MoochoPack::NLPAlgoState::STANDARD_COMPOSITION_MEMBERS ( Permutation  ,
P_equ_last   
)

Previous permutation for equality constraints.

void MoochoPack::NLPAlgoState::update_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
) const
protected

Definition at line 186 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_index_type_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
)
protected

Definition at line 201 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_value_type_iq_id ( const std::string &  iq_name,
iq_id_encap iq_id 
)
protected

Definition at line 231 of file MoochoPack_NLPAlgoState.cpp.

void MoochoPack::NLPAlgoState::update_vector_iq_id ( const std::string &  iq_name,
const VectorSpace::space_ptr_t &  vec_space,
EVecSpaceType  vec_space_type,
iq_id_encap iq_id 
)
protected

Definition at line 261 of file MoochoPack_NLPAlgoState.cpp.


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