Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpBacktrackingLSAcceptor.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2007 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpBacktrackingLSAcceptor.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8 // Andreas Waechter IBM 2005-10-13
9 // derived file from IpFilterLineSearch.hpp
10
11 #ifndef __IPBACKTRACKINGLSACCEPTOR_HPP__
12 #define __IPBACKTRACKINGLSACCEPTOR_HPP__
13
14 #include "IpAlgStrategy.hpp"
15
16 namespace Ipopt
17 {
18
21 class BacktrackingLSAcceptor : public AlgorithmStrategyObject
22 {
23 public:
27 BacktrackingLSAcceptor()
28 {}
29
31 virtual ~BacktrackingLSAcceptor()
32 {}
34
36 virtual bool InitializeImpl(const OptionsList& options,
37 const std::string& prefix)=0;
38
45 virtual void Reset()=0;
46
50 virtual void InitThisLineSearch(bool in_watchdog)=0;
51
56 virtual void PrepareRestoPhaseStart()=0;
57
62 virtual Number CalculateAlphaMin()=0;
63
71 virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)=0;
72
84 virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
85 Number& alpha_primal,
86 SmartPtr<IteratesVector>& actual_delta)=0;
87
94 virtual bool TryCorrector(Number alpha_primal_test,
95 Number& alpha_primal,
96 SmartPtr<IteratesVector>& actual_delta)=0;
97
103 virtual char UpdateForNextIteration(Number alpha_primal_test)=0;
104
107 virtual void StartWatchDog()=0;
108
111 virtual void StopWatchDog()=0;
112
115 virtual bool RestoredIterate()
116 {
117 return false;
118 }
119
122 virtual bool NeverRestorationPhase()
123 {
124 return false;
125 }
126
131 virtual bool DoFallback()
132 {
133 return false;
134 }
135
139 virtual Number ComputeAlphaForY(Number alpha_primal,
140 Number alpha_dual,
141 SmartPtr<IteratesVector>& delta)
142 {
143 THROW_EXCEPTION(OPTION_INVALID,
144 "Value \"acceptor\" for option \"alpha_for_y\" not valid for this line search.");
145 return -1.;
146 }
147
150 virtual bool HasComputeAlphaForY() const
151 {
152 return false;
153 }
154
157 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
159
160 private:
170 BacktrackingLSAcceptor(const BacktrackingLSAcceptor&);
171
173 void operator=(const BacktrackingLSAcceptor&);
175 };
176
177 } // namespace Ipopt
178
179 #endif
Ipopt::BacktrackingLSAcceptor::CheckAcceptabilityOfTrialPoint
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)=0
Method for checking if current trial point is acceptable.
IpAlgStrategy.hpp
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::BacktrackingLSAcceptor::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
Ipopt::BacktrackingLSAcceptor::BacktrackingLSAcceptor
BacktrackingLSAcceptor()
Constructor.
Definition: IpBacktrackingLSAcceptor.hpp:27
Ipopt::BacktrackingLSAcceptor
Base class for backtracking line search acceptors.
Definition: IpBacktrackingLSAcceptor.hpp:21
Ipopt::BacktrackingLSAcceptor::UpdateForNextIteration
virtual char UpdateForNextIteration(Number alpha_primal_test)=0
Method for ending the current line search.
Ipopt::BacktrackingLSAcceptor::StopWatchDog
virtual void StopWatchDog()=0
Method for setting internal data if the watchdog procedure is stopped.
Ipopt::BacktrackingLSAcceptor::TrySecondOrderCorrection
virtual bool TrySecondOrderCorrection(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)=0
Try a second order correction for the constraints.
Ipopt::BacktrackingLSAcceptor::PrepareRestoPhaseStart
virtual void PrepareRestoPhaseStart()=0
Method that is called before the restoration phase is called.
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::BacktrackingLSAcceptor::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)=0
InitializeImpl - overloaded from AlgorithmStrategyObject.
Ipopt::BacktrackingLSAcceptor::InitThisLineSearch
virtual void InitThisLineSearch(bool in_watchdog)=0
Initialization for the next line search.
Ipopt::BacktrackingLSAcceptor::operator=
void operator=(const BacktrackingLSAcceptor &)
Overloaded Equals Operator.
Ipopt::BacktrackingLSAcceptor::HasComputeAlphaForY
virtual bool HasComputeAlphaForY() const
Method returning true of ComputeAlphaForY is implemented for this acceptor.
Definition: IpBacktrackingLSAcceptor.hpp:150
Ipopt::BacktrackingLSAcceptor::ComputeAlphaForY
virtual Number ComputeAlphaForY(Number alpha_primal, Number alpha_dual, SmartPtr< IteratesVector > &delta)
Method for computing the step for the constraint multipliers in the line search acceptor method...
Definition: IpBacktrackingLSAcceptor.hpp:139
Ipopt::BacktrackingLSAcceptor::StartWatchDog
virtual void StartWatchDog()=0
Method for setting internal data if the watchdog procedure is started.
Ipopt::BacktrackingLSAcceptor::~BacktrackingLSAcceptor
virtual ~BacktrackingLSAcceptor()
Default destructor.
Definition: IpBacktrackingLSAcceptor.hpp:31
Ipopt::BacktrackingLSAcceptor::CalculateAlphaMin
virtual Number CalculateAlphaMin()=0
Method returning the lower bound on the trial step sizes.
Ipopt::BacktrackingLSAcceptor::NeverRestorationPhase
virtual bool NeverRestorationPhase()
Method called by BacktrackingLineSearch object to determine whether the restoration phase should neve...
Definition: IpBacktrackingLSAcceptor.hpp:122
Ipopt::BacktrackingLSAcceptor::TryCorrector
virtual bool TryCorrector(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)=0
Try higher order corrector (for fast local convergence).
Ipopt::BacktrackingLSAcceptor::Reset
virtual void Reset()=0
Reset the acceptor.
THROW_EXCEPTION
#define THROW_EXCEPTION(__except_type, __msg)
Definition: IpException.hpp:123
Ipopt::BacktrackingLSAcceptor::DoFallback
virtual bool DoFallback()
Method for doing a fallback approach in case no search direction could be computed.
Definition: IpBacktrackingLSAcceptor.hpp:131
Ipopt::BacktrackingLSAcceptor::RestoredIterate
virtual bool RestoredIterate()
Method for telling the BacktrackingLineSearch object that a previous iterate has been restored...
Definition: IpBacktrackingLSAcceptor.hpp:115