#include <NLPInterfacePack_NLPDirect.hpp>
Inheritance diagram for NLPInterfacePack::NLPDirect:
Dimensionality | |
| virtual size_type | r () const |
Returns the number of decomposed equality constraints (r <= m). | |
Ranges for dependent and independent variables and decomposed and undecomposed equalities | |
| virtual Range1D | var_dep () const |
| Return the range of dependent (i.e.\ basic) variables. | |
| virtual Range1D | var_indep () const |
| Return the range of independent (i.e.\ nonbasic) variables. | |
| virtual Range1D | con_decomp () const |
| Return the range of decomposed equality constraints. | |
| virtual Range1D | con_undecomp () const |
| Return the range of undecomposed equality constraints. | |
Matrix factory objects | |
| virtual const mat_fcty_ptr_t | factory_GcU () const |
Return a matrix factory object for creating GcU. | |
| virtual const mat_fcty_ptr_t | factory_D () const =0 |
Return a matrix factory object for D = -inv(C)*N {abstract}. | |
| virtual const mat_fcty_ptr_t | factory_Uz () const |
Return a matrix factory object for Uz = F + E * D. | |
| virtual const mat_fcty_ptr_t | factory_GcUD () const |
Return a matrix factory object for a mutable matrix compatible with GcU(var_dep). | |
| virtual const mat_sym_fcty_ptr_t | factory_transDtD () const |
Returns a matrix factory for the result of J = D'*D. | |
| virtual const mat_sym_nonsing_fcty_ptr_t | factory_S () const |
Returns a matrix factory for the result of S = I + D'*D. | |
Calculation members | |
| virtual void | calc_point (const Vector &x, value_type *f, VectorMutable *c, bool recalc_c, VectorMutable *Gf, VectorMutable *py, VectorMutable *rGf, MatrixOp *GcU, MatrixOp *D, MatrixOp *Uz) const =0 |
| Compute all of the needed quanities for direct sensitivities. | |
| virtual void | calc_semi_newton_step (const Vector &x, VectorMutable *c, bool recalc_c, VectorMutable *py) const =0 |
Calculate an approximate newton step given the Jacobian computed for the last call to calc_point(). | |
Overridden from NLP | |
| void | initialize (bool test_setup) |
| Initialize the NLP for its first use. | |
Public Types | |
| typedef Teuchos::RefCountPtr< const Teuchos::AbstractFactory< MatrixOp > > | mat_fcty_ptr_t |
| | |
| typedef Teuchos::RefCountPtr< const Teuchos::AbstractFactory< MatrixSymOp > > | mat_sym_fcty_ptr_t |
| | |
| typedef Teuchos::RefCountPtr< const Teuchos::AbstractFactory< MatrixSymOpNonsing > > | mat_sym_nonsing_fcty_ptr_t |
| | |
Public Member Functions | |
| void | set_factories (const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S) |
Initialize the factory objects for the special matrices for D'*D and S = I + D'*D. | |
Overview:
This interface defines a basis for the equality constriants and then only certain linear systems with this basis are solved for. This interface is useful in reduced space SQP-type and other related optimization algorithms.
Specifically, the variables are partitioned into dependent and independent sets x = [ x_dep' x_indep' ]' and Jacobians of the constraints c(x) at the point x are:
del(c,x) = Gc' = [ del(c(con_decomp)) ] = [ GcD' ] = [ GcDD' GcDI' ] = [ C N ]
[ del(c(con_undecomp)) ] [ GcU' ] [ GcUD' GcUI' ] [ E F ]
where:
C <: R^(r x r) is nonsingular
N <: R^(r x (n-r))
E <: R^((m-r) x r)
F <: R^((m-r) x (n-r))
This partitions the general equality constraints c(x) into two sets; decomposed c(con_decomp) and undecomposed c(con_undecomp). It is therefore expected that sub-vectors and subspaces from space_x().sub_space(var_dep), space_x().sub_space(var_indep), space_c().sub_space(con_decomp) and space_c().sub_space(con_undecomp) can all be accessed. Other sub-vectors and sub-spaces may not be available (but the algorithm should not need access to other sub-spaces).
Free access to solves with the basis C is not given however and instead this interface computes, for the current point x, the direct sensitivity matrice D = -inv(C)*N, the auxiliary matrices Uz = F + E * D and GcU = [ GcUD; GcUI ] = [ E'; F' ], and the Newton step py = -inv(C)*c(con_decomp). In general, linear solves with the transpose with C are not possible and therefore are not avalible. A number of very specialized applications can only provide this information but this is all that is needed by many numerical optimization (and related) algorithms.
Client Usage:
The dimension of the basis matrix C is returned by r(). The ranges for the dependent and independent varaibles are returned by var_dep() and var_indep(). The ranges for the decomposed and undecomposed equality constraints are con_decomp() and con_undecomp(). Note that con_undecomp() will return an invalid range if there are no undecomposed equalities.
Note that the matrix objects returned from factory_GcU(), factory_D() and factory_Uz() can not be expected to be usable until they are passed to the calculation routines or have been intialized in some other way.
Subclass Developer's Notes:
The default implementation of this interface assumes that there are no undecomposed equality constraints (i.e. this->con_decomp().size() == this->m()).
ToDo: Finish Documentation!
Definition at line 98 of file NLPInterfacePack_NLPDirect.hpp.
|
|
Definition at line 104 of file NLPInterfacePack_NLPDirect.hpp. |
|
|
Definition at line 107 of file NLPInterfacePack_NLPDirect.hpp. |
|
|
Definition at line 110 of file NLPInterfacePack_NLPDirect.hpp. |
|
||||||||||||
|
Initialize the factory objects for the special matrices for Postconditions:
Definition at line 40 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Returns the number of decomposed equality constraints ( Preconditions:
The default implementation returns Definition at line 49 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return the range of dependent (i.e.\ basic) variables. Preconditions:
The default implementation returns Definition at line 54 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return the range of independent (i.e.\ nonbasic) variables. Preconditions:
The default implementation returns Definition at line 58 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return the range of decomposed equality constraints. Preconditions:
The default implementation returns Definition at line 62 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return the range of undecomposed equality constraints. Preconditions:
The default implementation returns Definition at line 67 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return a matrix factory object for creating Preconditions:
The default implementation is to return Definition at line 73 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return a matrix factory object for Preconditions:
|
|
|
Return a matrix factory object for Preconditions:
The default implementation is to return Definition at line 79 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Return a matrix factory object for a mutable matrix compatible with
This matrix factory object is designed to create mutable matrix objects compatible with
The default implementation is to return Definition at line 85 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Returns a matrix factory for the result of The resulting matrix is symmetric but is assumed to be singular. Definition at line 91 of file NLPInterfacePack_NLPDirect.cpp. |
|
|
Returns a matrix factory for the result of The resulting matrix is symmetric and is guarrenteed to be nonsingular Definition at line 97 of file NLPInterfacePack_NLPDirect.cpp. |
|
||||||||||||||||||||||||||||||||||||||||||||
|
Compute all of the needed quanities for direct sensitivities.
|
|
||||||||||||||||||||
|
Calculate an approximate newton step given the Jacobian computed for the last call to
The idea behind this method is that with some applications it may be much cheaper to compute an approximate Newton step for the constraints given information computed during the last call to
|
|
|
Initialize the NLP for its first use.
This function implementation should be called by subclass implementations in order to reset counts for Postconditions: Reimplemented from NLPInterfacePack::NLPObjGrad. Definition at line 102 of file NLPInterfacePack_NLPDirect.cpp. |
1.3.9.1