ROL
ROL_TypeG_StabilizedLCLAlgorithm_Def.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Rapid Optimization Library (ROL) Package
5 // Copyright (2014) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact lead developers:
38 // Drew Kouri (dpkouri@sandia.gov) and
39 // Denis Ridzal (dridzal@sandia.gov)
40 //
41 // ************************************************************************
42 // @HEADER
43 
44 #ifndef ROL_TYPEG_STABILIZEDLCLALGORITHM_DEF_H
45 #define ROL_TYPEG_STABILIZEDLCLALGORITHM_DEF_H
46 
48 #include "ROL_Bounds.hpp"
49 
50 namespace ROL {
51 namespace TypeG {
52 
53 template<typename Real>
54 StabilizedLCLAlgorithm<Real>::StabilizedLCLAlgorithm( ParameterList &list, const Ptr<Secant<Real>> &secant )
55  : TypeG::Algorithm<Real>::Algorithm(), secant_(secant), list_(list), subproblemIter_(0) {
56  // Set status test
57  status_->reset();
58  status_->add(makePtr<ConstraintStatusTest<Real>>(list));
59 
60  Real one(1), p1(0.1), p9(0.9), ten(1.e1), oe8(1.e8), oem8(1.e-8);
61  ParameterList& sublist = list.sublist("Step").sublist("Stabilized LCL");
62  useDefaultInitPen_ = sublist.get("Use Default Initial Penalty Parameter", true);
63  state_->searchSize = sublist.get("Initial Penalty Parameter", ten);
64  sigma_ = sublist.get("Initial Elastic Penalty Parameter", ten*ten);
65  // Multiplier update parameters
66  scaleLagrangian_ = sublist.get("Use Scaled Stabilized LCL", false);
67  penaltyUpdate_ = sublist.get("Penalty Parameter Growth Factor", ten);
68  maxPenaltyParam_ = sublist.get("Maximum Penalty Parameter", oe8);
69  sigmaMax_ = sublist.get("Maximum Elastic Penalty Parameter", oe8);
70  sigmaUpdate_ = sublist.get("Elastic Penalty Parameter Growth Rate", ten);
71  // Optimality tolerance update
72  optIncreaseExponent_ = sublist.get("Optimality Tolerance Increase Exponent", one);
73  optDecreaseExponent_ = sublist.get("Optimality Tolerance Decrease Exponent", one);
74  optToleranceInitial_ = sublist.get("Initial Optimality Tolerance", one);
75  // Feasibility tolerance update
76  feasIncreaseExponent_ = sublist.get("Feasibility Tolerance Increase Exponent", p9);
77  feasDecreaseExponent_ = sublist.get("Feasibility Tolerance Decrease Exponent", p1);
78  feasToleranceInitial_ = sublist.get("Initial Feasibility Tolerance", one);
79  // Subproblem information
80  maxit_ = sublist.get("Subproblem Iteration Limit", 1000);
81  subStep_ = sublist.get("Subproblem Step Type", "Trust Region");
82  HessianApprox_ = sublist.get("Level of Hessian Approximation", 0);
83  list_.sublist("Step").set("Type",subStep_);
84  list_.sublist("Status Test").set("Iteration Limit",maxit_);
85  // Verbosity setting
86  verbosity_ = list.sublist("General").get("Output Level", 0);
88  bool print = verbosity_ > 2;
89  list_.sublist("General").set("Output Level",(print ? verbosity_ : 0));
90  // Outer iteration tolerances
91  outerFeasTolerance_ = list.sublist("Status Test").get("Constraint Tolerance", oem8);
92  outerOptTolerance_ = list.sublist("Status Test").get("Gradient Tolerance", oem8);
93  outerStepTolerance_ = list.sublist("Status Test").get("Step Tolerance", oem8);
94  // Scaling
95  useDefaultScaling_ = sublist.get("Use Default Problem Scaling", true);
96  fscale_ = sublist.get("Objective Scaling", one);
97  cscale_ = sublist.get("Constraint Scaling", one);
98 }
99 
100 template<typename Real>
102  const Vector<Real> &g,
103  const Vector<Real> &l,
104  const Vector<Real> &c,
105  ElasticObjective<Real> &alobj,
107  Constraint<Real> &con,
108  std::ostream &outStream ) {
109  hasPolyProj_ = true;
110  if (proj_ == nullPtr) {
111  proj_ = makePtr<PolyhedralProjection<Real>>(makePtrFromRef(bnd));
112  hasPolyProj_ = false;
113  }
114  proj_->project(x,outStream);
115 
116  const Real one(1), TOL(1.e-2);
117  Real tol = std::sqrt(ROL_EPSILON<Real>());
119 
120  // Initialize the algorithm state
121  state_->nfval = 0;
122  state_->ncval = 0;
123  state_->ngrad = 0;
124 
125  // Compute objective value
126  alobj.getAugmentedLagrangian()->update(x,UpdateType::Initial,state_->iter);
127  state_->value = alobj.getObjectiveValue(x,tol);
128  alobj.getAugmentedLagrangian()->gradient(*state_->gradientVec,x,tol);
129 
130  // Compute constraint violation
131  state_->constraintVec->set(*alobj.getConstraintVec(x,tol));
132  state_->cnorm = state_->constraintVec->norm();
133 
134  // Update evaluation counters
135  state_->ncval += alobj.getNumberConstraintEvaluations();
136  state_->nfval += alobj.getNumberFunctionEvaluations();
137  state_->ngrad += alobj.getNumberGradientEvaluations();
138 
139  // Compute problem scaling
140  if (useDefaultScaling_) {
141  fscale_ = one/std::max(one,alobj.getObjectiveGradient(x,tol)->norm());
142  try {
143  Ptr<Vector<Real>> ji = x.clone();
144  Real maxji(0), normji(0);
145  for (int i = 0; i < c.dimension(); ++i) {
146  con.applyAdjointJacobian(*ji,*c.basis(i),x,tol);
147  normji = ji->norm();
148  maxji = std::max(normji,maxji);
149  }
150  cscale_ = one/std::max(one,maxji);
151  }
152  catch (std::exception &e) {
153  cscale_ = one;
154  }
155  }
156  alobj.setScaling(fscale_,cscale_);
157 
158  // Compute gradient of the lagrangian
159  x.axpy(-one,state_->gradientVec->dual());
160  proj_->project(x,outStream);
161  x.axpy(-one/std::min(fscale_,cscale_),*state_->iterateVec);
162  state_->gnorm = x.norm();
163  x.set(*state_->iterateVec);
164 
165  // Compute initial penalty parameter
166  if (useDefaultInitPen_) {
167  const Real oem8(1e-8), oem2(1e-2), two(2), ten(10);
168  state_->searchSize = std::max(oem8,
169  std::min(ten*std::max(one,std::abs(fscale_*state_->value))
170  / std::max(one,std::pow(cscale_*state_->cnorm,two)),oem2*maxPenaltyParam_));
171  }
172  // Initialize intermediate stopping tolerances
173  optTolerance_ = std::max<Real>(TOL*outerOptTolerance_,
174  optToleranceInitial_);
175  //optTolerance_ = std::min<Real>(optTolerance_,TOL*state_->gnorm);
176  feasTolerance_ = std::max<Real>(TOL*outerFeasTolerance_,
177  feasToleranceInitial_);
178 
179  // Set data
180  alobj.reset(l,state_->searchSize,sigma_);
181 
182  if (verbosity_ > 1) {
183  outStream << std::endl;
184  outStream << "Stabilized LCL Initialize" << std::endl;
185  outStream << "Objective Scaling: " << fscale_ << std::endl;
186  outStream << "Constraint Scaling: " << cscale_ << std::endl;
187  outStream << "Penalty Parameter: " << state_->searchSize << std::endl;
188  outStream << std::endl;
189  }
190 }
191 
192 template<typename Real>
194  std::ostream &outStream ) {
195  if (problem.getProblemType() == TYPE_EB) {
196  problem.edit();
197  problem.finalize(true,verbosity_>3,outStream); // Lump linear and nonlinear constraints
198  run(*problem.getPrimalOptimizationVector(),
199  *problem.getDualOptimizationVector(),
200  *problem.getObjective(),
201  *problem.getBoundConstraint(),
202  *problem.getConstraint(),
203  *problem.getMultiplierVector(),
204  *problem.getResidualVector(),
205  outStream);
206  problem.finalizeIteration();
207  }
208  else {
209  throw Exception::NotImplemented(">>> ROL::TypeG::Algorithm::run : Optimization problem is not Type G!");
210  }
211 }
212 
213 template<typename Real>
215  const Vector<Real> &g,
216  Objective<Real> &obj,
218  Constraint<Real> &econ,
219  Vector<Real> &emul,
220  const Vector<Real> &eres,
221  std::ostream &outStream ) {
222  const Real one(1), oem2(1e-2);
223  Real tol(std::sqrt(ROL_EPSILON<Real>())), cnorm(0), lnorm;;
224  // Initialize augmented Lagrangian data
225  ElasticObjective<Real> alobj(makePtrFromRef(obj),makePtrFromRef(econ),
226  state_->searchSize,sigma_,g,eres,emul,
227  scaleLagrangian_,HessianApprox_);
228  initialize(x,g,emul,eres,alobj,bnd,econ,outStream);
229  // Define Elastic Subproblem
230  Ptr<Vector<Real>> u = eres.clone(), v = eres.clone(), c = eres.clone();
231  Ptr<Vector<Real>> gu = emul.clone(), gv = emul.clone(), l = emul.clone();
232  Ptr<Vector<Real>> s = x.clone(), gs = g.clone(), cvec = eres.clone();
233  Ptr<ElasticLinearConstraint<Real>> lcon
234  = makePtr<ElasticLinearConstraint<Real>>(makePtrFromRef(x),
235  makePtrFromRef(econ),
236  makePtrFromRef(eres));
237  std::vector<Ptr<Vector<Real>>> vecList = {s,u,v};
238  Ptr<PartitionedVector<Real>> xp = makePtr<PartitionedVector<Real>>(vecList);
239  Ptr<PartitionedVector<Real>> gxp = makePtr<PartitionedVector<Real>>({gs,gu,gv});
240  Ptr<Vector<Real>> lb = u->clone(); lb->zero();
241  std::vector<Ptr<BoundConstraint<Real>>> bndList(3);
242  bndList[0] = makePtrFromRef(bnd);
243  bndList[1] = makePtr<Bounds<Real>>(*lb,true);
244  bndList[2] = makePtr<Bounds<Real>>(*lb,true);
245  Ptr<BoundConstraint<Real>> xbnd
246  = makePtr<BoundConstraint_Partitioned<Real>>(bndList,vecList);
247  ParameterList ppa_list;
248  if (c->dimension() == 1)
249  ppa_list.sublist("General").sublist("Polyhedral Projection").set("Type","Dai-Fletcher");
250  else
251  ppa_list.sublist("General").sublist("Polyhedral Projection").set("Type","Semismooth Newton");
252  Problem<Real> elc(makePtrFromRef(alobj),xp,gxp);
253  elc.addBoundConstraint(xbnd);
254  elc.addLinearConstraint("ElasticLinearConstraint",lcon,l,c);
255  elc.setProjectionAlgorithm(ppa_list);
256  elc.finalize(false,verbosity_>2,outStream);
257 
258  // Initialize subproblem algorithm
259  Ptr<TypeB::Algorithm<Real>> algo;
260 
261  // Output
262  if (verbosity_ > 0) writeOutput(outStream,true);
263 
264  while (status_->check(*state_)) {
265  lcon->setAnchor(state_->iterateVec);
266  if (verbosity_ > 3) elc.check(true,outStream);
267 
268  // Solve linearly constrained augmented Lagrangian subproblem
269  list_.sublist("Status Test").set("Gradient Tolerance",optTolerance_);
270  list_.sublist("Status Test").set("Step Tolerance",1.e-6*optTolerance_);
271  algo = TypeB::AlgorithmFactory<Real>(list_,secant_);
272  algo->run(elc,outStream);
273  x.set(*xp->get(0));
274 
275  // Update evaluation counters
276  subproblemIter_ = algo->getState()->iter;
277  state_->nfval += alobj.getNumberFunctionEvaluations();
278  state_->ngrad += alobj.getNumberGradientEvaluations();
279  state_->ncval += alobj.getNumberConstraintEvaluations();
280 
281  // Compute step
282  state_->stepVec->set(x);
283  state_->stepVec->axpy(-one,*state_->iterateVec);
284  state_->snorm = state_->stepVec->norm();
285 
286  // Update iteration information
287  state_->iter++;
288  cvec->set(*alobj.getConstraintVec(x,tol));
289  cnorm = cvec->norm();
290  if ( cscale_*cnorm < feasTolerance_ ) {
291  // Update iteration information
292  state_->iterateVec->set(x);
293  state_->value = alobj.getObjectiveValue(x,tol);
294  state_->constraintVec->set(*cvec);
295  state_->cnorm = cnorm;
296 
297  // Update multipliers
298  emul.axpy(static_cast<Real>(-1),*elc.getPolyhedralProjection()->getMultiplier());
299  emul.axpy(state_->searchSize*cscale_,state_->constraintVec->dual());
300 
301  alobj.getAugmentedLagrangian()->gradient(*state_->gradientVec,x,tol);
302  if (scaleLagrangian_) state_->gradientVec->scale(state_->searchSize);
303  econ.applyAdjointJacobian(*gs,*elc.getPolyhedralProjection()->getMultiplier(),x,tol);
304  state_->gradientVec->axpy(-cscale_,*gs);
305  x.axpy(-one/std::min(fscale_,cscale_),state_->gradientVec->dual());
306  proj_->project(x,outStream);
307  x.axpy(-one,*state_->iterateVec);
308  state_->gnorm = x.norm();
309  x.set(*state_->iterateVec);
310 
311  // Update subproblem information
312  lnorm = elc.getPolyhedralProjection()->getMultiplier()->norm();
313  sigma_ = std::min(one+lnorm,sigmaMax_)/(one+state_->searchSize);
314  if ( algo->getState()->statusFlag == EXITSTATUS_CONVERGED ) {
315  optTolerance_ = std::max(oem2*outerOptTolerance_,
316  optTolerance_/(one + std::pow(state_->searchSize,optIncreaseExponent_)));
317  }
318  feasTolerance_ = std::max(oem2*outerFeasTolerance_,
319  feasTolerance_/(one + std::pow(state_->searchSize,feasIncreaseExponent_)));
320 
321  // Update Algorithm State
322  state_->snorm += lnorm + state_->searchSize*cscale_*state_->cnorm;
323  state_->lagmultVec->set(emul);
324  }
325  else {
326  // Update subproblem information
327  state_->searchSize = std::min(penaltyUpdate_*state_->searchSize,maxPenaltyParam_);
328  sigma_ /= sigmaUpdate_;
329  optTolerance_ = std::max(oem2*outerOptTolerance_,
330  optToleranceInitial_/(one + std::pow(state_->searchSize,optDecreaseExponent_)));
331  feasTolerance_ = std::max(oem2*outerFeasTolerance_,
332  feasToleranceInitial_/(one + std::pow(state_->searchSize,feasDecreaseExponent_)));
333  }
334  alobj.reset(emul,state_->searchSize,sigma_);
335 
336  // Update Output
337  if (verbosity_ > 0) writeOutput(outStream,printHeader_);
338  }
339  if (verbosity_ > 0) TypeG::Algorithm<Real>::writeExitStatus(outStream);
340 }
341 
342 template<typename Real>
343 void StabilizedLCLAlgorithm<Real>::writeHeader( std::ostream& os ) const {
344  std::ios_base::fmtflags osFlags(os.flags());
345  if(verbosity_>1) {
346  os << std::string(114,'-') << std::endl;
347  os << "Stabilized LCL status output definitions" << std::endl << std::endl;
348  os << " iter - Number of iterates (steps taken)" << std::endl;
349  os << " fval - Objective function value" << std::endl;
350  os << " cnorm - Norm of the constraint violation" << std::endl;
351  os << " gLnorm - Norm of the gradient of the Lagrangian" << std::endl;
352  os << " snorm - Norm of the step" << std::endl;
353  os << " penalty - Penalty parameter" << std::endl;
354  os << " sigma - Elastic Penalty parameter" << std::endl;
355  os << " feasTol - Feasibility tolerance" << std::endl;
356  os << " optTol - Optimality tolerance" << std::endl;
357  os << " #fval - Number of times the objective was computed" << std::endl;
358  os << " #grad - Number of times the gradient was computed" << std::endl;
359  os << " #cval - Number of times the constraint was computed" << std::endl;
360  os << " subIter - Number of iterations to solve subproblem" << std::endl;
361  os << std::string(114,'-') << std::endl;
362  }
363  os << " ";
364  os << std::setw(6) << std::left << "iter";
365  os << std::setw(15) << std::left << "fval";
366  os << std::setw(15) << std::left << "cnorm";
367  os << std::setw(15) << std::left << "gLnorm";
368  os << std::setw(15) << std::left << "snorm";
369  os << std::setw(10) << std::left << "penalty";
370  os << std::setw(10) << std::left << "sigma";
371  os << std::setw(10) << std::left << "feasTol";
372  os << std::setw(10) << std::left << "optTol";
373  os << std::setw(8) << std::left << "#fval";
374  os << std::setw(8) << std::left << "#grad";
375  os << std::setw(8) << std::left << "#cval";
376  os << std::setw(8) << std::left << "subIter";
377  os << std::endl;
378  os.flags(osFlags);
379 }
380 
381 template<typename Real>
382 void StabilizedLCLAlgorithm<Real>::writeName( std::ostream& os ) const {
383  std::ios_base::fmtflags osFlags(os.flags());
384  os << std::endl << "Stabilized LCL Solver (Type G, General Constraints)";
385  os << std::endl;
386  os << "Subproblem Solver: " << subStep_ << std::endl;
387  os.flags(osFlags);
388 }
389 
390 template<typename Real>
391 void StabilizedLCLAlgorithm<Real>::writeOutput( std::ostream& os, const bool print_header ) const {
392  std::ios_base::fmtflags osFlags(os.flags());
393  os << std::scientific << std::setprecision(6);
394  if ( state_->iter == 0 ) writeName(os);
395  if ( print_header ) writeHeader(os);
396  if ( state_->iter == 0 ) {
397  os << " ";
398  os << std::setw(6) << std::left << state_->iter;
399  os << std::setw(15) << std::left << state_->value;
400  os << std::setw(15) << std::left << state_->cnorm;
401  os << std::setw(15) << std::left << state_->gnorm;
402  os << std::setw(15) << std::left << "---";
403  os << std::scientific << std::setprecision(2);
404  os << std::setw(10) << std::left << state_->searchSize;
405  os << std::setw(10) << std::left << sigma_;
406  os << std::setw(10) << std::left << std::max(feasTolerance_,outerFeasTolerance_);
407  os << std::setw(10) << std::left << std::max(optTolerance_,outerOptTolerance_);
408  os << std::scientific << std::setprecision(6);
409  os << std::setw(8) << std::left << state_->nfval;
410  os << std::setw(8) << std::left << state_->ngrad;
411  os << std::setw(8) << std::left << state_->ncval;
412  os << std::setw(8) << std::left << "---";
413  os << std::endl;
414  }
415  else {
416  os << " ";
417  os << std::setw(6) << std::left << state_->iter;
418  os << std::setw(15) << std::left << state_->value;
419  os << std::setw(15) << std::left << state_->cnorm;
420  os << std::setw(15) << std::left << state_->gnorm;
421  os << std::setw(15) << std::left << state_->snorm;
422  os << std::scientific << std::setprecision(2);
423  os << std::setw(10) << std::left << state_->searchSize;
424  os << std::setw(10) << std::left << sigma_;
425  os << std::setw(10) << std::left << feasTolerance_;
426  os << std::setw(10) << std::left << optTolerance_;
427  os << std::scientific << std::setprecision(6);
428  os << std::setw(8) << std::left << state_->nfval;
429  os << std::setw(8) << std::left << state_->ngrad;
430  os << std::setw(8) << std::left << state_->ncval;
431  os << std::setw(8) << std::left << subproblemIter_;
432  os << std::endl;
433  }
434  os.flags(osFlags);
435 }
436 
437 } // namespace TypeG
438 } // namespace ROL
439 
440 #endif
void check(bool printToStream=false, std::ostream &outStream=std::cout) const
Run vector, linearity and derivative checks for user-supplied vectors, objective function and constra...
Provides the interface to evaluate objective functions.
const Ptr< Constraint< Real > > & getConstraint()
Get the equality constraint.
const Ptr< Vector< Real > > & getPrimalOptimizationVector()
Get the primal optimization space vector.
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual int dimension() const
Return dimension of the vector space.
Definition: ROL_Vector.hpp:196
void addBoundConstraint(const Ptr< BoundConstraint< Real >> &bnd)
Add a bound constraint.
StabilizedLCLAlgorithm(ParameterList &list, const Ptr< Secant< Real >> &secant=nullPtr)
const Ptr< const Vector< Real > > getConstraintVec(const Vector< Real > &x, Real &tol)
virtual ROL::Ptr< Vector > basis(const int i) const
Return i-th basis vector.
Definition: ROL_Vector.hpp:182
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Definition: ROL_Vector.hpp:153
virtual void writeExitStatus(std::ostream &os) const
void addLinearConstraint(std::string name, const Ptr< Constraint< Real >> &linear_econ, const Ptr< Vector< Real >> &linear_emul, const Ptr< Vector< Real >> &linear_eres=nullPtr, bool reset=false)
Add a linear equality constraint.
int getNumberFunctionEvaluations(void) const
const Ptr< BoundConstraint< Real > > & getBoundConstraint()
Get the bound constraint.
virtual void writeHeader(std::ostream &os) const override
Print iterate header.
const Ptr< AugmentedLagrangianObjective< Real > > getAugmentedLagrangian(void) const
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:80
virtual void finalize(bool lumpConstraints=false, bool printToStream=false, std::ostream &outStream=std::cout)
Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem can...
Real getObjectiveValue(const Vector< Real > &x, Real &tol)
Provides an interface to check status of optimization algorithms for problems with equality constrain...
Provides an interface to run general constrained optimization algorithms.
void setScaling(const Real fscale=1.0, const Real cscale=1.0)
virtual void run(Problem< Real > &problem, std::ostream &outStream=std::cout) override
Run algorithm on general constrained problems (Type-G). This is the primary Type-G interface...
Provides the interface to evaluate the elastic augmented Lagrangian.
const Ptr< Objective< Real > > & getObjective()
Get the objective function.
virtual void writeName(std::ostream &os) const override
Print step name.
const Ptr< AlgorithmState< Real > > state_
const Ptr< const Vector< Real > > getObjectiveGradient(const Vector< Real > &x, Real &tol)
int getNumberConstraintEvaluations(void) const
Provides interface for and implements limited-memory secant operators.
Definition: ROL_Secant.hpp:79
const Ptr< Vector< Real > > & getResidualVector()
Get the primal constraint space vector.
const Ptr< Vector< Real > > & getMultiplierVector()
Get the dual constraint space vector.
void finalizeIteration()
Transform the optimization variables to the native parameterization after an optimization algorithm h...
Provides the interface to apply upper and lower bound constraints.
int getNumberGradientEvaluations(void) const
const Ptr< PolyhedralProjection< Real > > & getPolyhedralProjection()
Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds a...
EProblem getProblemType()
Get the optimization problem type (U, B, E, or G).
virtual void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
virtual void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
virtual void set(const Vector &x)
Set where .
Definition: ROL_Vector.hpp:209
virtual Real norm() const =0
Returns where .
void reset(const Vector< Real > &multiplier, Real penaltyParameter, Real sigma)
virtual void edit()
Resume editting optimization problem after finalize has been called.
void initialize(Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &l, const Vector< Real > &c, ElasticObjective< Real > &alobj, BoundConstraint< Real > &bnd, Constraint< Real > &con, std::ostream &outStream=std::cout)
const Ptr< CombinedStatusTest< Real > > status_
const Ptr< Vector< Real > > & getDualOptimizationVector()
Get the dual optimization space vector.
void initialize(const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &mul, const Vector< Real > &c)
Defines the general constraint operator interface.
void setProjectionAlgorithm(ParameterList &parlist)
Set polyhedral projection algorithm.