ROL
ROL_ColemanLiModel.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Rapid Optimization Library (ROL) Package
4 //
5 // Copyright 2014 NTESS and the ROL contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef ROL_COLEMANLIMODEL_HPP
11 #define ROL_COLEMANLIMODEL_HPP
12 
13 #include "ROL_TrustRegionModel.hpp"
14 
23 namespace ROL {
24 
25 template<class Real>
26 class ColemanLiModel : public TrustRegionModel<Real> {
27 private:
28  Ptr<Vector<Real>> prim_, dual_, hv_; // Auxiliary storage
29  Ptr<Vector<Real>> step_; // Step storage
30  Ptr<Vector<Real>> cauchyStep_, cauchyScal_; // Cauchy point vectors
31  Ptr<Vector<Real>> reflectStep_, reflectScal_; // Reflective step vectors
32  Ptr<Vector<Real>> Dmat_; // sqrt(abs(v))
33  Ptr<Vector<Real>> Cmat_; // diag(g) * dv/dx
34  Ptr<Vector<Real>> lx_, ux_; // Temporary vectors for bound computation
35 
36  Real TRradius_; // Trust-region radius
37  const Real stepBackMax_, stepBackScale_; // Primal transform parameters
38  const bool singleReflect_; // Use single reflection
39  Real sCs_, pred_; // Actual/predicted reduction
40 
41  Elementwise::Multiply<Real> mult_; // Elementwise multiply
42  Elementwise::Divide<Real> div_; // Elementwise division
43 
44  // Apply diagonal D matrix
45  void applyD( Vector<Real> &Dv, const Vector<Real> &v ) {
46  Dv.set(v);
47  Dv.applyBinary(div_,*Dmat_);
48  }
49 
50  // Apply inverse of diagonal D matrix
51  void applyInverseD( Vector<Real> &Dv, const Vector<Real> &v ) {
52  Dv.set(v);
53  Dv.applyBinary(mult_,*Dmat_);
54  }
55 
56  // Apply diagonal C matrix
57  void applyC( Vector<Real> &Cv, const Vector<Real> &v ) {
58  Cv.set(v);
59  Cv.applyBinary(mult_, *Cmat_);
60  }
61 
62  void constructC(void) {
63  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
64  const Ptr<const Vector<Real>> l = TrustRegionModel<Real>::getBoundConstraint()->getLowerBound();
65  const Ptr<const Vector<Real>> u = TrustRegionModel<Real>::getBoundConstraint()->getUpperBound();
66 
67  // Set Cmat_ to be the sign of the gradient
68  Cmat_->set(gc->dual());
69  Cmat_->applyUnary(Elementwise::Sign<Real>());
70  // If g < 0 and u = INF then set Cmat_ to zero
71  class NegGradInfU : public Elementwise::BinaryFunction<Real> {
72  public:
73  NegGradInfU(void) {}
74  Real apply(const Real &x, const Real &y) const {
75  const Real zero(0), one(1), INF(ROL_INF<Real>());
76  return (x < zero && y == INF) ? zero : one;
77  }
78  };
79  prim_->set(gc->dual());
80  prim_->applyBinary(NegGradInfU(), *u);
81  Cmat_->applyBinary(mult_, *prim_);
82  // If g >= 0 and l = -INF then set Cmat_ to zero
83  class PosGradNinfL : public Elementwise::BinaryFunction<Real> {
84  public:
85  PosGradNinfL(void) {}
86  Real apply(const Real &x, const Real &y) const {
87  const Real zero(0), one(1), NINF(ROL_NINF<Real>());
88  return (x >= zero && y == NINF) ? zero : one;
89  }
90  };
91  prim_->set(gc->dual());
92  prim_->applyBinary(PosGradNinfL(), *l);
93  Cmat_->applyBinary(mult_, *prim_);
94  // Pointwise multiply Cmat_ with the gradient
95  Cmat_->applyBinary(mult_, gc->dual());
96  }
97 
98  void constructInverseD(void) {
99  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
100  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
101  const Ptr<const Vector<Real>> l = TrustRegionModel<Real>::getBoundConstraint()->getLowerBound();
102  const Ptr<const Vector<Real>> u = TrustRegionModel<Real>::getBoundConstraint()->getUpperBound();
103  const Real zero(0), one(1), INF(ROL_INF<Real>()), NINF(ROL_NINF<Real>());
104  const int LESS_THAN = 0;
105  const int EQUAL_TO = 1;
106  const int GREATER_THAN = 2;
107 
108  Dmat_->zero();
109  // CASE (i)
110  // Mask for negative gradient (m1 is 1 if g is negative and 0 otherwise)
111  reflectStep_->applyBinary(Elementwise::ValueSet<Real>(zero, LESS_THAN),gc->dual());
112  // Mask for finite upper bounds (m2 is 1 if u is finite and 0 otherwise)
113  reflectScal_->applyBinary(Elementwise::ValueSet<Real>(INF, LESS_THAN),*u);
114  // Mask for g_i < 0 and u_i < inf
115  reflectScal_->applyBinary(mult_,*reflectStep_);
116  // prim_i = { u_i-x_i if g_i < 0 and u_i < inf
117  // { 0 otherwise
118  prim_->set(*u); prim_->axpy(-one,*xc);
119  prim_->applyBinary(mult_,*reflectScal_);
120  // Add to D
121  Dmat_->plus(*prim_);
122 
123  // CASE (iii)
124  // Mask for infinite upper bounds
125  reflectScal_->applyBinary(Elementwise::ValueSet<Real>(INF, EQUAL_TO),*u);
126  // Mask for g_i < 0 and u_i = inf
127  reflectScal_->applyBinary(mult_,*reflectStep_);
128  // prim_i = { -1 if g_i < 0 and u_i = inf
129  // { 0 otherwise
130  prim_->applyUnary(Elementwise::Fill<Real>(-one));
131  prim_->applyBinary(mult_,*reflectScal_);
132  // Add to D
133  Dmat_->plus(*prim_);
134 
135  // CASE (ii)
136  // m1 = 1-m1
137  reflectStep_->scale(-one);
138  reflectStep_->applyUnary(Elementwise::Shift<Real>(one));
139  // Mask for finite lower bounds
140  reflectScal_->applyBinary(Elementwise::ValueSet<Real>(NINF, GREATER_THAN),*l);
141  // Zero out elements of Jacobian with l_i=-inf
142  reflectScal_->applyBinary(mult_,*reflectStep_);
143  // prim_i = { x_i-l_i if g_i >= 0 and l_i > -inf
144  // { 0 otherwise
145  prim_->set(*xc); prim_->axpy(-one,*l);
146  prim_->applyBinary(mult_,*reflectScal_);
147  // Add to D
148  Dmat_->plus(*prim_);
149 
150  // CASE (iv)
151  // Mask for infinite lower bounds
152  reflectScal_->applyBinary(Elementwise::ValueSet<Real>(NINF, EQUAL_TO),*l);
153  // Mask for g_i>=0 and l_i=-inf
154  reflectScal_->applyBinary(mult_,*reflectStep_);
155  // prim_i = { 1 if g_i >= 0 and l_i = -inf
156  // { 0 otherwise
157  prim_->applyUnary(Elementwise::Fill<Real>(one));
158  prim_->applyBinary(mult_,*reflectScal_);
159  // Add to D
160  Dmat_->plus(*prim_);
161 
162  // d_i = { u_i-x_i if g_i < 0, u_i<inf
163  // { -1 if g_i < 0, u_i=inf
164  // { x_i-l_i if g_i >= 0, l_i>-inf
165  // { 1 if g_i >= 0, l_i=-inf
166  Dmat_->applyUnary(Elementwise::AbsoluteValue<Real>());
167  Dmat_->applyUnary(Elementwise::SquareRoot<Real>());
168  }
169 
170  // Build diagonal D and C matrices
171  void initialize(const Vector<Real> &x, const Vector<Real> &g) {
172  prim_ = x.clone();
173  dual_ = g.clone();
174  hv_ = g.clone();
175  step_ = x.clone();
176  Dmat_ = x.clone();
177  Cmat_ = x.clone();
178  lx_ = x.clone();
179  ux_ = x.clone();
180 
181  cauchyStep_ = x.clone();
182  cauchyScal_ = x.clone();
183  reflectStep_ = x.clone();
184  reflectScal_ = x.clone();
185  }
186 
187  public:
188 
190  const Vector<Real> &x, const Vector<Real> &g,
191  const Real stepBackMax = 0.9999, const Real stepBackScale = 1.0,
192  const bool singleReflect = true,
193  const Ptr<Secant<Real>> &secant = nullPtr,
194  const bool useSecantPrecond = false, const bool useSecantHessVec = false)
195  : TrustRegionModel<Real>::TrustRegionModel(obj,bnd,x,g,secant,useSecantPrecond,useSecantHessVec),
196  TRradius_(1), stepBackMax_(stepBackMax), stepBackScale_(stepBackScale),
197  singleReflect_(singleReflect), sCs_(0), pred_(0) {
198  initialize(x,g);
199  }
200 
203  const Vector<Real> &x, const Vector<Real> &g,
204  const Ptr<Secant<Real>> &secant = nullPtr) {
205  TrustRegionModel<Real>::update(obj,bnd,x,g,secant);
206  constructC();
208  }
209 
210  void setRadius(const Real del) {
211  TRradius_ = del;
212  }
213 
214  /***************************************************************************/
215  /********* BEGIN OBJECTIVE FUNCTION DEFINITIONS **************************/
216  /***************************************************************************/
217  // Note that s is the \f$\hat{s}\f$ and \f$\psi\f$ is the $\hat\psi$ from the paper
218  Real value( const Vector<Real> &s, Real &tol ) {
219  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
220  // Apply Hessian to s
221  hessVec(*hv_, s, s, tol);
222  hv_->scale(static_cast<Real>(0.5));
223  // Form inv(D) * g
224  applyInverseD(*prim_, gc->dual());
225  // Add scaled gradient to Hessian in direction s
226  hv_->plus(prim_->dual());
227  return hv_->dot(s.dual());
228  }
229 
230  void gradient( Vector<Real> &g, const Vector<Real> &s, Real &tol ) {
231  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
232  hessVec(g, s, s, tol);
233  applyInverseD(*prim_, gc->dual());
234  g.plus(prim_->dual());
235  }
236 
237  void hessVec( Vector<Real> &hv, const Vector<Real> &v, const Vector<Real> &s, Real &tol ) {
238  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
239  // Build B = inv(D) * Hessian * inv(D)
240  applyInverseD(*prim_, v);
242  applyInverseD(hv, *dual_);
243  // Build C = diag(g) J
244  applyC(*prim_, v);
245  hv.plus(prim_->dual());
246  }
247  /***************************************************************************/
248  /********* END OBJECTIVE FUNCTION DEFINITIONS ****************************/
249  /***************************************************************************/
250 
251  void dualTransform( Vector<Real> &tv, const Vector<Real> &v ) {
252  applyInverseD(tv, v);
253  }
254 
255  void primalTransform( Vector<Real> &tiv, const Vector<Real> &v ) {
256  Real tol = std::sqrt(ROL_EPSILON<Real>());
257 
258  /**************************************************************************/
259  /* PERFORM OPTIMAL SCALING OF TRUST REGION SUBPROBLEM SOLUTION */
260  /**************************************************************************/
261  applyInverseD(tiv, v);
262  // Get bounds on scalar variable
263  Real lowerBoundV(ROL_NINF<Real>()), upperBoundV(ROL_INF<Real>());
264  getScalarBounds(lowerBoundV, upperBoundV, tiv);
265  // Minimize one dimensional quadratic over bounds
266  Real tauV(1);
267  Real valueV = minimize1D(tauV, lowerBoundV, upperBoundV, v);
268 
269  /**************************************************************************/
270  /* COMPUTE CAUCHY POINT: STORED IN cauchyStep_ AND cauchyScal_ */
271  /**************************************************************************/
272  Real valueG = computeCauchyPoint();
273 
274  /**************************************************************************/
275  /* COMPUTE REFLECTIVE STEP: STORED IN reflectStep_ AND reflectScal_ */
276  /**************************************************************************/
277  if ( singleReflect_ ) {
279  }
280  else {
282  }
284  // Get bounds on scalar variable
285  Real lowerBoundR(ROL_NINF<Real>()), upperBoundR(ROL_INF<Real>());
286  getScalarBounds(lowerBoundR, upperBoundR, *reflectScal_);
287  // Minimize one dimensional quadratic over bounds
288  Real tauR(1);
289  Real valueR = minimize1D(tauR, lowerBoundR, upperBoundR, *reflectStep_);
290 
291  /**************************************************************************/
292  /* CHOOSE STEP THAT GIVES MOST PREDICTED REDUCTION */
293  /**************************************************************************/
294  Real VALUE(0);
295  bool useCauchyPoint = (valueG < valueV);
296  if (useCauchyPoint) {
297  VALUE = valueG;
298  tiv.set(*cauchyScal_);
299  // Store unscaled step
300  step_->set(*cauchyStep_);
301  }
302  else {
303  VALUE = valueV;
304  tiv.scale(tauV);
305  // Store unscaled step
306  step_->set(v);
307  step_->scale(tauV);
308  }
309  bool useReflectStep = (valueR < VALUE);
310  if (useReflectStep) {
311  VALUE = valueR;
312  tiv.set(*reflectScal_);
313  tiv.scale(tauR);
314  // Store unscaled step
315  step_->set(*reflectStep_);
316  step_->scale(tauR);
317  }
318 
319  /**************************************************************************/
320  /* ENSURE CHOSEN STEP IS STRICTLY FEASIBLE */
321  /**************************************************************************/
322  // Computed predicted reduction based on input step
323  if ( !isStrictlyFeasibleStep(tiv) ) {
324  Real snorm = step_->norm();
325  Real theta = std::max( stepBackMax_, static_cast<Real>(1) - stepBackScale_ * snorm);
326  tiv.scale(theta);
327  step_->scale(theta);
328  // Compute predicted reduction
329  pred_ = -value(*step_,tol);
330  }
331  else { // Theta is one
332  // Compute predicted reduction
333  pred_ = -VALUE;
334  }
335 
336  // Compute update for actual reduction
337  applyC(*prim_, *step_);
338  sCs_ = static_cast<Real>(-0.5) * prim_->dot(*step_);
339  }
340 
341  void updatePredictedReduction(Real &pred, const Vector<Real> &s) {
342  pred = pred_;
343  }
344 
345  void updateActualReduction(Real &ared, const Vector<Real> &s) {
346  ared += sCs_;
347  }
348 
349 private:
350 
351  void getScalarBounds( Real &lowerBound, Real &upperBound, const Vector<Real> &p ) {
352  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
353  const Ptr<const Vector<Real>> l = TrustRegionModel<Real>::getBoundConstraint()->getLowerBound();
354  const Ptr<const Vector<Real>> u = TrustRegionModel<Real>::getBoundConstraint()->getUpperBound();
355  const Real one(1);
356  Real pnorm = p.norm();
357 
358  // Define elementwise functions
359  class PruneNegative : public Elementwise::BinaryFunction<Real> {
360  private:
361  const Real val_;
362  public:
363  PruneNegative( const Real val ) : val_(val) {}
364  Real apply(const Real &x, const Real &y) const {
365  return (y < static_cast<Real>(0)) ? x/y : val_;
366  }
367  };
368  class PrunePositive : public Elementwise::BinaryFunction<Real> {
369  private:
370  const Real val_;
371  public:
372  PrunePositive( const Real val ) : val_(val) {}
373  Real apply(const Real &x, const Real &y) const {
374  return (y > static_cast<Real>(0)) ? x/y : val_;
375  }
376  };
377 
378  // Max of (l-x)/p if p > 0
379  prim_->set(*l); prim_->axpy(-one,*xc);
380  prim_->applyBinary(PrunePositive(ROL_NINF<Real>()),p);
381  Real lowerBound1 = prim_->reduce(Elementwise::ReductionMax<Real>());
382  // Max of (u-x)/p if p < 0
383  prim_->set(*u); prim_->axpy(-one,*xc);
384  prim_->applyBinary(PruneNegative(ROL_NINF<Real>()),p);
385  Real lowerBound2 = prim_->reduce(Elementwise::ReductionMax<Real>());
386  // Lower bound
387  Real lowerBound3 = std::max(lowerBound1, lowerBound2);
388 
389  // Min of (u-x)/p if p > 0
390  prim_->set(*u); prim_->axpy(-one,*xc);
391  prim_->applyBinary(PrunePositive(ROL_INF<Real>()),p);
392  Real upperBound1 = prim_->reduce(Elementwise::ReductionMin<Real>());
393  // Max of (l-x)/p if p < 0
394  prim_->set(*l); prim_->axpy(-one,*xc);
395  prim_->applyBinary(PruneNegative(ROL_INF<Real>()),p);
396  Real upperBound2 = prim_->reduce(Elementwise::ReductionMin<Real>());
397  // Upper bound
398  Real upperBound3 = std::min(upperBound1, upperBound2);
399 
400  // Adjust for trust-region constraint
401  lowerBound = std::max(lowerBound3, -TRradius_/pnorm);
402  upperBound = std::min(upperBound3, TRradius_/pnorm);
403  }
404 
405  Real minimize1D(Real &tau, const Real lowerBound, const Real upperBound, const Vector<Real> &p) {
406  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
407  Real tol = std::sqrt(ROL_EPSILON<Real>());
408 
409  // Compute coefficients of one dimensional quadratic
410  hessVec(*hv_, p, p, tol);
411  Real c2 = static_cast<Real>(0.5) * hv_->dot(p.dual());
412  applyInverseD(*prim_, gc->dual());
413  Real c1 = prim_->dot(p);
414 
415  // Minimize one dimensional quadratic over bounds
416  Real lval = (c2 * lowerBound + c1) * lowerBound;
417  Real rval = (c2 * upperBound + c1) * upperBound;
418  tau = (lval < rval) ? lowerBound : upperBound;
419  if (c2 > static_cast<Real>(0)) {
420  Real uncMin = static_cast<Real>(-0.5) * c1/c2;
421  tau = (uncMin > lowerBound && uncMin < upperBound) ? uncMin : tau;
422  }
423 
424  // Return minimal function value
425  return (c2 * tau + c1) * tau;
426  }
427 
428  Real computeCauchyPoint(void) {
429  // Set step = -inv(D) g
430  const Ptr<const Vector<Real>> gc = TrustRegionModel<Real>::getGradient();
431  applyInverseD(*cauchyStep_, gc->dual());
432  cauchyStep_->scale(static_cast<Real>(-1));
433 
434  // Scale Cauchy point
436 
437  // Scalar bounds
438  Real lowerBound(ROL_NINF<Real>()), upperBound(ROL_INF<Real>());
439  getScalarBounds(lowerBound, upperBound, *cauchyScal_);
440 
441  // Minimize 1D quadratic over bounds
442  Real tau(1), value(0);
443  value = minimize1D(tau, lowerBound, upperBound, *cauchyStep_);
444 
445  // Scale Cauchy point and return minimal function value
446  cauchyStep_->scale(tau);
447  cauchyScal_->scale(tau);
448  return value;
449  }
450 
452  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
453  Real alpha = computeAlpha(Dv);
454  Rv.set(v);
455 
456  class LowerBound : public Elementwise::BinaryFunction<Real> {
457  public:
458  Real apply( const Real &x, const Real &y ) const {
459  return (x == y) ? static_cast<Real>(-1) : static_cast<Real>(1);
460  }
461  };
462  prim_->set(*xc); prim_->axpy(alpha,Dv);
463  prim_->applyBinary(LowerBound(),*TrustRegionModel<Real>::getBoundConstraint()->getLowerBound());
464  Rv.applyBinary(mult_,*prim_);
465 
466  class UpperBound : public Elementwise::BinaryFunction<Real> {
467  public:
468  Real apply( const Real &x, const Real &y ) const {
469  return (x == y) ? static_cast<Real>(-1) : static_cast<Real>(1);
470  }
471  };
472  prim_->set(*xc); prim_->axpy(alpha,Dv);
473  prim_->applyBinary(UpperBound(),*TrustRegionModel<Real>::getBoundConstraint()->getUpperBound());
474  Rv.applyBinary(mult_,*prim_);
475  }
476 
478  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
479  Rv.set(v);
480 
481  class LowerBound : public Elementwise::BinaryFunction<Real> {
482  public:
483  Real apply( const Real &x, const Real &y ) const {
484  return (x < y) ? static_cast<Real>(-1) : static_cast<Real>(1);
485  }
486  };
487  prim_->set(*xc); prim_->plus(Dv);
488  prim_->applyBinary(LowerBound(),*TrustRegionModel<Real>::getBoundConstraint()->getLowerBound());
489  Rv.applyBinary(mult_,*prim_);
490 
491  class UpperBound : public Elementwise::BinaryFunction<Real> {
492  public:
493  Real apply( const Real &x, const Real &y ) const {
494  return (x > y) ? static_cast<Real>(-1) : static_cast<Real>(1);
495  }
496  };
497  prim_->set(*xc); prim_->plus(Dv);
498  prim_->applyBinary(UpperBound(),*TrustRegionModel<Real>::getBoundConstraint()->getUpperBound());
499  Rv.applyBinary(mult_,*prim_);
500  }
501 
502  Real computeAlpha( const Vector<Real> &d ) {
503  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
504  const Real one(1);
505 
506  // Define elementwise functions
507  class SafeDivide : public Elementwise::BinaryFunction<Real> {
508  private:
509  const Real val_;
510  public:
511  SafeDivide( const Real val ) : val_(val) {}
512  Real apply(const Real &x, const Real &y) const {
513  const Real zero(0);
514  return (y == zero) ? val_ : x/y;
515  }
516  };
517 
518  // (l - x) / d
519  lx_->set(*TrustRegionModel<Real>::getBoundConstraint()->getLowerBound());
520  lx_->axpy(-one, *xc);
521  lx_->applyBinary(SafeDivide(ROL_INF<Real>()), d);
522 
523  // (u - x) / d
524  ux_->set(*TrustRegionModel<Real>::getBoundConstraint()->getUpperBound());
525  ux_->axpy(-one, *xc);
526  ux_->applyBinary(SafeDivide(ROL_INF<Real>()), d);
527 
528  // max{ (l - x) / d, (u - x) / d }
529  lx_->applyBinary(Elementwise::Max<Real>(),*ux_);
530 
531  // min{ max{ (l - x) / d, (u - x) / d } }
532  return lx_->reduce(Elementwise::ReductionMin<Real>());
533  }
534 
535  bool isStrictlyFeasibleStep( const Vector<Real> &d ) const {
536  const Ptr<const Vector<Real>> xc = TrustRegionModel<Real>::getIterate();
537 
538  class Greater : public Elementwise::BinaryFunction<Real> {
539  public:
540  Greater() {}
541  Real apply(const Real &x, const Real &y) const {
542  return (x > y) ? static_cast<Real>(1) : static_cast<Real>(0);
543  }
544  };
545  prim_->set(*xc); prim_->plus(d);
546  prim_->applyBinary(Greater(),*TrustRegionModel<Real>::getBoundConstraint()->getLowerBound());
547  Real lowerFeasible = prim_->reduce(Elementwise::ReductionMin<Real>());
548 
549  class Lesser : public Elementwise::BinaryFunction<Real> {
550  public:
551  Lesser() {}
552  Real apply(const Real &x, const Real &y) const {
553  return (x < y) ? static_cast<Real>(1) : static_cast<Real>(0);
554  }
555  };
556  prim_->set(*xc); prim_->plus(d);
557  prim_->applyBinary(Lesser(),*TrustRegionModel<Real>::getBoundConstraint()->getUpperBound());
558  Real upperFeasible = prim_->reduce(Elementwise::ReductionMin<Real>());
559 
560  return (upperFeasible * lowerFeasible > 0);
561  }
562 
563 }; // class ColemanLiModel
564 
565 }
566 
567 #endif // ROL_COLEMANLIMODEL_HPP
Provides the interface to evaluate objective functions.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Definition: ROL_Vector.hpp:192
Ptr< Vector< Real > > lx_
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void plus(const Vector &x)=0
Compute , where .
void computeFullReflectiveStep(Vector< Real > &Rv, const Vector< Real > &v, const Vector< Real > &Dv)
Ptr< Vector< Real > > dual_
Ptr< Vector< Real > > prim_
Ptr< Vector< Real > > cauchyScal_
void initialize(const Vector< Real > &x, const Vector< Real > &g)
virtual void applyBinary(const Elementwise::BinaryFunction< Real > &f, const Vector &x)
Definition: ROL_Vector.hpp:214
void gradient(Vector< Real > &g, const Vector< Real > &s, Real &tol)
Compute gradient.
void dualTransform(Vector< Real > &tv, const Vector< Real > &v)
void setRadius(const Real del)
void updatePredictedReduction(Real &pred, const Vector< Real > &s)
void updateActualReduction(Real &ared, const Vector< Real > &s)
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply Hessian approximation to vector.
virtual void update(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr)
void primalTransform(Vector< Real > &tiv, const Vector< Real > &v)
Ptr< Vector< Real > > Cmat_
Ptr< Vector< Real > > Dmat_
Provides the interface to evaluate trust-region model functions.
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
virtual const Ptr< const Vector< Real > > getGradient(void) const
Elementwise::Divide< Real > div_
Elementwise::Multiply< Real > mult_
void update(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr)
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
void applyD(Vector< Real > &Dv, const Vector< Real > &v)
bool isStrictlyFeasibleStep(const Vector< Real > &d) const
ColemanLiModel(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Real stepBackMax=0.9999, const Real stepBackScale=1.0, const bool singleReflect=true, const Ptr< Secant< Real >> &secant=nullPtr, const bool useSecantPrecond=false, const bool useSecantHessVec=false)
void applyHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
Ptr< Vector< Real > > cauchyStep_
Ptr< Vector< Real > > ux_
Real minimize1D(Real &tau, const Real lowerBound, const Real upperBound, const Vector< Real > &p)
Real value(const Vector< Real > &s, Real &tol)
Compute value.
Provides interface for and implements limited-memory secant operators.
Definition: ROL_Secant.hpp:45
void applyInverseD(Vector< Real > &Dv, const Vector< Real > &v)
void applyC(Vector< Real > &Cv, const Vector< Real > &v)
Ptr< Vector< Real > > hv_
Provides the interface to evaluate interior trust-region model functions from the Coleman-Li bound co...
void getScalarBounds(Real &lowerBound, Real &upperBound, const Vector< Real > &p)
Real computeAlpha(const Vector< Real > &d)
Provides the interface to apply upper and lower bound constraints.
Ptr< Vector< Real > > reflectScal_
ROL::DiagonalOperator apply
virtual void set(const Vector &x)
Set where .
Definition: ROL_Vector.hpp:175
virtual Real norm() const =0
Returns where .
Ptr< Vector< Real > > step_
virtual const Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Ptr< Vector< Real > > reflectStep_
void computeReflectiveStep(Vector< Real > &Rv, const Vector< Real > &v, const Vector< Real > &Dv)
virtual const Ptr< const Vector< Real > > getIterate(void) const