ROL
Public Member Functions | Private Attributes | List of all members
ROL::Constraints< Real > Class Template Reference

#include <ROL_Constraints.hpp>

Public Member Functions

virtual ~Constraints ()
 
 Constraints (void)
 
 Constraints (std::vector< Teuchos::RCP< BoundConstraint< Real > > > &ic)
 
 Constraints (Teuchos::RCP< BoundConstraint< Real > > &ic)
 
 Constraints (std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &ec)
 
 Constraints (Teuchos::RCP< EqualityConstraint< Real > > &ec)
 
 Constraints (std::vector< Teuchos::RCP< BoundConstraint< Real > > > &ic, std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &ec)
 
 Constraints (Teuchos::RCP< BoundConstraint< Real > > &ic, Teuchos::RCP< EqualityConstraint< Real > > &ec)
 
 Constraints (Teuchos::RCP< BoundConstraint< Real > > &ic, std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &ec)
 
 Constraints (std::vector< Teuchos::RCP< BoundConstraint< Real > > > &ic, Teuchos::RCP< EqualityConstraint< Real > > &ec)
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update constraint functions. x is the optimization variable, flag = true if x is changed, iter is the outer algorithm iterations count. More...
 
void project (Vector< Real > &x)
 Project optimization variables onto constraint set. x is the optimization variable. More...
 
void pruneUpperActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
 
void pruneLowerActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
 
