Ipopt Documentation  
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 namespace Ipopt
14 {
15 /* Forward declarations */
16 class DenseVector;
17 class IteratesVector;
18 
20 class SIPOPTLIB_EXPORT SensitivityStepCalculator: public AlgorithmStrategyObject
21 {
22 public:
24  : driver_(NULL),
25  do_boundcheck_(false)
26  { }
27 
29  { }
30 
31  virtual bool InitializeImpl(
32  const OptionsList& options,
33  const std::string& prefix
34  )
35  {
36  options.GetBoolValue("sens_boundcheck", do_boundcheck_, prefix);
37  return true;
38  }
39 
40  bool Do_Boundcheck() const
41  {
42  return do_boundcheck_;
43  }
44 
47  )
48  {
49  DBG_ASSERT(IsValid(driver));
50 
51  driver_ = driver;
52  if( IsValid(driver_->pcalc_nonconst()) )
53  {
54  driver_->pcalc_nonconst()->reset_data_A();
55  // when the schurdriver is set, the data in the pcalculator has to be reset to its data?
56  }
57  }
58 
59  SmartPtr<SchurDriver> Driver() // this should be const or protected
60  {
61  DBG_ASSERT(IsValid(driver_));
62 
63  return driver_;
64  }
65 
70  virtual bool Step(
71  DenseVector& delta_u,
72  IteratesVector& sol
73  ) = 0;
74 
77 
78 private:
81 };
82 
83 }
84 
85 #endif
SensSchurDriver.hpp
Ipopt::SensitivityStepCalculator::SensitivityStepCalculator
SensitivityStepCalculator()
Definition: SensStepCalc.hpp:23
Ipopt::SensitivityStepCalculator::Do_Boundcheck
bool Do_Boundcheck() const
Definition: SensStepCalc.hpp:40
Ipopt::SensitivityStepCalculator::SetSchurDriver
void SetSchurDriver(SmartPtr< SchurDriver > driver)
Definition: SensStepCalc.hpp:45
Ipopt::SensitivityStepCalculator::Driver
SmartPtr< SchurDriver > Driver()
Definition: SensStepCalc.hpp:59
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::OptionsList::GetBoolValue
virtual bool GetBoolValue(const std::string &tag, bool &value, const std::string &prefix) const
Ipopt::SensitivityStepCalculator::Step
virtual bool Step(DenseVector &delta_u, IteratesVector &sol)=0
This is the main algorithmic function of this class.
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:31
Ipopt::SensitivityStepCalculator::driver_
SmartPtr< SchurDriver > driver_
Definition: SensStepCalc.hpp:79
Ipopt::SensitivityStepCalculator::~SensitivityStepCalculator
virtual ~SensitivityStepCalculator()
Definition: SensStepCalc.hpp:28
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::SensitivityStepCalculator
This is the interface for the classes that perform the actual step.
Definition: SensStepCalc.hpp:21
Ipopt::SensitivityStepCalculator::do_boundcheck_
bool do_boundcheck_
Definition: SensStepCalc.hpp:80
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::DenseVector
Dense Vector Implementation.
Definition: IpDenseVector.hpp:41
IpAlgStrategy.hpp
Ipopt::IsValid
bool IsValid(const SmartPtr< U > &smart_ptr)
Definition: IpSmartPtr.hpp:674
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:28
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::SensitivityStepCalculator::GetSensitivityVector
virtual SmartPtr< IteratesVector > GetSensitivityVector()=0
return the sensitivity vector
Ipopt::IteratesVector
Specialized CompoundVector class specifically for the algorithm iterates.
Definition: IpIteratesVector.hpp:26