44 #ifndef ROL_SIMULATED_OBJECTIVE_CVAR_H
45 #define ROL_SIMULATED_OBJECTIVE_CVAR_H
57 const ROL::Ptr<SampleGenerator<Real> >
sampler_;
58 const ROL::Ptr<Objective_SimOpt<Real> >
pobj_;
59 const ROL::Ptr<PlusFunction<Real> >
pfunc_;
73 pobj_->update(x,flag,iter);
79 ROL::Ptr<const Vector<Real> > uptr = uz.
get_1();
80 ROL::Ptr<const Vector<Real> > zptr = uz.
get_2();
84 ROL::Ptr<const Vector<Real> > z = rz.
getVector();
86 std::vector<Real> param;
87 Real weight(0), one(1);
93 param =
sampler_->getMyPoint(static_cast<int>(i));
94 weight =
sampler_->getMyWeight(static_cast<int>(i));
95 pobj_->setParameter(param);
98 tmpval =
pobj_->value(*(pu.
get(i)), *z, tol);
99 tmpplus =
pfunc_->evaluate(tmpval-t, 0);
100 tmpsum += tmpplus*weight;
103 val *= (one/(one-
alpha_));
114 ROL::Ptr<const Vector<Real> > xuptr = xuz.
get_1();
115 ROL::Ptr<const Vector<Real> > xzptr = xuz.
get_2();
119 ROL::Ptr<const Vector<Real> > xz = rxz.
getVector();
122 ROL::Ptr<Vector<Real> > guptr = guz.
get_1();
123 ROL::Ptr<Vector<Real> > gzptr = guz.
get_2();
126 ROL::Ptr<Vector<Real> > gz = rgz.
getVector();
128 std::vector<Real> param;
129 Real weight(0), one(1), sum(0), tmpsum(0), tmpval(0), tmpplus(0);
132 ROL::Ptr<Vector<Real> > tmp1 = gz->clone();
133 ROL::Ptr<Vector<Real> > tmp2 = gz->clone();
135 param =
sampler_->getMyPoint(static_cast<int>(i));
136 weight =
sampler_->getMyWeight(static_cast<int>(i));
137 pobj_->setParameter(param);
140 tmpval =
pobj_->value(*(pxu.
get(i)), *xz, tol);
141 tmpplus =
pfunc_->evaluate(tmpval-xt, 1);
142 tmpsum += weight*tmpplus;
146 pobj_->gradient(gi, xi, tol);
147 gi.scale(weight*tmpplus);
154 gz->scale(one/(one-
alpha_));