Ipopt  3.12.12
 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 
20  {
24  public:
25 
26  SensAlgorithm(std::vector< SmartPtr<SchurDriver> >& driver_vec,
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 
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 
56 
62 
63  private:
64 
73 
74  std::vector< SmartPtr<SchurDriver> > driver_vec_;
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 
87  };
88 }
89 
90 #endif
void GetDirectionalDerivatives(void)
method to extract sensitivity vectors
virtual ~SensAlgorithm()
Number * DirectionalD_X_
array place holders to store the vector of sensitivities
This is the base class for all algorithm strategy objects.
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
SmartPtr< Measurement > measurement_
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...
SmartPtr< SensitivityStepCalculator > sens_step_calc_
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
SensAlgorithmExitStatus Run()
Main loop: Wait for new measurement, Get new step, maybe deal with bounds, see to it that everything ...
This class stores a list of user set options.
std::vector< SmartPtr< SchurDriver > > driver_vec_
Index nl(void)
accessor methods to get access to variable sizes
SensAlgorithmExitStatus
This header file provides some definitions used throughout the program.
Definition: SensUtils.hpp:22
void GetSensitivityMatrix(Index col)
method to extract sensitivity matrix
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
void UnScaleIteratesVector(SmartPtr< IteratesVector > *V)
private method used to uncale perturbed solution and sensitivities
SensAlgorithmExitStatus ComputeSensitivityMatrix(void)
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.
Number * SensitivityM_X_
array place holders for the sensitivity matrix