NLPInterfacePack::NLPWBCounterExample Class Reference

NLP subclass for the Waechter and Biegler Counter Example. More...

#include <NLPInterfacePack_NLPWBCounterExample.hpp>

Inheritance diagram for NLPInterfacePack::NLPWBCounterExample:

Inheritance graph
[legend]
List of all members.

Constructors / initializers

 NLPWBCounterExample (value_type xinit[3], value_type a=0.0, value_type b=1.0, bool nlp_selects_basis=true, bool linear_obj=true)
 Constructor.

Overridden public members from NLP

void initialize (bool test_setup)
 
bool is_initialized () const
 
value_type max_var_bounds_viol () const
 

Overridden from NLPVarReductPerm

bool nlp_selects_basis () const
 

Overridden protected methods from NLPSerialPreprocess

bool imp_nlp_has_changed () const
 
size_type imp_n_orig () const
 
size_type imp_m_orig () const
 
size_type imp_mI_orig () const
 
const DVectorSlice imp_xinit_orig () const
 
bool imp_has_var_bounds () const
 
const DVectorSlice imp_xl_orig () const
 
const DVectorSlice imp_xu_orig () const
 
const DVectorSlice imp_hl_orig () const
 
const DVectorSlice imp_hu_orig () const
 
void imp_calc_f_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
 
void imp_calc_c_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
 
void imp_calc_h_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
 
void imp_calc_Gf_orig (const DVectorSlice &x_full, bool newx, const ObjGradInfoSerial &obj_grad_info) const
 
bool imp_get_next_basis (IVector *var_perm_full, IVector *equ_perm_full, size_type *rank_full, size_type *rank)
 
void imp_report_orig_final_solution (const DVectorSlice &x_orig, const DVectorSlice *lambda_orig, const DVectorSlice *lambdaI_orig, const DVectorSlice *nu_orig, bool is_optimal) const
 

Overridden protected methods from NLPSerialPreprocessExplJac

size_type imp_Gc_nz_orig () const
 
size_type imp_Gh_nz_orig () const
 
void imp_calc_Gc_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const
 
void imp_calc_Gh_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const
 

Private Member Functions

 NLPWBCounterExample ()
 NLPWBCounterExample (const NLPWBCounterExample &)
NLPWBCounterExampleoperator= (const NLPWBCounterExample &)

Private Attributes

bool is_initialized_
bool nlp_selects_basis_
bool basis_selection_was_given_
bool linear_obj_
size_type n_orig_
size_type m_orig_
size_type Gc_orig_nz_
value_type a_
value_type b_
DVector xinit_orig_
DVector xl_orig_
DVector xu_orig_

Detailed Description

NLP subclass for the Waechter and Biegler Counter Example.

The Waechter & Biegler counter example NLP is defined as:

    min    f(x)
    s.t.
           c(1) = x(1)^2 - x(2) + a = 0
           c(2) = x(1)   - x(3) - b = 0

           x(2),x(3) >= 0

    where:
         b >= 0
 

and where a and b are constants. In the counter example, the form of the objective function f(x) is not important, but we have to specify one here in order to have MOOCHO solve the problem. So we will specify the objective function as

        / x(1)       : if linear_obj == true
 f(x) = |
        \ 0.5*x(1)^2 : if linear_obj == false
 
where the client can specify linear_obj (in the constructor).

Note that an excellent basis selection is for x(2) and x(3) to be in the basis since this gives the basis matrix of C = -I.

Definition at line 68 of file NLPInterfacePack_NLPWBCounterExample.hpp.


Constructor & Destructor Documentation

NLPInterfacePack::NLPWBCounterExample::NLPWBCounterExample ( value_type  xinit[3],
value_type  a = 0.0,
value_type  b = 1.0,
bool  nlp_selects_basis = true,
bool  linear_obj = true 
)

Constructor.

Parameters:
a [in] The constant in constriant c(1)
b [in] The constant in constriant c(2)
xinit [in] Array (size 3) of initial guess for x
nlp_selects_basis [in] If true, then this NLP will select the basis variables as x(2) and x(3) (which gives C = -I).
linear_obj [in] If true, the the objective is set to f(x) = x(1), else it is set to f(x) = 0.5*x(1)^2

