Ipopt Documentation  
 
Loading...
Searching...
No Matches
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// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6// Andreas Waechter IBM 2005-10-13
7// derived file from IpFilterLineSearch.hpp
8
9#ifndef __IPBACKTRACKINGLSACCEPTOR_HPP__
10#define __IPBACKTRACKINGLSACCEPTOR_HPP__
11
12#include "IpAlgStrategy.hpp"
13
14namespace Ipopt
15{
16
19{
20public:
23
26
29 { }
31
32 virtual bool InitializeImpl(
33 const OptionsList& options,
34 const std::string& prefix
35 ) = 0;
36
44 virtual void Reset() = 0;
45
51 virtual void InitThisLineSearch(
52 bool in_watchdog
53 ) = 0;
54
61 virtual void PrepareRestoPhaseStart() = 0;
62
70
80 Number alpha_primal
81 ) = 0;
82
97 Number alpha_primal_test,
98 Number& alpha_primal,
99 SmartPtr<IteratesVector>& actual_delta
100 ) = 0;
101
109 virtual bool TryCorrector(
110 Number alpha_primal_test,
111 Number& alpha_primal,
112 SmartPtr<IteratesVector>& actual_delta
113 ) = 0;
114
125 Number alpha_primal_test
126 ) = 0;
127
129 virtual void StartWatchDog() = 0;
130
132 virtual void StopWatchDog() = 0;
133
137 virtual bool RestoredIterate()
138 {
139 return false;
140 }
141
146 {
147 return false;
148 }
149
157 virtual bool DoFallback()
158 {
159 return false;
160 }
161
168 Number /*alpha_primal*/,
169 Number /*alpha_dual*/,
170 SmartPtr<IteratesVector>& /*delta*/
171 )
172 {
173 THROW_EXCEPTION(OPTION_INVALID, "Value \"acceptor\" for option \"alpha_for_y\" not valid for this line search.");
174 return -1.;
175 }
176
180 virtual bool HasComputeAlphaForY() const
181 {
182 return false;
183 }
184
187 static void RegisterOptions(
189 );
191
192private:
203
206 );
207
211 );
213};
214
215} // namespace Ipopt
216
217#endif
#define THROW_EXCEPTION(__except_type, __msg)
This is the base class for all algorithm strategy objects.
Base class for backtracking line search acceptors.
virtual void InitThisLineSearch(bool in_watchdog)=0
Initialization for the next line search.
virtual bool TrySecondOrderCorrection(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)=0
Try a second order correction for the constraints.
virtual Number ComputeAlphaForY(Number, Number, SmartPtr< IteratesVector > &)
Method for computing the step for the constraint multipliers in the line search acceptor method.
virtual bool RestoredIterate()
Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
virtual char UpdateForNextIteration(Number alpha_primal_test)=0
Method for ending the current line search.
virtual void PrepareRestoPhaseStart()=0
Method that is called before the restoration phase is called.
virtual bool TryCorrector(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)=0
Try higher order corrector (for fast local convergence).
virtual bool HasComputeAlphaForY() const
Method returning true of ComputeAlphaForY is implemented for this acceptor.
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)=0
Implementation of the initialization method that has to be overloaded by for each derived class.
BacktrackingLSAcceptor(const BacktrackingLSAcceptor &)
Copy Constructor.
virtual void Reset()=0
Reset the acceptor.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
virtual void StartWatchDog()=0
Method for setting internal data if the watchdog procedure is started.
virtual Number CalculateAlphaMin()=0
Method returning the lower bound on the trial step sizes.
void operator=(const BacktrackingLSAcceptor &)
Default Assignment Operator.
virtual void StopWatchDog()=0
Method for setting internal data if the watchdog procedure is stopped.
virtual bool DoFallback()
Method for doing a fallback approach in case no search direction could be computed.
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)=0
Method for checking if current trial point is acceptable.
virtual bool NeverRestorationPhase()
Method called by BacktrackingLineSearch object to determine whether the restoration phase should neve...
This class stores a list of user set options.
Template class for Smart Pointers.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17