Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SensStepCalc.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-14
6
7 #ifndef __ASSENSSTEPCALC_HPP__
8 #define __ASSENSSTEPCALC_HPP__
9
10 #include "IpAlgStrategy.hpp"
11 #include "SensSchurDriver.hpp"
12
13
14 namespace Ipopt
15 {
17 class DenseVector;
18 class IteratesVector;
19
20 class SensitivityStepCalculator : public AlgorithmStrategyObject
21 {
22 /* This is the interface for the classes that perform the actual step. */
23
24 public:
25 SensitivityStepCalculator()
26 :
27 driver_(NULL),
28 do_boundcheck_(false)
29 {
30 }
31
32 virtual ~SensitivityStepCalculator()
33 {
34 }
35
36 virtual bool InitializeImpl(const OptionsList& options,
37 const std::string& prefix)
38 {
39 options.GetBoolValue("sens_boundcheck", do_boundcheck_, prefix);
40 return true;
41 }
42
43 bool Do_Boundcheck() const
44 {
45 return do_boundcheck_;
46 }
47
48 void SetSchurDriver(SmartPtr<SchurDriver> driver)
49 {
50 DBG_ASSERT(IsValid(driver));
51 driver_ = driver;
52 if (IsValid(driver_->pcalc_nonconst())) {
53 driver_->pcalc_nonconst()->reset_data_A();
54 // when the schurdriver is set, the data in the pcalculator has to be reset to its data?
55 }
56 }
57
58 SmartPtr<SchurDriver> Driver() // this should be const or protected
59 {
60 DBG_ASSERT(IsValid(driver_));
61 return driver_;
62 }
63
66 virtual bool Step(DenseVector& delta_u, IteratesVector& sol) =0;
67
69 virtual SmartPtr<IteratesVector> GetSensitivityVector() = 0;
70
71 private:
72 SmartPtr<SchurDriver> driver_;
73 bool do_boundcheck_;
74 };
75 }
76
77 #endif
Ipopt::IsValid
bool IsValid(const SmartPtr< U > &smart_ptr)
Definition: IpSmartPtr.hpp:579
Ipopt::SensitivityStepCalculator
Definition: SensStepCalc.hpp:20
Ipopt::IteratesVector
Specialized CompoundVector class specifically for the algorithm iterates.
Definition: IpIteratesVector.hpp:27
Ipopt::SensitivityStepCalculator::Do_Boundcheck
bool Do_Boundcheck() const
Definition: SensStepCalc.hpp:43
IpAlgStrategy.hpp
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::OptionsList::GetBoolValue
virtual bool GetBoolValue(const std::string &tag, bool &value, const std::string &prefix) const
Ipopt::SensitivityStepCalculator::~SensitivityStepCalculator
virtual ~SensitivityStepCalculator()
Definition: SensStepCalc.hpp:32
Ipopt::DenseVector
Dense Vector Implementation.
Definition: IpDenseVector.hpp:40
Ipopt::SensitivityStepCalculator::do_boundcheck_
bool do_boundcheck_
Definition: SensStepCalc.hpp:73
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::SensitivityStepCalculator::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...
Definition: SensStepCalc.hpp:36
Ipopt::SensitivityStepCalculator::Step
virtual bool Step(DenseVector &delta_u, IteratesVector &sol)=0
This is the main algorithmic function of this class; It calculates a step using its SchurDriver...
Ipopt::SensitivityStepCalculator::SetSchurDriver
void SetSchurDriver(SmartPtr< SchurDriver > driver)
Definition: SensStepCalc.hpp:48
Ipopt::SensitivityStepCalculator::SensitivityStepCalculator
SensitivityStepCalculator()
Definition: SensStepCalc.hpp:25
Ipopt::SensitivityStepCalculator::GetSensitivityVector
virtual SmartPtr< IteratesVector > GetSensitivityVector()=0
return the sensitivity vector
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:38
Ipopt::SensitivityStepCalculator::Driver
SmartPtr< SchurDriver > Driver()
Definition: SensStepCalc.hpp:58
SensSchurDriver.hpp
Ipopt::SensitivityStepCalculator::driver_
SmartPtr< SchurDriver > driver_
Definition: SensStepCalc.hpp:72