Definition at line 40 of file NLPInterfacePack_NLPWBCounterExample.cpp.

NLPInterfacePack::NLPWBCounterExample::NLPWBCounterExample (  )  [private]

NLPInterfacePack::NLPWBCounterExample::NLPWBCounterExample ( const NLPWBCounterExample  )  [private]


Member Function Documentation

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

Reimplemented from NLPInterfacePack::NLPSerialPreprocessExplJac.

Definition at line 63 of file NLPInterfacePack_NLPWBCounterExample.cpp.

bool NLPInterfacePack::NLPWBCounterExample::is_initialized (  )  const [virtual]

Reimplemented from NLPInterfacePack::NLPSerialPreprocessExplJac.

Definition at line 70 of file NLPInterfacePack_NLPWBCounterExample.cpp.

value_type NLPInterfacePack::NLPWBCounterExample::max_var_bounds_viol (  )  const [virtual]

Implements NLPInterfacePack::NLP.

Definition at line 75 of file NLPInterfacePack_NLPWBCounterExample.cpp.

bool NLPInterfacePack::NLPWBCounterExample::nlp_selects_basis (  )  const [virtual]

Reimplemented from NLPInterfacePack::NLPSerialPreprocess.

Definition at line 202 of file NLPInterfacePack_NLPWBCounterExample.cpp.

bool NLPInterfacePack::NLPWBCounterExample::imp_nlp_has_changed (  )  const [protected, virtual]

Reimplemented from NLPInterfacePack::NLPSerialPreprocess.

Definition at line 82 of file NLPInterfacePack_NLPWBCounterExample.cpp.

size_type NLPInterfacePack::NLPWBCounterExample::imp_n_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 87 of file NLPInterfacePack_NLPWBCounterExample.cpp.

size_type NLPInterfacePack::NLPWBCounterExample::imp_m_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 92 of file NLPInterfacePack_NLPWBCounterExample.cpp.

size_type NLPInterfacePack::NLPWBCounterExample::imp_mI_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 97 of file NLPInterfacePack_NLPWBCounterExample.cpp.

const DVectorSlice NLPInterfacePack::NLPWBCounterExample::imp_xinit_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 102 of file NLPInterfacePack_NLPWBCounterExample.cpp.

