10 #ifndef ROL_AUGMENTEDLAGRANGIANOBJECTIVE_H
11 #define ROL_AUGMENTEDLAGRANGIANOBJECTIVE_H
18 #include "ROL_Ptr.hpp"
20 #include "ROL_ParameterList.hpp"
57 const Ptr<Objective<Real>>
obj_;
58 const Ptr<Constraint<Real>>
con_;
69 Ptr<ScalarController<Real,int>>
fval_;
89 const Real penaltyParameter,
93 ParameterList &parlist)
97 fval_ = makePtr<ScalarController<Real,int>>();
98 gradient_ = makePtr<VectorController<Real,int>>();
99 conValue_ = makePtr<VectorController<Real,int>>();
106 ParameterList& sublist = parlist.sublist(
"Step").sublist(
"Augmented Lagrangian");
108 HessianApprox_ = sublist.get(
"Level of Hessian Approximation", 0);
113 const Real penaltyParameter,
117 const bool scaleLagrangian,
118 const int HessianApprox)
123 fval_ = makePtr<ScalarController<Real,int>>();
124 gradient_ = makePtr<VectorController<Real,int>>();
125 conValue_ = makePtr<VectorController<Real,int>>();
134 obj_->update(x,type,iter);
135 con_->update(x,type,iter);
136 fval_->objectiveUpdate(type);
141 void setScaling(
const Real fscale = 1.0,
const Real cscale = 1.0) {
151 const Real half(0.5);
174 g.
scale(one/penaltyParameter_);
180 obj_->hessVec(hv,v,x,tol);
212 bool isComputed =
fval_->get(val,key);
Provides the interface to evaluate objective functions.
const Ptr< Constraint< Real > > con_
Ptr< Vector< Real > > dualOptVector_
Real value(const Vector< Real > &x, Real &tol)
Compute value.
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
const Ptr< Objective< Real > > obj_
AugmentedLagrangianObjective(const Ptr< Objective< Real >> &obj, const Ptr< Constraint< Real >> &con, const Real penaltyParameter, const Vector< Real > &dualOptVec, const Vector< Real > &primConVec, const Vector< Real > &dualConVec, ParameterList &parlist)
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
const Ptr< const Vector< Real > > getConstraintVec(const Vector< Real > &x, Real &tol)
Contains definitions of custom data types in ROL.
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
void reset(const Vector< Real > &multiplier, const Real penaltyParameter)
void update(const Vector< Real > &x, UpdateType type, int iter=-1)
Update objective function.
Ptr< VectorController< Real, int > > conValue_
Ptr< Vector< Real > > primConVector_
Ptr< Vector< Real > > multiplier_
Ptr< ScalarController< Real, int > > fval_
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
AugmentedLagrangianObjective(const Ptr< Objective< Real >> &obj, const Ptr< Constraint< Real >> &con, const Real penaltyParameter, const Vector< Real > &dualOptVec, const Vector< Real > &primConVec, const Vector< Real > &dualConVec, const bool scaleLagrangian, const int HessianApprox)
Provides the interface to evaluate the augmented Lagrangian.
void setScaling(const Real fscale=1.0, const Real cscale=1.0)
int getNumberFunctionEvaluations(void) const
virtual void set(const Vector &x)
Set where .
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
const Ptr< const Vector< Real > > getObjectiveGradient(const Vector< Real > &x, Real &tol)
Ptr< VectorController< Real, int > > gradient_
int getNumberConstraintEvaluations(void) const
Real getObjectiveValue(const Vector< Real > &x, Real &tol)
Defines the general constraint operator interface.
Ptr< Vector< Real > > dualConVector_
int getNumberGradientEvaluations(void) const