NLPInterfacePack: C++ Interfaces and Implementation for Non-Linear Programs  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
NLPInterfacePack::NLPBarrier Class Reference

Simple wrapper that provides an objective fn with the barrier term included. More...

#include <NLPInterfacePack_NLPBarrier.hpp>

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

Public Methods

void mu (const value_type mu)
 Set the barrier parameter. More...
 
value_type barrier_term () const
 Get the barrier term. Must be called after calc_f(). More...
 
value_type objective_term () const
 Get the true objective term value. Must be called after calc_f(). More...
 
const Teuchos::RCP< Vectorgrad_barrier_term () const
 Get the value of the gradient of the barrier term. Must be called after calc_Gf() More...
 
const Teuchos::RCP< Vectorgrad_objective_term () const
 Get the value of the gradient of the true objective term. Must be called after calc_Gf(). More...
 

Constructors / initializers

 NLPBarrier ()
 Constructor. More...
 
void InitializeFromNLP (Teuchos::RCP< NLP > original_nlp)
 

Overridden public members from NLPObjGrad

void initialize (bool test_setup)
 
bool is_initialized () const
 
void set_Gf (VectorMutable *Gf)
 
VectorMutableget_Gf ()
 
VectorMutableGf ()
 
const VectorGf () const
 
void calc_Gf (const Vector &x, bool newx=true) const
 Overloaded to include barrier term. More...
 
size_type num_Gf_evals () const
 

Overridden public members from NLP

void force_xinit_in_bounds (bool force_xinit_in_bounds)
 
bool force_xinit_in_bounds () const
 
size_type n () const
 
size_type m () const
 
vec_space_ptr_t space_x () const
 
vec_space_ptr_t space_c () const
 
size_type num_bounded_x () const
 
const Vectorxl () const
 
const Vectorxu () const
 
value_type max_var_bounds_viol () const
 
const Vectorxinit () const
 
void get_init_lagrange_mult (VectorMutable *lambda, VectorMutable *nu) const
 
void set_f (value_type *f)
 
value_type * get_f ()
 
value_type & f ()
 
const value_type & f () const
 
void set_c (VectorMutable *c)
 
VectorMutableget_c ()
 
VectorMutablec ()
 
const Vectorc () const
 
void scale_f (value_type scale_f)
 
value_type scale_f () const
 
void calc_f (const Vector &x, bool newx=true) const
 Overloaded to include barrier term. More...
 
void calc_c (const Vector &x, bool newx=true) const
 
void report_final_solution (const Vector &x, const Vector *lambda, const Vector *nu, bool is_optimal)
 
size_type num_f_evals () const
 
size_type num_c_evals () const
 
size_type ns () const
 
vec_space_ptr_t space_c_breve () const
 
vec_space_ptr_t space_h_breve () const
 
const Vectorhl_breve () const
 
const Vectorhu_breve () const
 
void set_c_breve (VectorMutable *c_breve)
 
VectorMutableget_c_breve ()
 
VectorMutablec_breve ()
 
const Vectorc_breve () const
 
void set_h_breve (VectorMutable *h_breve)
 
VectorMutableget_h_breve ()
 
VectorMutableh_breve ()
 
const Vectorh_breve () const
 
const Permutation & P_var () const
 
const Permutation & P_equ () const
 
void calc_c_breve (const Vector &x, bool newx) const
 
void calc_h_breve (const Vector &x, bool newx) const
 
