Ipopt Documentation  
SensAlgorithm.hpp
Go to the documentation of this file.
1 // Copyright 2009, 2011 Hans Pirnay
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Date : 2009-05-06
6 
7 #ifndef __SENSALGORITHM_HPP__
8 #define __SENSALGORITHM_HPP__
9 
10 #include "IpAlgStrategy.hpp"
11 #include "SensStepCalc.hpp"
12 #include "SensMeasurement.hpp"
13 #include "SensSchurDriver.hpp"
14 #include "SensUtils.hpp"
15 
16 namespace Ipopt
17 {
18 
23 class SIPOPTLIB_EXPORT SensAlgorithm : public AlgorithmStrategyObject
24 {
25 public:
27  std::vector< SmartPtr<SchurDriver> >& driver_vec,
29  SmartPtr<Measurement> measurement,
30  Index n_sens_steps
31  );
32 
33  virtual ~SensAlgorithm();
34 
35  virtual bool InitializeImpl(
36  const OptionsList& options,
37  const std::string& prefix
38  );
39 
44  SensAlgorithmExitStatus ComputeSensitivityMatrix(void);
45 
47  Index nl(void)
48  {
49  return nl_;
50  }
51  Index nx(void)
52  {
53  return nx_;
54  }
55  Index nzl(void)
56  {
57  return nzl_;
58  }
59  Index nzu(void)
60  {
61  return nzu_;
62  }
63  Index ns(void)
64  {
65  return ns_;
66  }
67  Index np(void)
68  {
69  return np_;
70  }
71 
77 
83 
84 private:
93 
94  std::vector< SmartPtr<SchurDriver> > driver_vec_;
97  Index n_sens_steps_; // I think it is useful to state this number explicitly in the constructor and here.
98 
100  void GetDirectionalDerivatives(void);
101 
103  void GetSensitivityMatrix(
104  Index col
105  );
106 
108  void UnScaleIteratesVector(
110  );
111 };
112 }
113 
114 #endif
SensSchurDriver.hpp
Ipopt::SensAlgorithm::sens_step_calc_
SmartPtr< SensitivityStepCalculator > sens_step_calc_
Definition: SensAlgorithm.hpp:95
Ipopt::SensAlgorithm::DirectionalD_Z_U_
Number * DirectionalD_Z_U_
Definition: SensAlgorithm.hpp:76
SensUtils.hpp
Ipopt::SensAlgorithm::driver_vec_
std::vector< SmartPtr< SchurDriver > > driver_vec_
Definition: SensAlgorithm.hpp:94
Ipopt::SensAlgorithm::SensitivityM_X_
Number * SensitivityM_X_
array place holders for the sensitivity matrix
Definition: SensAlgorithm.hpp:79
Ipopt::SensAlgorithm::n_sens_steps_
Index n_sens_steps_
Definition: SensAlgorithm.hpp:97
Ipopt::SensAlgorithm::nceq_
Index nceq_
Definition: SensAlgorithm.hpp:89
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:13
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::SensAlgorithm::ns
Index ns(void)
Definition: SensAlgorithm.hpp:63
Ipopt::SensAlgorithm::DirectionalD_L_
Number * DirectionalD_L_
Definition: SensAlgorithm.hpp:74
Ipopt::SensAlgorithm::SensitivityM_L_
Number * SensitivityM_L_
Definition: SensAlgorithm.hpp:80
Ipopt::SensAlgorithm::ncineq_
Index ncineq_
Definition: SensAlgorithm.hpp:90
Ipopt::SensAlgorithm::nl_
Index nl_
Definition: SensAlgorithm.hpp:85
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
Ipopt::SensAlgorithm::nzl
Index nzl(void)
Definition: SensAlgorithm.hpp:55
Ipopt::SensAlgorithm::nzu
Index nzu(void)
Definition: SensAlgorithm.hpp:59
Ipopt::SensAlgorithm
This is the interface for the actual controller.
Definition: SensAlgorithm.hpp:23
Ipopt::SensAlgorithm::ns_
Index ns_
Definition: SensAlgorithm.hpp:91
Ipopt::SensAlgorithm::np
Index np(void)
Definition: SensAlgorithm.hpp:67
Ipopt::SensAlgorithm::measurement_
SmartPtr< Measurement > measurement_
Definition: SensAlgorithm.hpp:96
Ipopt::SensAlgorithm::np_
Index np_
Definition: SensAlgorithm.hpp:92
Ipopt::SensAlgorithm::nzl_
Index nzl_
Definition: SensAlgorithm.hpp:87
Ipopt::SensAlgorithm::nx_
Index nx_
Definition: SensAlgorithm.hpp:86
Ipopt::SensAlgorithm::nzu_
Index nzu_
Definition: SensAlgorithm.hpp:88
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:34
Ipopt::SensAlgorithm::nx
Index nx(void)
Definition: SensAlgorithm.hpp:51
Ipopt::SensAlgorithm::SensitivityM_Z_U_
Number * SensitivityM_Z_U_
Definition: SensAlgorithm.hpp:82
IpAlgStrategy.hpp
Ipopt::SensAlgorithm::DirectionalD_X_
Number * DirectionalD_X_
array place holders to store the vector of sensitivities
Definition: SensAlgorithm.hpp:73
Ipopt::SensAlgorithm::DirectionalD_Z_L_
Number * DirectionalD_Z_L_
Definition: SensAlgorithm.hpp:75
Ipopt::SensAlgorithm::SensitivityM_Z_L_
Number * SensitivityM_Z_L_
Definition: SensAlgorithm.hpp:81
SensStepCalc.hpp
Ipopt::SensAlgorithm::nl
Index nl(void)
accessor methods to get access to variable sizes
Definition: SensAlgorithm.hpp:47
Ipopt::SensAlgorithmExitStatus
SensAlgorithmExitStatus
Definition: SensUtils.hpp:21
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
SensMeasurement.hpp