NLPInterfacePack: C++ Interfaces and Implementation for NonLinear Programs Version of the Day

NLP interface class that adds variable and constriant permutations for variable reduction basis selections. More...
#include <NLPInterfacePack_NLPVarReductPerm.hpp>
Classes  
class  InvalidBasis 
Thrown if an invalid basis selection is made. More...  
Public types  
typedef Teuchos::RCP< const Teuchos::AbstractFactory < Permutation > >  perm_fcty_ptr_t 
 
Abstract factories for Permutation objects  
virtual const perm_fcty_ptr_t  factory_P_var () const =0 
 
virtual const perm_fcty_ptr_t  factory_P_equ () const =0 
 
Return ranges for the partitioning of variables and constraints  
virtual Range1D  var_dep () const =0 
 
virtual Range1D  var_indep () const =0 
 
virtual Range1D  equ_decomp () const =0 
 
virtual Range1D  equ_undecomp () const =0 
 
Basis manipulation functions  
virtual bool  nlp_selects_basis () const =0 
Returns true if the NLP can suggest one or more basis selections.  
virtual bool  get_next_basis (Permutation *P_var, Range1D *var_dep, Permutation *P_equ, Range1D *equ_decomp)=0 
Returns the next basis the NLP has and sets the NLP to the returned basis.  
virtual void  set_basis (const Permutation &P_var, const Range1D &var_dep, const Permutation *P_equ, const Range1D *equ_decomp)=0 
Sets the basis the that the NLP will use to permute the problem.  
virtual void  get_basis (Permutation *P_var, Range1D *var_dep, Permutation *P_equ, Range1D *equ_decomp) const =0 
Returns the basis selection currently being used by the NLP. 
NLP interface class that adds variable and constriant permutations for variable reduction basis selections.
This class adds basis selection and manipulation. This functionality is needed by many optimization algorithms that categorize variables and constraints into specific sets according to a basis selection. To understand what sets these are, consider the following equality constraints (from the NLP
interface).
c(x) = 0, c(x) <: R^n > R^m
This interface allows x and c(x) to be partitioned into different sets. The variables x are partitioned into a dependent set x(var_dep)
and an independent set x(var_dep)
by the permutation P_var
. The equality constraints c(x) are partitioned into decomposed c(equ_decomp)
and undecomposed c(equ_undecomp)
sets by the permutation P_equ
. These permutations permute from an original order to a new ordering. For example:
Original Ordering Permutation to new ordering Partitioning    x_orig P_var.permute(trans,x_orig,x) > x(var_dep), x(var_indep) c_orig P_equ.permute(trans,c_orig,c) > c(equ_decomp), c(equ_undecomp)
Because of this partitioning, it is expected that the following vector subspaces will be nonnull: space_x()>sub_space(var_indep)
, space_x()>sub_space(var_dep)
, space_c()>sub_space(equ_decomp)
, space_c()>sub_space(equ_undecomp)
. Other subspaces may be nonnull also but these are the only ones that are required to be.
After initialization, the NLP subclass will be initialized to the first basis. This basis may be the original ordering if P_var
and P_equ
all return xxx_perm.is_identity()
. If the concrete NLP is selecting the basis (nlp_selects_basis() == true
) this basis will be that first basis. The first time that this>get_next_basis()
is called it will return this initial basis (which may not be the original ordering).
The client can always see what this first basis is by calling this>get_basis()
. If a basis goes singular the client can request other basis selections from the NLP by calling this>get_next_basis()
(which will return true if more basis selections are available). The client can also select a basis itself and then set that basis by calling this>set_basis()
to force the use of that basis selection. In this way a valid basis is automatically selected after initialization so that clients using another interface (NLP
, NLPFirstOrder
, or NLPSecondOrder
) will be able to use the NLP object without even knowing about a basis selection.
Below are some obviouls assertions about the basis selection:
P_var.space().dim() == this>n()
(throw std::length_error
) P_equ.space().dim() == this>m()
(throw std::length_error
) var_dep.size() <= min( this>m() , this>n() )
(throw InvalidBasis
) var_dep.size() == equ_decomp.size()
(throw InvalidBasis
) Definition at line 92 of file NLPInterfacePack_NLPVarReductPerm.hpp.
typedef Teuchos::RCP< const Teuchos::AbstractFactory<Permutation> > NLPInterfacePack::NLPVarReductPerm::perm_fcty_ptr_t 
Definition at line 101 of file NLPInterfacePack_NLPVarReductPerm.hpp.
virtual const perm_fcty_ptr_t NLPInterfacePack::NLPVarReductPerm::factory_P_var  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual const perm_fcty_ptr_t NLPInterfacePack::NLPVarReductPerm::factory_P_equ  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual Range1D NLPInterfacePack::NLPVarReductPerm::var_dep  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual Range1D NLPInterfacePack::NLPVarReductPerm::var_indep  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual Range1D NLPInterfacePack::NLPVarReductPerm::equ_decomp  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual Range1D NLPInterfacePack::NLPVarReductPerm::equ_undecomp  (  )  const [pure virtual] 
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual bool NLPInterfacePack::NLPVarReductPerm::nlp_selects_basis  (  )  const [pure virtual] 
Returns true if the NLP can suggest one or more basis selections.
Implemented in NLPInterfacePack::NLPSerialPreprocess.
virtual bool NLPInterfacePack::NLPVarReductPerm::get_next_basis  (  Permutation *  P_var, 
Range1D *  var_dep,  
Permutation *  P_equ,  
Range1D *  equ_decomp  
)  [pure virtual] 
Returns the next basis the NLP has and sets the NLP to the returned basis.
P_var  [out] Variable permutations defined as P_var'*x_old > x_new = [ x(var_dep); x(var_indep) ] 
var_dep  [out] Range of dependent variables in x_new(var_dep) 
P_equ  [out] Equality constraint permutations defined as P_equ'*c_old > c_new = [ c(equ_decomp); c(equ_undecomp) ] 
equ_decomp  [out] Range of decomposed equalities in c_new(equ_decomp) 
Postconditions: The NLP is set to the basis returned in the arguments and this>get_basis()
will return the same basis.
This member returns true
if the NLP has another basis to select, and is false
if not. If false
is returned the client has the option of selecting another basis on its own and passing it to the NLP by calling this>set_basis()
.
Implemented in NLPInterfacePack::NLPSerialPreprocess, and NLPInterfacePack::NLPSerialPreprocessExplJac.
virtual void NLPInterfacePack::NLPVarReductPerm::set_basis  (  const Permutation &  P_var, 
const Range1D &  var_dep,  
const Permutation *  P_equ,  
const Range1D *  equ_decomp  
)  [pure virtual] 
Sets the basis the that the NLP will use to permute the problem.
P_var  [in] Variable permutations defined as P_var'*x_old > x_new = [ x(var_dep); x(var_indep) ] 
var_dep  [in] Range of dependent variables in x_new(var_dep) 
P_equ  [in] Equality constraint permutations defined as P_equ'*c_old > c_new = [ c(equ_decomp); c(equ_undecomp) ] 
equ_decomp  [in] Range of decomposed equalities in c_new(equ_decomp) 
Preconditions: The input basis meets the basis assertions stated above or an InvalidBasis
exceptin is thrown.
Postconditions: The NLP is set to the basis given in the arguments and this>get_basis()
will return this same basis.
Implemented in NLPInterfacePack::NLPSerialPreprocess, and NLPInterfacePack::NLPSerialPreprocessExplJac.
virtual void NLPInterfacePack::NLPVarReductPerm::get_basis  (  Permutation *  P_var, 
Range1D *  var_dep,  
Permutation *  P_equ,  
Range1D *  equ_decomp  
)  const [pure virtual] 
Returns the basis selection currently being used by the NLP.
P_var  [out] Variable permutations defined as P_var'*x_old > x_new = [ x(var_dep); x(var_indep) ] 
var_dep  [out] Range of dependent variables in x_new(var_dep) 
P_equ  [out] Equality constraint permutations defined as P_equ'*c_old > c_new = [ c(equ_decomp); c(equ_undecomp) ] 
equ_decomp  [out] Range of decomposed equalities in c_new(equ_decomp) 
Implemented in NLPInterfacePack::NLPSerialPreprocess.