1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Copyright (C) 2004, 2006 International Business Machines and others.
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
#ifndef __IPLINESEARCH_HPP__
#define __IPLINESEARCH_HPP__
#include "IpAlgStrategy.hpp"
#include "IpIpoptCalculatedQuantities.hpp"
namespace Ipopt
{
/** Base class for line search objects. */
class IPOPTLIB_EXPORT LineSearch: public AlgorithmStrategyObject
{
public:
/**@name Constructors/Destructors */
///@{
/** Default Constructor */
LineSearch()
{ }
/** Destructor */
virtual ~LineSearch()
{ }
///@}
/** Perform the line search.
*
* As search direction the delta in the data object is used.
*/
virtual void FindAcceptableTrialPoint() = 0;
/** Reset the line search.
*
* This function should be called if all previous information
* should be discarded when the line search is performed the
* next time. For example, this method should be called after
* the barrier parameter is changed.
*/
virtual void Reset() = 0;
/** Set flag indicating whether a very rigorous line search should
* be performed.
*
* If this flag is set to true, the line search
* algorithm might decide to abort the line search and not to
* accept a new iterate. If the line search decided not to
* accept a new iterate, the return value of
* CheckSkippedLineSearch() is true at the next call. For
* example, in the non-monotone barrier parameter update
* procedure, the filter algorithm should not switch to the
* restoration phase in the free mode; instead, the algorithm
* should switch to the fixed mode.
*/
virtual void SetRigorousLineSearch(
bool rigorous
) = 0;
/** Check if the line search procedure didn't accept a new iterate
* during the last call of FindAcceptableTrialPoint().
*/
virtual bool CheckSkippedLineSearch() = 0;
/** This method should be called if the optimization process
* requires the line search object to switch to some fallback
* mechanism (like the restoration phase), when the regular
* optimization procedure cannot be continued (for example,
* because the search direction could not be computed).
*
* This will cause the line search object to immediately proceed
* with this mechanism when FindAcceptableTrialPoint() is call.
*
* @return false, if no fallback mechanism is available.
*/
virtual bool ActivateFallbackMechanism() = 0;
private:
/**@name Default Compiler Generated Methods
* (Hidden to avoid implicit creation/calling).
*
* These methods are not implemented and
* we do not want the compiler to implement
* them for us, so we declare them private
* and do not define them. This ensures that
* they will not be implicitly created/called.
*/
///@{
/** Copy Constructor */
LineSearch(
const LineSearch&
);
void operator=(
const LineSearch&
);
///@}
};
} // namespace Ipopt
#endif