ROL
|
Provides the interface to evaluate the Moreau-Yosida penalty function. More...
#include <ROL_MoreauYosidaPenalty.hpp>
Public Member Functions | |
~MoreauYosidaPenalty () | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, const Real mu=1e1) | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, ROL::ParameterList &parlist) | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, const ROL::Vector< Real > &lam, ROL::ParameterList &parlist) | |
void | updateMultipliers (Real mu, const ROL::Vector< Real > &x) |
void | reset (const Real mu) |
Real | testComplementarity (const ROL::Vector< Real > &x) |
Real | getObjectiveValue (void) const |
ROL::Ptr< Vector< Real > > | getGradient (void) const |
int | getNumberFunctionEvaluations (void) |
int | getNumberGradientEvaluations (void) |
void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update Moreau-Yosida penalty function. More... | |
Real | value (const Vector< Real > &x, Real &tol) |
Compute value. More... | |
void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
Compute gradient. More... | |
void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply Hessian approximation to vector. More... | |
void | setParameter (const std::vector< Real > ¶m) |
Public Member Functions inherited from ROL::Objective< Real > | |
virtual | ~Objective () |
virtual Real | dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol) |
Compute directional derivative. More... | |
virtual void | invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply inverse Hessian approximation to vector. More... | |
virtual void | precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply preconditioner to vector. More... | |
virtual std::vector < std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference gradient check. More... | |
virtual std::vector < std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference gradient check. More... | |
virtual std::vector < std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference gradient check with specified step sizes. More... | |
virtual std::vector < std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference gradient check with specified step sizes. More... | |
virtual std::vector < std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference Hessian-applied-to-vector check. More... | |
virtual std::vector < std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference Hessian-applied-to-vector check. More... | |
virtual std::vector < std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference Hessian-applied-to-vector check with specified step sizes. More... | |
virtual std::vector < std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference Hessian-applied-to-vector check with specified step sizes. More... | |
virtual std::vector< Real > | checkHessSym (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout) |
Hessian symmetry check. More... | |
virtual std::vector< Real > | checkHessSym (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout) |
Hessian symmetry check. More... | |
Private Member Functions | |
void | computePenalty (const Vector< Real > &x) |
void | initialize (const ROL::Vector< Real > &x, const ROL::Ptr< ROL::BoundConstraint< Real > > &con) |
Private Attributes | |
const ROL::Ptr< Objective< Real > > | obj_ |
const ROL::Ptr < BoundConstraint< Real > > | con_ |
ROL::Ptr< Vector< Real > > | g_ |
ROL::Ptr< Vector< Real > > | l_ |
ROL::Ptr< Vector< Real > > | u_ |
ROL::Ptr< Vector< Real > > | l1_ |
ROL::Ptr< Vector< Real > > | u1_ |
ROL::Ptr< Vector< Real > > | dl1_ |
ROL::Ptr< Vector< Real > > | du1_ |
ROL::Ptr< Vector< Real > > | xlam_ |
ROL::Ptr< Vector< Real > > | v_ |
ROL::Ptr< Vector< Real > > | dv_ |
ROL::Ptr< Vector< Real > > | dv2_ |
ROL::Ptr< Vector< Real > > | lam_ |
ROL::Ptr< Vector< Real > > | tmp_ |
Real | mu_ |
Real | fval_ |
bool | isConEvaluated_ |
int | nfval_ |
int | ngval_ |
bool | updateMultiplier_ |
bool | updatePenalty_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::Objective< Real > | |
const std::vector< Real > | getParameter (void) const |
Provides the interface to evaluate the Moreau-Yosida penalty function.
Definition at line 65 of file ROL_MoreauYosidaPenalty.hpp.
|
inline |
Definition at line 158 of file ROL_MoreauYosidaPenalty.hpp.
|
inline |
Definition at line 160 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::initialize().
|
inline |
|
inline |
Definition at line 183 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::updateMultiplier_, and ROL::MoreauYosidaPenalty< Real >::updatePenalty_.
|
inlineprivate |
Definition at line 92 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::u_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
Referenced by ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
inlineprivate |
Definition at line 132 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::Vector< Real >::clone(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::Vector< Real >::dual(), ROL::MoreauYosidaPenalty< Real >::dv2_, ROL::MoreauYosidaPenalty< Real >::dv_, ROL::MoreauYosidaPenalty< Real >::g_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::u_, ROL::MoreauYosidaPenalty< Real >::v_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty().
|
inline |
Definition at line 198 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::nfval_, ROL::MoreauYosidaPenalty< Real >::ngval_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::updateMultiplier_, and ROL::MoreauYosidaPenalty< Real >::updatePenalty_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inline |
|
inline |
Definition at line 222 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, and ROL::MoreauYosidaPenalty< Real >::u_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inline |
Definition at line 245 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::fval_.
|
inline |
Definition at line 249 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::g_.
|
inline |
Definition at line 253 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::nfval_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inline |
Definition at line 257 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::ngval_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inlinevirtual |
Update Moreau-Yosida penalty function.
This function updates the Moreau-Yosida penalty function at new iterations.
[in] | x | is the new iterate. |
[in] | flag | is true if the iterate has changed. |
[in] | iter | is the outer algorithm iterations count. |
Reimplemented from ROL::Objective< Real >.
Definition at line 268 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, and ROL::MoreauYosidaPenalty< Real >::obj_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update(), and ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
Compute value.
This function returns the Moreau-Yosida penalty value.
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact Moreau-Yosida penalty computation. |
Implements ROL::Objective< Real >.
Definition at line 280 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::fval_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::nfval_, ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::MoreauYosidaPenalty< Real >::u1_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
Compute gradient.
This function returns the Moreau-Yosida penalty gradient.
[out] | g | is the gradient. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact Moreau-Yosida penalty computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 301 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::MoreauYosidaPenalty< Real >::g_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::ngval_, ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::Vector< Real >::set().
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
Apply Hessian approximation to vector.
This function applies the Hessian of the Moreau-Yosida penalty to the vector \(v\).
[out] | hv | is the the action of the Hessian on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact Moreau-Yosida penalty computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 322 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::con_, ROL::MoreauYosidaPenalty< Real >::dv2_, ROL::MoreauYosidaPenalty< Real >::dv_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::obj_, ROL::MoreauYosidaPenalty< Real >::v_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
|
inlinevirtual |
Reimplemented from ROL::Objective< Real >.
Definition at line 356 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::Objective< Real >::setParameter().
|
private |
Definition at line 67 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::setParameter(), ROL::MoreauYosidaPenalty< Real >::update(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 68 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::update(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 70 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::getGradient(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 71 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 72 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 73 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 74 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 75 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 76 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 77 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 78 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 79 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 80 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 81 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
Definition at line 82 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 84 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 85 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::getObjectiveValue(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 86 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), ROL::MoreauYosidaPenalty< Real >::update(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
|
private |
|
private |
Definition at line 89 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
Definition at line 90 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().