bool NLPInterfacePack::NLPWBCounterExample::imp_has_var_bounds (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 107 of file NLPInterfacePack_NLPWBCounterExample.cpp.

const DVectorSlice NLPInterfacePack::NLPWBCounterExample::imp_xl_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 112 of file NLPInterfacePack_NLPWBCounterExample.cpp.

const DVectorSlice NLPInterfacePack::NLPWBCounterExample::imp_xu_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 117 of file NLPInterfacePack_NLPWBCounterExample.cpp.

const DVectorSlice NLPInterfacePack::NLPWBCounterExample::imp_hl_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 122 of file NLPInterfacePack_NLPWBCounterExample.cpp.

const DVectorSlice NLPInterfacePack::NLPWBCounterExample::imp_hu_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocess.

Definition at line 128 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_f_orig ( const DVectorSlice x_full,
bool  newx,
const ZeroOrderInfoSerial &  zero_order_info 
) const [protected]

Definition at line 134 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_c_orig ( const DVectorSlice x_full,
bool  newx,
const ZeroOrderInfoSerial &  zero_order_info 
) const [protected]

Definition at line 141 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_h_orig ( const DVectorSlice x_full,
bool  newx,
const ZeroOrderInfoSerial &  zero_order_info 
) const [protected]

Definition at line 150 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_Gf_orig ( const DVectorSlice x_full,
bool  newx,
const ObjGradInfoSerial &  obj_grad_info 
) const [protected]

Definition at line 156 of file NLPInterfacePack_NLPWBCounterExample.cpp.

bool NLPInterfacePack::NLPWBCounterExample::imp_get_next_basis ( IVector *  var_perm_full,
IVector *  equ_perm_full,
size_type rank_full,
size_type rank 
) [protected, virtual]

Reimplemented from NLPInterfacePack::NLPSerialPreprocess.

Definition at line 164 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_report_orig_final_solution ( const DVectorSlice x_orig,
const DVectorSlice lambda_orig,
const DVectorSlice lambdaI_orig,
const DVectorSlice nu_orig,
bool  is_optimal 
) const [protected]

Definition at line 191 of file NLPInterfacePack_NLPWBCounterExample.cpp.

size_type NLPInterfacePack::NLPWBCounterExample::imp_Gc_nz_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocessExplJac.

Definition at line 209 of file NLPInterfacePack_NLPWBCounterExample.cpp.

size_type NLPInterfacePack::NLPWBCounterExample::imp_Gh_nz_orig (  )  const [protected, virtual]

Implements NLPInterfacePack::NLPSerialPreprocessExplJac.

Definition at line 214 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_Gc_orig ( const DVectorSlice x_full,
bool  newx,
const FirstOrderExplInfo &  first_order_expl_info 
) const [protected]

Definition at line 219 of file NLPInterfacePack_NLPWBCounterExample.cpp.

void NLPInterfacePack::NLPWBCounterExample::imp_calc_Gh_orig ( const DVectorSlice x_full,
bool  newx,
const FirstOrderExplInfo &  first_order_expl_info 
) const [protected]

Definition at line 244 of file NLPInterfacePack_NLPWBCounterExample.cpp.

NLPWBCounterExample& NLPInterfacePack::NLPWBCounterExample::operator= ( const NLPWBCounterExample  )  [private]


Member Data Documentation

bool NLPInterfacePack::NLPWBCounterExample::is_initialized_ [private]

Definition at line 186 of file NLPInterfacePack_NLPWBCounterExample.hpp.

bool NLPInterfacePack::NLPWBCounterExample::nlp_selects_basis_ [private]

Definition at line 187 of file NLPInterfacePack_NLPWBCounterExample.hpp.

bool NLPInterfacePack::NLPWBCounterExample::basis_selection_was_given_ [private]

Definition at line 188 of file NLPInterfacePack_NLPWBCounterExample.hpp.

bool NLPInterfacePack::NLPWBCounterExample::linear_obj_ [private]

Definition at line 189 of file NLPInterfacePack_NLPWBCounterExample.hpp.

size_type NLPInterfacePack::NLPWBCounterExample::n_orig_ [private]

Reimplemented from NLPInterfacePack::NLPSerialPreprocess.

Definition at line 190 of file NLPInterfacePack_NLPWBCounterExample.hpp.

size_type NLPInterfacePack::NLPWBCounterExample::m_orig_ [private]

Reimplemented from NLPInterfacePack::NLPSerialPreprocess.

Definition at line 190 of file NLPInterfacePack_NLPWBCounterExample.hpp.

size_type NLPInterfacePack::NLPWBCounterExample::Gc_orig_nz_ [private]

Definition at line 190 of file NLPInterfacePack_NLPWBCounterExample.hpp.

value_type NLPInterfacePack::NLPWBCounterExample::a_ [private]

Definition at line 191 of file NLPInterfacePack_NLPWBCounterExample.hpp.

value_type NLPInterfacePack::NLPWBCounterExample::b_ [private]

Definition at line 191 of file NLPInterfacePack_NLPWBCounterExample.hpp.

DVector NLPInterfacePack::NLPWBCounterExample::xinit_orig_ [private]

Definition at line 192 of file NLPInterfacePack_NLPWBCounterExample.hpp.

DVector NLPInterfacePack::NLPWBCounterExample::xl_orig_ [private]

Definition at line 192 of file NLPInterfacePack_NLPWBCounterExample.hpp.

DVector NLPInterfacePack::NLPWBCounterExample::xu_orig_ [private]

Definition at line 192 of file NLPInterfacePack_NLPWBCounterExample.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:57:32 2010 for MOOCHO (Single Doxygen Collection) by  doxygen 1.4.7