void imp_calc_f (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_c (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_c_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 
void imp_calc_h_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 
void imp_calc_Gf (const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const
 

Additional Inherited Members

- Public Types inherited from NLPInterfacePack::NLP
typedef Teuchos::RCP< const
VectorSpace > 
vec_space_ptr_t
 
typedef Teuchos::RCP< const
OptionsFromStreamPack::OptionsFromStream
options_ptr_t
 
- Public Member Functions inherited from NLPInterfacePack::NLPObjGrad
 NLPObjGrad ()
 Initialize to no reference set to calculation quanities. More...
 
virtual bool supports_Gf () const
 Determine if the objective gradient is supported or not. More...
 
virtual bool supports_Gf_prod () const
 Determine if the objective gradient product is supported or not. More...
 
void unset_quantities ()
 Call to unset all storage quantities (both in this class and all subclasses). More...
 
virtual value_type calc_Gf_prod (const Vector &x, const Vector &d, bool newx=true) const
 Calculate the inner product Gf(x)'*d at the point x and put it in the stored reference. More...
 
- Public Member Functions inherited from NLPInterfacePack::NLP
const ZeroOrderInfo zero_order_info () const
 Return pointer to set quantities. More...
 
const ZeroOrderInfo zero_order_info_breve () const
 Return pointer to set hat quantities. More...
 
 NLP ()
 Initialize to no reference set to calculation quanities. More...
 
virtual ~NLP ()
 Destructor that cleans all the memory it owns. More...
 
virtual void set_options (const options_ptr_t &options)
 Set the options that this NLP may be interested in. More...
 
virtual const options_ptr_tget_options () const
 Get the OptionsFromStream object being used to extract the options from. More...
 
- Static Public Member Functions inherited from NLPInterfacePack::NLP
static value_type infinite_bound ()
 Value for an infinite bound. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLPObjGrad
const ObjGradInfo obj_grad_info () const
 Return objective gradient and zero order information. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLP
template<class T >
void assert_ref_set (T *p, std::string info) const
 Assert referece has been set for a quanity. More...
 

Detailed Description

Simple wrapper that provides an objective fn with the barrier term included.

Definition at line 53 of file NLPInterfacePack_NLPBarrier.hpp.

Constructor & Destructor Documentation

NLPInterfacePack::NLPBarrier::NLPBarrier ( )

Constructor.

Definition at line 54 of file NLPInterfacePack_NLPBarrier.cpp.

Member Function Documentation

void NLPInterfacePack::NLPBarrier::mu ( const value_type  mu)

Set the barrier parameter.

Definition at line 82 of file NLPInterfacePack_NLPBarrier.cpp.

value_type NLPInterfacePack::NLPBarrier::barrier_term ( ) const

Get the barrier term. Must be called after calc_f().

Definition at line 87 of file NLPInterfacePack_NLPBarrier.cpp.

value_type NLPInterfacePack::NLPBarrier::objective_term ( ) const

Get the true objective term value. Must be called after calc_f().

Definition at line 92 of file NLPInterfacePack_NLPBarrier.cpp.

const Teuchos::RCP< Vector > NLPInterfacePack::NLPBarrier::grad_barrier_term ( ) const

Get the value of the gradient of the barrier term. Must be called after calc_Gf()

Definition at line 97 of file NLPInterfacePack_NLPBarrier.cpp.

const Teuchos::RCP< Vector > NLPInterfacePack::NLPBarrier::grad_objective_term ( ) const

Get the value of the gradient of the true objective term. Must be called after calc_Gf().

Definition at line 102 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::InitializeFromNLP ( Teuchos::RCP< NLP original_nlp)

Definition at line 63 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::initialize ( bool  test_setup)
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 95 of file NLPInterfacePack_NLPBarrier.hpp.

bool NLPInterfacePack::NLPBarrier::is_initialized ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 98 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::set_Gf ( VectorMutable Gf)
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 101 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable* NLPInterfacePack::NLPBarrier::get_Gf ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 104 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable& NLPInterfacePack::NLPBarrier::Gf ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 107 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::Gf ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 110 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::calc_Gf ( const Vector x,
bool  newx = true 
) const
virtual

Overloaded to include barrier term.

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 119 of file NLPInterfacePack_NLPBarrier.cpp.

size_type NLPInterfacePack::NLPBarrier::num_Gf_evals ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLPObjGrad.

Definition at line 115 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::force_xinit_in_bounds ( bool  force_xinit_in_bounds)
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 124 of file NLPInterfacePack_NLPBarrier.hpp.

bool NLPInterfacePack::NLPBarrier::force_xinit_in_bounds ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 127 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::n ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 130 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::m ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 133 of file NLPInterfacePack_NLPBarrier.hpp.

vec_space_ptr_t NLPInterfacePack::NLPBarrier::space_x ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 136 of file NLPInterfacePack_NLPBarrier.hpp.

vec_space_ptr_t NLPInterfacePack::NLPBarrier::space_c ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 139 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::num_bounded_x ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 142 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::xl ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 145 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::xu ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 148 of file NLPInterfacePack_NLPBarrier.hpp.

value_type NLPInterfacePack::NLPBarrier::max_var_bounds_viol ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 151 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::xinit ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 154 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::get_init_lagrange_mult ( VectorMutable lambda,
VectorMutable nu 
) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 157 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::set_f ( value_type *  f)
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 163 of file NLPInterfacePack_NLPBarrier.hpp.

value_type* NLPInterfacePack::NLPBarrier::get_f ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 166 of file NLPInterfacePack_NLPBarrier.hpp.

value_type& NLPInterfacePack::NLPBarrier::f ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 169 of file NLPInterfacePack_NLPBarrier.hpp.

const value_type& NLPInterfacePack::NLPBarrier::f ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 172 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::set_c ( VectorMutable c)
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 175 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable* NLPInterfacePack::NLPBarrier::get_c ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 178 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable& NLPInterfacePack::NLPBarrier::c ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 181 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::c ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 184 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::scale_f ( value_type  scale_f)
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 187 of file NLPInterfacePack_NLPBarrier.hpp.

value_type NLPInterfacePack::NLPBarrier::scale_f ( ) const
inlinevirtual

Implements NLPInterfacePack::NLP.

Definition at line 190 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::calc_f ( const Vector x,
bool  newx = true 
) const
virtual

Overloaded to include barrier term.

Reimplemented from NLPInterfacePack::NLP.

Definition at line 108 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::calc_c ( const Vector x,
bool  newx = true 
) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 195 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::report_final_solution ( const Vector x,
const Vector lambda,
const Vector nu,
bool  is_optimal 
)
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 198 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::num_f_evals ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 209 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::num_c_evals ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 212 of file NLPInterfacePack_NLPBarrier.hpp.

size_type NLPInterfacePack::NLPBarrier::ns ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 215 of file NLPInterfacePack_NLPBarrier.hpp.

vec_space_ptr_t NLPInterfacePack::NLPBarrier::space_c_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 218 of file NLPInterfacePack_NLPBarrier.hpp.

vec_space_ptr_t NLPInterfacePack::NLPBarrier::space_h_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 221 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::hl_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 224 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::hu_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 227 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::set_c_breve ( VectorMutable c_breve)
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 230 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable* NLPInterfacePack::NLPBarrier::get_c_breve ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 233 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable& NLPInterfacePack::NLPBarrier::c_breve ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 236 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::c_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 239 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::set_h_breve ( VectorMutable h_breve)
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 242 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable* NLPInterfacePack::NLPBarrier::get_h_breve ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 245 of file NLPInterfacePack_NLPBarrier.hpp.

VectorMutable& NLPInterfacePack::NLPBarrier::h_breve ( )
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 248 of file NLPInterfacePack_NLPBarrier.hpp.

const Vector& NLPInterfacePack::NLPBarrier::h_breve ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 251 of file NLPInterfacePack_NLPBarrier.hpp.

const Permutation& NLPInterfacePack::NLPBarrier::P_var ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 254 of file NLPInterfacePack_NLPBarrier.hpp.

const Permutation& NLPInterfacePack::NLPBarrier::P_equ ( ) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 257 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::calc_c_breve ( const Vector x,
bool  newx 
) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 260 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::calc_h_breve ( const Vector x,
bool  newx 
) const
inlinevirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 263 of file NLPInterfacePack_NLPBarrier.hpp.

void NLPInterfacePack::NLPBarrier::imp_calc_f ( const Vector x,
bool  newx,
const ZeroOrderInfo zero_order_info 
) const
protectedvirtual

Implements NLPInterfacePack::NLP.

Definition at line 154 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::imp_calc_c ( const Vector x,
bool  newx,
const ZeroOrderInfo zero_order_info 
) const
protectedvirtual

Implements NLPInterfacePack::NLP.

Definition at line 163 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::imp_calc_c_breve ( const Vector x,
bool  newx,
const ZeroOrderInfo zero_order_info_breve 
) const
protectedvirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 172 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::imp_calc_h_breve ( const Vector x,
bool  newx,
const ZeroOrderInfo zero_order_info_breve 
) const
protectedvirtual

Reimplemented from NLPInterfacePack::NLP.

Definition at line 181 of file NLPInterfacePack_NLPBarrier.cpp.

void NLPInterfacePack::NLPBarrier::imp_calc_Gf ( const Vector x,
bool  newx,
const ObjGradInfo obj_grad_info 
) const
protectedvirtual

Implements NLPInterfacePack::NLPObjGrad.

Definition at line 190 of file NLPInterfacePack_NLPBarrier.cpp.


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