ROL
|
Provides the interface to evaluate the Moreau-Yosida penalty function. More...
#include <ROL_MoreauYosidaObjective.hpp>
Public Member Functions | |
MoreauYosidaObjective (const Ptr< Objective< Real >> &obj, const Ptr< BoundConstraint< Real >> &bnd, const Vector< Real > &x, const Vector< Real > &g, const Real mu=1e1, const bool updateMultiplier=true, const bool updatePenalty=true) | |
MoreauYosidaObjective (const Ptr< Objective< Real >> &obj, const Ptr< BoundConstraint< Real >> &bnd, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &lam, const Real mu=1e1, const bool updateMultiplier=true, const bool updatePenalty=true) | |
MoreauYosidaObjective (const Ptr< Objective< Real >> &obj, const Ptr< BoundConstraint< Real >> &bnd, const Vector< Real > &x, const Vector< Real > &g, ParameterList &parlist) | |
MoreauYosidaObjective (const Ptr< Objective< Real >> &obj, const Ptr< BoundConstraint< Real >> &bnd, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &lam, ParameterList &parlist) | |
void | updateMultipliers (Real mu, const Vector< Real > &x) |
void | reset (const Real mu) |
Real | testComplementarity (const Vector< Real > &x) |
Real | getObjectiveValue (const Vector< Real > &x, Real &tol) |
void | getObjectiveGradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
int | getNumberFunctionEvaluations (void) |
int | getNumberGradientEvaluations (void) |
void | update (const Vector< Real > &x, UpdateType type, 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... | |
Public Member Functions inherited from ROL::Objective< Real > | |
virtual | ~Objective () |
Objective () | |
virtual void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update objective function. More... | |
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 void | prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol) |
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... | |
virtual void | setParameter (const std::vector< Real > ¶m) |
Private Member Functions | |
void | computePenalty (const Vector< Real > &x) |
void | initialize (const Vector< Real > &x, const Vector< Real > &g) |
Private Attributes | |
const Ptr< Objective< Real > > | obj_ |
const Ptr< BoundConstraint < Real > > | bnd_ |
Ptr< Vector< Real > > | l_ |
Ptr< Vector< Real > > | u_ |
Ptr< Vector< Real > > | l1_ |
Ptr< Vector< Real > > | u1_ |
Ptr< Vector< Real > > | dl1_ |
Ptr< Vector< Real > > | du1_ |
Ptr< Vector< Real > > | xlam_ |
Ptr< Vector< Real > > | v_ |
Ptr< Vector< Real > > | dv_ |
Ptr< Vector< Real > > | dv2_ |
Ptr< Vector< Real > > | lam_ |
Ptr< Vector< Real > > | tmp_ |
Ptr< ScalarController< Real, int > > | fval_ |
Ptr< VectorController< Real, int > > | gradient_ |
Real | mu_ |
bool | isPenEvaluated_ |
int | nfval_ |
int | ngrad_ |
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 33 of file ROL_MoreauYosidaObjective.hpp.
|
inline |
Definition at line 129 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::initialize().
|
inline |
Definition at line 142 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::lam_.
|
inline |
|
inline |
Definition at line 168 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::lam_.
|
inlineprivate |
Definition at line 61 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::dl1_, ROL::MoreauYosidaObjective< Real >::du1_, ROL::MoreauYosidaObjective< Real >::isPenEvaluated_, ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::l_, ROL::MoreauYosidaObjective< Real >::lam_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::tmp_, ROL::MoreauYosidaObjective< Real >::u1_, ROL::MoreauYosidaObjective< Real >::u_, and ROL::MoreauYosidaObjective< Real >::xlam_.
Referenced by ROL::MoreauYosidaObjective< Real >::gradient(), ROL::MoreauYosidaObjective< Real >::hessVec(), ROL::MoreauYosidaObjective< Real >::testComplementarity(), ROL::MoreauYosidaObjective< Real >::updateMultipliers(), and ROL::MoreauYosidaObjective< Real >::value().
|
inlineprivate |
Definition at line 101 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::Vector< Real >::clone(), ROL::MoreauYosidaObjective< Real >::dl1_, ROL::MoreauYosidaObjective< Real >::du1_, ROL::MoreauYosidaObjective< Real >::dv2_, ROL::MoreauYosidaObjective< Real >::dv_, ROL::MoreauYosidaObjective< Real >::fval_, ROL::MoreauYosidaObjective< Real >::gradient_, ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::l_, ROL::MoreauYosidaObjective< Real >::lam_, ROL::MoreauYosidaObjective< Real >::tmp_, ROL::MoreauYosidaObjective< Real >::u1_, ROL::MoreauYosidaObjective< Real >::u_, ROL::MoreauYosidaObjective< Real >::v_, and ROL::MoreauYosidaObjective< Real >::xlam_.
Referenced by ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective().
|
inline |
Definition at line 178 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::isPenEvaluated_, ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::lam_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::nfval_, ROL::MoreauYosidaObjective< Real >::ngrad_, ROL::MoreauYosidaObjective< Real >::u1_, ROL::MoreauYosidaObjective< Real >::updateMultiplier_, and ROL::MoreauYosidaObjective< Real >::updatePenalty_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::run().
|
inline |
Definition at line 195 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::isPenEvaluated_, ROL::MoreauYosidaObjective< Real >::lam_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::nfval_, and ROL::MoreauYosidaObjective< Real >::ngrad_.
|
inline |
Definition at line 202 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::l_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::tmp_, ROL::MoreauYosidaObjective< Real >::u1_, and ROL::MoreauYosidaObjective< Real >::u_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().
|
inline |
Definition at line 225 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::fval_, ROL::MoreauYosidaObjective< Real >::nfval_, and ROL::MoreauYosidaObjective< Real >::obj_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::MoreauYosidaObjective< Real >::value().
|
inline |
Definition at line 236 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::gradient_, ROL::MoreauYosidaObjective< Real >::ngrad_, and ROL::MoreauYosidaObjective< Real >::obj_.
Referenced by ROL::MoreauYosidaObjective< Real >::gradient(), ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().
|
inline |
Definition at line 245 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::nfval_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run().
|
inline |
Definition at line 249 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::ngrad_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run().
|
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 260 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::fval_, ROL::MoreauYosidaObjective< Real >::gradient_, ROL::MoreauYosidaObjective< Real >::isPenEvaluated_, and ROL::MoreauYosidaObjective< Real >::obj_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< 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 274 of file ROL_MoreauYosidaObjective.hpp.
References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::getObjectiveValue(), ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::mu_, and ROL::MoreauYosidaObjective< Real >::u1_.
|
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 293 of file ROL_MoreauYosidaObjective.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::dl1_, ROL::MoreauYosidaObjective< Real >::du1_, ROL::MoreauYosidaObjective< Real >::getObjectiveGradient(), and ROL::MoreauYosidaObjective< Real >::mu_.
|
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 312 of file ROL_MoreauYosidaObjective.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::dv2_, ROL::MoreauYosidaObjective< Real >::dv_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::obj_, ROL::MoreauYosidaObjective< Real >::v_, and ROL::MoreauYosidaObjective< Real >::xlam_.
|
private |
|
private |
Definition at line 36 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::gradient(), ROL::MoreauYosidaObjective< Real >::hessVec(), ROL::MoreauYosidaObjective< Real >::initialize(), ROL::MoreauYosidaObjective< Real >::testComplementarity(), ROL::MoreauYosidaObjective< Real >::updateMultipliers(), and ROL::MoreauYosidaObjective< Real >::value().
|
private |
Definition at line 38 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), and ROL::MoreauYosidaObjective< Real >::testComplementarity().
|
private |
Definition at line 39 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), and ROL::MoreauYosidaObjective< Real >::testComplementarity().
|
private |
Definition at line 40 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), ROL::MoreauYosidaObjective< Real >::testComplementarity(), ROL::MoreauYosidaObjective< Real >::updateMultipliers(), and ROL::MoreauYosidaObjective< Real >::value().
|
private |
Definition at line 41 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), ROL::MoreauYosidaObjective< Real >::testComplementarity(), ROL::MoreauYosidaObjective< Real >::updateMultipliers(), and ROL::MoreauYosidaObjective< Real >::value().
|
private |
Definition at line 42 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::gradient(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 43 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::gradient(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 44 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::hessVec(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 45 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::hessVec(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 46 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::hessVec(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 47 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::hessVec(), and ROL::MoreauYosidaObjective< Real >::initialize().
|
private |
Definition at line 48 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaObjective< Real >::reset(), and ROL::MoreauYosidaObjective< Real >::updateMultipliers().
|
private |
Definition at line 49 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::initialize(), and ROL::MoreauYosidaObjective< Real >::testComplementarity().
|
private |
Definition at line 51 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::getObjectiveValue(), ROL::MoreauYosidaObjective< Real >::initialize(), and ROL::MoreauYosidaObjective< Real >::update().
|
private |
Definition at line 52 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::getObjectiveGradient(), ROL::MoreauYosidaObjective< Real >::initialize(), and ROL::MoreauYosidaObjective< Real >::update().
|
private |
Definition at line 54 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::gradient(), ROL::MoreauYosidaObjective< Real >::hessVec(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaObjective< Real >::reset(), ROL::MoreauYosidaObjective< Real >::testComplementarity(), ROL::MoreauYosidaObjective< Real >::updateMultipliers(), and ROL::MoreauYosidaObjective< Real >::value().
|
private |
|
private |
Definition at line 56 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::getNumberFunctionEvaluations(), ROL::MoreauYosidaObjective< Real >::getObjectiveValue(), ROL::MoreauYosidaObjective< Real >::reset(), and ROL::MoreauYosidaObjective< Real >::updateMultipliers().
|
private |
Definition at line 57 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::getNumberGradientEvaluations(), ROL::MoreauYosidaObjective< Real >::getObjectiveGradient(), ROL::MoreauYosidaObjective< Real >::reset(), and ROL::MoreauYosidaObjective< Real >::updateMultipliers().
|
private |
Definition at line 58 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), and ROL::MoreauYosidaObjective< Real >::updateMultipliers().
|
private |
Definition at line 59 of file ROL_MoreauYosidaObjective.hpp.
Referenced by ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), and ROL::MoreauYosidaObjective< Real >::updateMultipliers().