ROL
ROL_Bundle_U_TT.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_BUNDLE_U_TT_H
11 #define ROL_BUNDLE_U_TT_H
12 
13 #include "ROL_Bundle_U.hpp"
14 #include "ROL_LAPACK.hpp"
15 #include "ROL_LinearAlgebra.hpp"
16 #include <vector>
17 
24 namespace ROL {
25 
26 template<typename Real>
27 class Bundle_U_TT : public Bundle_U<Real> {
28 private:
29  LAPACK<int, Real> lapack_; // TT
30 
31  int QPStatus_; // QP solver status
32  int maxind_; // maximum integer value
33  int entering_; // index of entering item
34  int LiMax_; // index of max element of diag(L)
35  int LiMin_; // index of min element of diag(L)
36 
37  unsigned maxSize_; // maximum bundle size
38  unsigned dependent_; // number of lin. dependent items in base
39  unsigned currSize_; // current size of base
40 
42  bool optimal_; // flag for optimality of restricted solution
43 
44  Real rho_;
45  Real lhNorm;
46  Real ljNorm;
47  Real lhz1_;
48  Real lhz2_;
49  Real ljz1_;
50  Real kappa_; // condition number of matrix L ( >= max|L_ii|/min|L_ii| )
51  Real objval_; // value of objective
52  Real minobjval_; // min value of objective (ever reached)
53  Real deltaLh_; // needed in case dependent row becomes independent
54  Real deltaLj_; // needed in case dependent row becomes independent
55 
56  std::vector<int> taboo_; // list of "taboo" items
57  std::vector<int> base_; // base
58 
59  LA::Matrix<Real> L_;
60  LA::Matrix<Real> Id_;
61  LA::Vector<Real> tempv_;
62  LA::Vector<Real> tempw1_;
63  LA::Vector<Real> tempw2_;
64  LA::Vector<Real> lh_;
65  LA::Vector<Real> lj_;
66  LA::Vector<Real> z1_;
67  LA::Vector<Real> z2_;
68 
70 
71 public:
72  Bundle_U_TT(const unsigned maxSize = 10,
73  const Real coeff = 0.0,
74  const Real omega = 2.0,
75  const unsigned remSize = 2);
76 
77  unsigned solveDual(const Real t, const unsigned maxit = 1000, const Real tol = 1.e-8);
78 
79 /***********************************************************************************************/
80 /****************** DUAL CUTTING PLANE SUBPROBLEM ROUTINES *************************************/
81 /***********************************************************************************************/
82 private:
83  Real sgn(const Real x) const;
84 
85  void swapRowsL(unsigned ind1, unsigned ind2, bool trans=false);
86 
87  void updateK(void);
88 
89  void addSubgradToBase(unsigned ind, Real delta);
90 
91  void deleteSubgradFromBase(unsigned ind, Real tol);
92 
93  // TT: solving triangular system for TT algorithm
94  void solveSystem(int size, char tran, LA::Matrix<Real> &L, LA::Vector<Real> &v);
95 
96  // TT: check that inequality constraints are satisfied for dual variables
97  bool isFeasible(LA::Vector<Real> &v, const Real &tol);
98 
99  unsigned solveDual_TT(const Real t, const unsigned maxit = 1000, const Real tol = 1.e-8);
100 
101  unsigned solveDual_arbitrary(const Real t, const unsigned maxit = 1000, const Real tol = 1.e-8);
102 
103 }; // class Bundle_TT
104 
105 } // namespace ROL
106 
107 #include "ROL_Bundle_U_TT_Def.hpp"
108 
109 #endif
110 
LAPACK< int, Real > lapack_
unsigned solveDual_TT(const Real t, const unsigned maxit=1000, const Real tol=1.e-8)
LA::Vector< Real > z2_
LA::Vector< Real > lh_
Provides the interface for and implements a bundle. The semidefinite quadratic subproblem is solved u...
Real sgn(const Real x) const
LA::Matrix< Real > Id_
Provides the interface for and implements a bundle.
LA::Vector< Real > tempw2_
unsigned size(void) const
std::vector< int > base_
unsigned solveDual(const Real t, const unsigned maxit=1000, const Real tol=1.e-8)
Bundle_U_TT(const unsigned maxSize=10, const Real coeff=0.0, const Real omega=2.0, const unsigned remSize=2)
LA::Vector< Real > lj_
LA::Matrix< Real > L_
LA::Vector< Real > tempv_
LA::Vector< Real > z1_
bool isFeasible(LA::Vector< Real > &v, const Real &tol)
unsigned solveDual_arbitrary(const Real t, const unsigned maxit=1000, const Real tol=1.e-8)
LA::Vector< Real > tempw1_
void swapRowsL(unsigned ind1, unsigned ind2, bool trans=false)
std::vector< int > taboo_
void deleteSubgradFromBase(unsigned ind, Real tol)
void solveSystem(int size, char tran, LA::Matrix< Real > &L, LA::Vector< Real > &v)
void addSubgradToBase(unsigned ind, Real delta)