Ipopt Documentation  
 
Loading...
Searching...
No Matches
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
16namespace Ipopt
17{
18
23class SIPOPTLIB_EXPORT SensAlgorithm : public AlgorithmStrategyObject
24{
25public:
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
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
84private:
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
101
104 Index col
105 );
106
110 );
111};
112}
113
114#endif
This is the base class for all algorithm strategy objects.
This class stores a list of user set options.
This is the interface for the actual controller.
std::vector< SmartPtr< SchurDriver > > driver_vec_
void UnScaleIteratesVector(SmartPtr< IteratesVector > *V)
private method used to uncale perturbed solution and sensitivities
Index nl(void)
accessor methods to get access to variable sizes
void GetDirectionalDerivatives(void)
method to extract sensitivity vectors
SmartPtr< SensitivityStepCalculator > sens_step_calc_
Number * DirectionalD_X_
array place holders to store the vector of sensitivities
void GetSensitivityMatrix(Index col)
method to extract sensitivity matrix
Number * SensitivityM_X_
array place holders for the sensitivity matrix
SensAlgorithmExitStatus Run()
Main loop: Wait for new measurement, Get new step, maybe deal with bounds, see to it that everything ...
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.
SensAlgorithmExitStatus ComputeSensitivityMatrix(void)
SensAlgorithm(std::vector< SmartPtr< SchurDriver > > &driver_vec, SmartPtr< SensitivityStepCalculator > sens_step_calc, SmartPtr< Measurement > measurement, Index n_sens_steps)
SmartPtr< Measurement > measurement_
virtual ~SensAlgorithm()
Template class for Smart Pointers.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17
SensAlgorithmExitStatus
Definition SensUtils.hpp:22