MOOCHO  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
NLPInterfacePack::ExampleNLPFirstOrder Class Reference

Simple example NLP subclass to illustrate how to implement the NLPFirstOrder interface for a specialized NLP. More...

#include <NLPInterfacePack_ExampleNLPFirstOrder.hpp>

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

Public Member Functions

 ExampleNLPFirstOrder (const VectorSpace::space_ptr_t &vec_space, value_type xo, bool has_bounds, bool dep_bounded)
 Constructor (see ExampleNLPDirect::ExampleNLPDirect()). More...
 
- Public Member Functions inherited from NLPInterfacePack::ExampleNLPObjGrad
 ExampleNLPObjGrad (const VectorSpace::space_ptr_t &vec_space, value_type xo, bool has_bounds, bool dep_bounded)
 Constructor. More...
 
virtual Range1D var_dep () const
 
virtual Range1D var_indep () 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
 
void force_xinit_in_bounds (bool force_xinit_in_bounds)
 
bool force_xinit_in_bounds () const
 
const Vector & xinit () const
 
const Vector & xl () const
 
const Vector & xu () const
 
value_type max_var_bounds_viol () const
 
void scale_f (value_type scale_f)
 
value_type scale_f () const
 
void report_final_solution (const Vector &x, const Vector *lambda, const Vector *nu, bool optimal)
 

Overridden public members from NLP

void initialize (bool test_setup)
 
bool is_initialized () const
 

Overridden public members from NLPFirstOrder

void set_Gc (MatrixOp *Gc)
 Overridden to check the concrete type of Gc. More...
 
const NLPFirstOrder::mat_fcty_ptr_t factory_Gc () const
 
const basis_sys_ptr_t basis_sys () const
 Returns an ExampleBasisSystem. More...
 

Overridden protected members from NLPFirstOrder

void imp_calc_Gc (const Vector &x, bool newx, const FirstOrderInfo &first_order_info) const
 

Detailed Description

Simple example NLP subclass to illustrate how to implement the NLPFirstOrder interface for a specialized NLP.

The example NLP we will use is a scalable problem where the basis of the jacobian of the constraints is a diagonal matrix.

   min    f(x) = (1/2) * sum( x(i)^2, for i = 1..n )
   s.t.   c(x)(j) = x(j) * (x(m+j) -1) - 10 * x(m+j) = 0, for j = 1..m
         0.01 < x(i) < 20, for i = p...p+m

   where:
       m = n/2
       p = 1 if dep_bounded == true or m+1 if dep_bounded = false

This subclass inherits from the subclass ExampleNLPDirect mostly out of lazyness but also to show how flexible these interfaces can be using mutiple inheritance.

ToDo: Finish documentation!

Definition at line 73 of file NLPInterfacePack_ExampleNLPFirstOrder.hpp.

Constructor & Destructor Documentation

NLPInterfacePack::ExampleNLPFirstOrder::ExampleNLPFirstOrder ( const VectorSpace::space_ptr_t &  vec_space,
value_type  xo,
bool  has_bounds,
bool  dep_bounded 
)

Member Function Documentation

void NLPInterfacePack::ExampleNLPFirstOrder::initialize ( bool  test_setup)
virtual

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 99 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

bool NLPInterfacePack::ExampleNLPFirstOrder::is_initialized ( ) const
virtual
void NLPInterfacePack::ExampleNLPFirstOrder::set_Gc ( MatrixOp *  Gc)
virtual

Overridden to check the concrete type of Gc.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 78 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

const NLPFirstOrder::mat_fcty_ptr_t NLPInterfacePack::ExampleNLPFirstOrder::factory_Gc ( ) const
virtual
const NLPFirstOrder::basis_sys_ptr_t NLPInterfacePack::ExampleNLPFirstOrder::basis_sys ( ) const
virtual

Returns an ExampleBasisSystem.

Reimplemented from NLPInterfacePack::NLPFirstOrder.

Definition at line 92 of file NLPInterfacePack_ExampleNLPFirstOrder.cpp.

void NLPInterfacePack::ExampleNLPFirstOrder::imp_calc_Gc ( const Vector &  x,
bool  newx,
const FirstOrderInfo first_order_info 
) const
protectedvirtual

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