void pruneUpperActive (Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
 
void pruneLowerActive (Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
 
void setVectorToUpperBound (Vector< Real > &u)
 
void setVectorToLowerBound (Vector< Real > &l)
 
void pruneActive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
 Remove active set variables that are also in the binding set. v is the vector to be pruned g is the gradient of the objective function at x x is the optimization variable eps is the active set tolerance. More...
 
void pruneActive (Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
 Remove active set variables. v is the vector to be pruned x is the optimization variable eps is the active set tolerance. More...
 
bool isFeasible (const Vector< Real > &v)
 Check if the vector, v, is feasible. More...
 
void value (std::vector< Teuchos::RCP< Vector< Real > > > &c, const Vector< Real > &x, const EConstraint &ctype, std::vector< Real > &tol)
 Evaluate constraints: either for all activated equality constraints or for all activated inequality constraints. More...
 
void applyJacobian (std::vector< Teuchos::RCP< Vector< Real > > > &jv, std::vector< Teuchos::RCP< const Vector< Real > > > &v, const Vector< Real > &x, const bool &adj, const EConstraint &ctype, std::vector< Real > &tol)
 Apply constraint Jacobians or their adjoints: either for all activated equality constraints or for all activated inequality constraints. More...
 
void maptoJacobianKernel (std::vector< Teuchos::RCP< Vector< Real > > > &wv, std::vector< Teuchos::RCP< const Vector< Real > > > &v, const Vector< Real > &x, const EConstraint &ctype, std::vector< Real > &tol)
 Compute the action of the operators W that are onto the null space (kernel) of the contraint Jacobians: either for all activated equality constraints or for all activated inequality constraints. More...
 
void applyHessian (std::vector< Teuchos::RCP< Vector< Real > > > &huv, std::vector< Teuchos::RCP< const Vector< Real > > > &u, std::vector< Teuchos::RCP< const Vector< Real > > > &v, const Vector< Real > &x, const EConstraint &ctype, std::vector< Real > &tol)
 Apply constraint Hessians to (v,u), c''(x)(v,u) = (c''(x)u)v: either for all activated equality constraints or for all activated inequality constraints. More...
 
void pruneInactive (Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
 Remove the inactive set variables that are not in the binding set. v is the vector to be pruned g is the gradient of the objective function at x x is the optimization variable eps is the active set tolerance. More...
 
void pruneInactive (Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
 Remove the inactive set variables. v is the vector to be pruned x is the optimization variable eps is the active set tolerance. More...
 
void computeProjectedGradient (Vector< Real > &g, const Vector< Real > &x)
 Compute projected gradient. g is the gradient of the objective function at x x is the optimization variable. More...
 
void computeProjectedStep (Vector< Real > &v, const Vector< Real > &x)
 Compute projected step P(x+v)-x. v is the step vector x is the optimization variables. More...
 
void activate (void)
 Turn on constraints. More...
 
void deactivate (void)
 Turn off constraints. More...
 
bool isActivated (void)
 Check if constraints are on. More...
 

Private Attributes

bool activated_
 
std::vector< Teuchos::RCP< BoundConstraint< Real > > > ic_
 
std::vector< Teuchos::RCP< EqualityConstraint< Real > > > ec_
 

Detailed Description

template<class Real>
class ROL::Constraints< Real >

Definition at line 56 of file ROL_Constraints.hpp.

Constructor & Destructor Documentation

template<class Real >
virtual ROL::Constraints< Real >::~Constraints ( )
inlinevirtual

Definition at line 65 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( void  )
inline

Definition at line 67 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( std::vector< Teuchos::RCP< BoundConstraint< Real > > > &  ic)
inline

Definition at line 69 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( Teuchos::RCP< BoundConstraint< Real > > &  ic)
inline

Definition at line 71 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &  ec)
inline

Definition at line 76 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( Teuchos::RCP< EqualityConstraint< Real > > &  ec)
inline

Definition at line 78 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( std::vector< Teuchos::RCP< BoundConstraint< Real > > > &  ic,
std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &  ec 
)
inline

Definition at line 83 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( Teuchos::RCP< BoundConstraint< Real > > &  ic,
Teuchos::RCP< EqualityConstraint< Real > > &  ec 
)
inline

Definition at line 85 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( Teuchos::RCP< BoundConstraint< Real > > &  ic,
std::vector< Teuchos::RCP< EqualityConstraint< Real > > > &  ec 
)
inline

Definition at line 92 of file ROL_Constraints.hpp.

template<class Real >
ROL::Constraints< Real >::Constraints ( std::vector< Teuchos::RCP< BoundConstraint< Real > > > &  ic,
Teuchos::RCP< EqualityConstraint< Real > > &  ec 
)
inline

Definition at line 97 of file ROL_Constraints.hpp.

Member Function Documentation

template<class Real >
void ROL::Constraints< Real >::update ( const Vector< Real > &  x,
bool  flag = true,
int  iter = -1 
)
inline

Update constraint functions. x is the optimization variable, flag = true if x is changed, iter is the outer algorithm iterations count.

Definition at line 107 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::project ( Vector< Real > &  x)
inline

Project optimization variables onto constraint set. x is the optimization variable.

Definition at line 118 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

Referenced by ROL::Constraints< Real >::computeProjectedStep().

template<class Real >
void ROL::Constraints< Real >::pruneUpperActive ( Vector< Real > &  v,
const Vector< Real > &  g,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Definition at line 125 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::pruneLowerActive ( Vector< Real > &  v,
const Vector< Real > &  g,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Definition at line 132 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::pruneUpperActive ( Vector< Real > &  v,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Definition at line 139 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::pruneLowerActive ( Vector< Real > &  v,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Definition at line 146 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::setVectorToUpperBound ( Vector< Real > &  u)
inline

Definition at line 153 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::setVectorToLowerBound ( Vector< Real > &  l)
inline

Definition at line 158 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::pruneActive ( Vector< Real > &  v,
const Vector< Real > &  g,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Remove active set variables that are also in the binding set. v is the vector to be pruned g is the gradient of the objective function at x x is the optimization variable eps is the active set tolerance.

Definition at line 170 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

Referenced by ROL::Constraints< Real >::computeProjectedGradient(), and ROL::Constraints< Real >::pruneInactive().

template<class Real >
void ROL::Constraints< Real >::pruneActive ( Vector< Real > &  v,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Remove active set variables. v is the vector to be pruned x is the optimization variable eps is the active set tolerance.

Definition at line 183 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
bool ROL::Constraints< Real >::isFeasible ( const Vector< Real > &  v)
inline

Check if the vector, v, is feasible.

Definition at line 193 of file ROL_Constraints.hpp.

References ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::value ( std::vector< Teuchos::RCP< Vector< Real > > > &  c,
const Vector< Real > &  x,
const EConstraint ctype,
std::vector< Real > &  tol 
)
inline

Evaluate constraints: either for all activated equality constraints or for all activated inequality constraints.

Definition at line 208 of file ROL_Constraints.hpp.

References ROL::CONSTRAINT_EQUALITY, ROL::CONSTRAINT_INEQUALITY, and ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::applyJacobian ( std::vector< Teuchos::RCP< Vector< Real > > > &  jv,
std::vector< Teuchos::RCP< const Vector< Real > > > &  v,
const Vector< Real > &  x,
const bool &  adj,
const EConstraint ctype,
std::vector< Real > &  tol 
)
inline

Apply constraint Jacobians or their adjoints: either for all activated equality constraints or for all activated inequality constraints.

Definition at line 230 of file ROL_Constraints.hpp.

References ROL::CONSTRAINT_EQUALITY, ROL::CONSTRAINT_INEQUALITY, and ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::maptoJacobianKernel ( std::vector< Teuchos::RCP< Vector< Real > > > &  wv,
std::vector< Teuchos::RCP< const Vector< Real > > > &  v,
const Vector< Real > &  x,
const EConstraint ctype,
std::vector< Real > &  tol 
)
inline

Compute the action of the operators W that are onto the null space (kernel) of the contraint Jacobians: either for all activated equality constraints or for all activated inequality constraints.

Definition at line 258 of file ROL_Constraints.hpp.

References ROL::CONSTRAINT_EQUALITY, ROL::CONSTRAINT_INEQUALITY, and ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::applyHessian ( std::vector< Teuchos::RCP< Vector< Real > > > &  huv,
std::vector< Teuchos::RCP< const Vector< Real > > > &  u,
std::vector< Teuchos::RCP< const Vector< Real > > > &  v,
const Vector< Real > &  x,
const EConstraint ctype,
std::vector< Real > &  tol 
)
inline

Apply constraint Hessians to (v,u), c''(x)(v,u) = (c''(x)u)v: either for all activated equality constraints or for all activated inequality constraints.

Definition at line 284 of file ROL_Constraints.hpp.

References ROL::CONSTRAINT_EQUALITY, ROL::CONSTRAINT_INEQUALITY, and ROL::Constraints< Real >::isActivated().

template<class Real >
void ROL::Constraints< Real >::pruneInactive ( Vector< Real > &  v,
const Vector< Real > &  g,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Remove the inactive set variables that are not in the binding set. v is the vector to be pruned g is the gradient of the objective function at x x is the optimization variable eps is the active set tolerance.

Definition at line 313 of file ROL_Constraints.hpp.

References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::clone(), and ROL::Constraints< Real >::pruneActive().

template<class Real >
void ROL::Constraints< Real >::pruneInactive ( Vector< Real > &  v,
const Vector< Real > &  x,
Real  eps = 0.0 
)
inline

Remove the inactive set variables. v is the vector to be pruned x is the optimization variable eps is the active set tolerance.

Definition at line 325 of file ROL_Constraints.hpp.

References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::clone(), and ROL::Constraints< Real >::pruneActive().

template<class Real >
void ROL::Constraints< Real >::computeProjectedGradient ( Vector< Real > &  g,
const Vector< Real > &  x 
)
inline

Compute projected gradient. g is the gradient of the objective function at x x is the optimization variable.

Definition at line 336 of file ROL_Constraints.hpp.

References ROL::Vector< Real >::clone(), and ROL::Constraints< Real >::pruneActive().

template<class Real >
void ROL::Constraints< Real >::computeProjectedStep ( Vector< Real > &  v,
const Vector< Real > &  x 
)
inline

Compute projected step P(x+v)-x. v is the step vector x is the optimization variables.

Definition at line 346 of file ROL_Constraints.hpp.

References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::plus(), and ROL::Constraints< Real >::project().

template<class Real >
void ROL::Constraints< Real >::activate ( void  )
inline

Turn on constraints.

Definition at line 354 of file ROL_Constraints.hpp.

template<class Real >
void ROL::Constraints< Real >::deactivate ( void  )
inline

Turn off constraints.

Definition at line 358 of file ROL_Constraints.hpp.

template<class Real >
bool ROL::Constraints< Real >::isActivated ( void  )
inline

Member Data Documentation

template<class Real >
bool ROL::Constraints< Real >::activated_
private

Definition at line 58 of file ROL_Constraints.hpp.

Referenced by ROL::Constraints< Real >::isActivated().

template<class Real >
std::vector<Teuchos::RCP<BoundConstraint<Real> > > ROL::Constraints< Real >::ic_
private

Definition at line 60 of file ROL_Constraints.hpp.

template<class Real >
std::vector<Teuchos::RCP<EqualityConstraint<Real> > > ROL::Constraints< Real >::ec_
private

Definition at line 61 of file ROL_Constraints.hpp.


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