Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
19 class SensAlgorithm : public AlgorithmStrategyObject
20 {
24 public:
25
26 SensAlgorithm(std::vector< SmartPtr<SchurDriver> >& driver_vec,
27 SmartPtr<SensitivityStepCalculator> sens_step_calc,
28 SmartPtr<Measurement> measurement,
29 Index n_sens_steps);
30
31 virtual ~SensAlgorithm();
32
33 virtual bool InitializeImpl(const OptionsList& options,
34 const std::string& prefix);
35
39 SensAlgorithmExitStatus Run();
40 SensAlgorithmExitStatus ComputeSensitivityMatrix(void);
41
42
44 Index nl(void) { return nl_ ; }
45 Index nx(void) { return nx_ ; }
46 Index nzl(void) {return nzl_ ; }
47 Index nzu(void) {return nzu_ ; }
48 Index ns(void) {return ns_ ; }
49 Index np(void) {return np_ ; }
50
52 Number *DirectionalD_X_ ;
53 Number *DirectionalD_L_ ;
54 Number *DirectionalD_Z_U_ ;
55 Number *DirectionalD_Z_L_ ;
56
58 Number *SensitivityM_X_ ;
59 Number *SensitivityM_L_ ;
60 Number *SensitivityM_Z_U_ ;
61 Number *SensitivityM_Z_L_ ;
62
63 private:
64
65 Index nl_ ;
66 Index nx_ ;
67 Index nzl_ ;
68 Index nzu_ ;
69 Index nceq_ ;
70 Index ncineq_ ;
71 Index ns_ ;
72 Index np_ ;
73
74 std::vector< SmartPtr<SchurDriver> > driver_vec_;
75 SmartPtr<SensitivityStepCalculator> sens_step_calc_;
76 SmartPtr<Measurement> measurement_;
77 Index n_sens_steps_; // I think it is useful to state this number explicitly in the constructor and here.
78
80 void GetDirectionalDerivatives(void) ;
81
83 void GetSensitivityMatrix(Index col) ;
84
86 void UnScaleIteratesVector(SmartPtr<IteratesVector> *V) ;
87 };
88 }
89
90 #endif
Ipopt::SensAlgorithm::GetDirectionalDerivatives
void GetDirectionalDerivatives(void)
method to extract sensitivity vectors
Ipopt::SensAlgorithm::~SensAlgorithm
virtual ~SensAlgorithm()
IpAlgStrategy.hpp
Ipopt::SensAlgorithm::DirectionalD_X_
Number * DirectionalD_X_
array place holders to store the vector of sensitivities
Definition: SensAlgorithm.hpp:52
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::SensAlgorithm::nzu
Index nzu(void)
Definition: SensAlgorithm.hpp:47
Ipopt::SensAlgorithm::SensitivityM_L_
Number * SensitivityM_L_
Definition: SensAlgorithm.hpp:59
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::SensAlgorithm::measurement_
SmartPtr< Measurement > measurement_
Definition: SensAlgorithm.hpp:76
Ipopt::SensAlgorithm::DirectionalD_L_
Number * DirectionalD_L_
Definition: SensAlgorithm.hpp:53
Ipopt::SensAlgorithm::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
Ipopt::SensAlgorithm::ns_
Index ns_
Definition: SensAlgorithm.hpp:71
Ipopt::SensAlgorithm::sens_step_calc_
SmartPtr< SensitivityStepCalculator > sens_step_calc_
Definition: SensAlgorithm.hpp:75
Ipopt::SensAlgorithm::SensitivityM_Z_U_
Number * SensitivityM_Z_U_
Definition: SensAlgorithm.hpp:60
Ipopt::SensAlgorithm::nl_
Index nl_
Definition: SensAlgorithm.hpp:65
Ipopt::SensAlgorithm::n_sens_steps_
Index n_sens_steps_
Definition: SensAlgorithm.hpp:77
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::SensAlgorithm::Run
SensAlgorithmExitStatus Run()
Main loop: Wait for new measurement, Get new step, maybe deal with bounds, see to it that everything ...
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::SensAlgorithm::driver_vec_
std::vector< SmartPtr< SchurDriver > > driver_vec_
Definition: SensAlgorithm.hpp:74
Ipopt::SensAlgorithm::ncineq_
Index ncineq_
Definition: SensAlgorithm.hpp:70
Ipopt::SensAlgorithm::nl
Index nl(void)
accessor methods to get access to variable sizes
Definition: SensAlgorithm.hpp:44
Ipopt::SensAlgorithmExitStatus
SensAlgorithmExitStatus
This header file provides some definitions used throughout the program.
Definition: SensUtils.hpp:22
SensStepCalc.hpp
Ipopt::SensAlgorithm::nzu_
Index nzu_
Definition: SensAlgorithm.hpp:68
Ipopt::SensAlgorithm::np
Index np(void)
Definition: SensAlgorithm.hpp:49
Ipopt::SensAlgorithm::ns
Index ns(void)
Definition: SensAlgorithm.hpp:48
Ipopt::SensAlgorithm::GetSensitivityMatrix
void GetSensitivityMatrix(Index col)
method to extract sensitivity matrix
Ipopt::SensAlgorithm::nzl
Index nzl(void)
Definition: SensAlgorithm.hpp:46
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::SensAlgorithm::UnScaleIteratesVector
void UnScaleIteratesVector(SmartPtr< IteratesVector > *V)
private method used to uncale perturbed solution and sensitivities
Ipopt::SensAlgorithm::DirectionalD_Z_U_
Number * DirectionalD_Z_U_
Definition: SensAlgorithm.hpp:54
Ipopt::SensAlgorithm::ComputeSensitivityMatrix
SensAlgorithmExitStatus ComputeSensitivityMatrix(void)
Ipopt::SensAlgorithm::np_
Index np_
Definition: SensAlgorithm.hpp:72
Ipopt::SensAlgorithm::nx_
Index nx_
Definition: SensAlgorithm.hpp:66
Ipopt::SensAlgorithm::SensAlgorithm
SensAlgorithm(std::vector< SmartPtr< SchurDriver > > &driver_vec, SmartPtr< SensitivityStepCalculator > sens_step_calc, SmartPtr< Measurement > measurement, Index n_sens_steps)
This is the interface for the actual controller.
Ipopt::SensAlgorithm::nx
Index nx(void)
Definition: SensAlgorithm.hpp:45
Ipopt::SensAlgorithm::DirectionalD_Z_L_
Number * DirectionalD_Z_L_
Definition: SensAlgorithm.hpp:55
Ipopt::SensAlgorithm::SensitivityM_Z_L_
Number * SensitivityM_Z_L_
Definition: SensAlgorithm.hpp:61
SensSchurDriver.hpp
Ipopt::SensAlgorithm
Definition: SensAlgorithm.hpp:19
Ipopt::SensAlgorithm::nceq_
Index nceq_
Definition: SensAlgorithm.hpp:69
SensMeasurement.hpp
SensUtils.hpp
Ipopt::SensAlgorithm::nzl_
Index nzl_
Definition: SensAlgorithm.hpp:67
Ipopt::SensAlgorithm::SensitivityM_X_
Number * SensitivityM_X_
array place holders for the sensitivity matrix
Definition: SensAlgorithm.hpp:58