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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Copyright (C) 2004, 2010 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 __IPOPTERRORCONVCHECK_HPP__
#define __IPOPTERRORCONVCHECK_HPP__
#include "IpConvCheck.hpp"
namespace Ipopt
{
class OptimalityErrorConvergenceCheck: public ConvergenceCheck
{
public:
/**@name Constructors / Destructor */
///@{
/** Default Constructor */
OptimalityErrorConvergenceCheck();
/** Destructor */
virtual ~OptimalityErrorConvergenceCheck();
///@}
virtual bool InitializeImpl(
const OptionsList& options,
const std::string& prefix
);
virtual ConvergenceStatus
CheckConvergence(
bool call_intermediate_callback = true
);
/** Auxiliary function for testing whether current iterate
* satisfies the acceptable level of optimality
*/
virtual bool CurrentIsAcceptable();
static void RegisterOptions(
SmartPtr<RegisteredOptions> roptions
);
protected:
/** @name Algorithmic parameters */
///@{
/** Maximal number of iterations */
Index max_iterations_;
/** Tolerance on unscaled dual infeasibility */
Number dual_inf_tol_;
/** Tolerance on unscaled constraint violation */
Number constr_viol_tol_;
/** Tolerance on unscaled complementarity */
Number compl_inf_tol_;
/** Number of iterations with acceptable level of accuracy, after
* which the algorithm terminates.
*
* If 0, this heuristic is disabled.
*/
Index acceptable_iter_;
/** Acceptable tolerance for the problem to terminate earlier if
* algorithm seems stuck or cycling */
Number acceptable_tol_;
/** Acceptable tolerance on unscaled dual infeasibility */
Number acceptable_dual_inf_tol_;
/** Acceptable tolerance on unscaled constraint violation */
Number acceptable_constr_viol_tol_;
/** Acceptable tolerance on unscaled complementarity */
Number acceptable_compl_inf_tol_;
/** Acceptable tolerance for relative objective function change
* from iteration to iteration. */
Number acceptable_obj_change_tol_;
/** Threshold for primal iterates for divergence test */
Number diverging_iterates_tol_;
/** Desired value of the barrier parameter */
Number mu_target_;
/** Upper bound on wallclock time */
Number max_wall_time_;
/** Upper bound on CPU time */
Number max_cpu_time_;
///@}
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 */
OptimalityErrorConvergenceCheck(
const OptimalityErrorConvergenceCheck&
);
/** Default Assignment Operator */
void operator=(
const OptimalityErrorConvergenceCheck&
);
///@}
/** Counter for successive iterations in which acceptability
* criteria are met.
*/
Index acceptable_counter_;
/** Value of the objective function from last iteration.
*
* This is for accpetable_obj_change_tol.
*/
Number last_obj_val_;
/** Value of the objective function from current iteration.
*
* This is for accpetable_obj_change_tol.
*/
Number curr_obj_val_;
/** Iteration counter for which last_obj_val most recently updated. */
Index last_obj_val_iter_;
};
} // namespace Ipopt
#endif