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
130
131
132
133
134
135
136
137
138
139
140
141
// 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 __IPRESTOC_1NRM_HPP__
#define __IPRESTOC_1NRM_HPP__
#include "IpRestoPhase.hpp"
#include "IpIpoptAlg.hpp"
#include "IpEqMultCalculator.hpp"
namespace Ipopt
{
/** Restoration Phase that minimizes the 1-norm of the constraint
* violation - using the interior point method (Ipopt).
*/
class MinC_1NrmRestorationPhase: public RestorationPhase
{
public:
/**@name Constructors/Destructors */
///@{
/** Constructor, taking strategy objects.
*
* The resto_alg strategy object is the restoration phase Ipopt
* algorithm. The eq_mult_calculator is used to reinitialize the
* equality constraint multipliers after the restoration phase
* algorithm has finished - unless it is NULL, in which case the
* multipliers are set to 0.
*/
MinC_1NrmRestorationPhase(
IpoptAlgorithm& resto_alg,
const SmartPtr<EqMultiplierCalculator>& eq_mult_calculator
);
/** Destructor */
virtual ~MinC_1NrmRestorationPhase();
///@}
virtual bool InitializeImpl(
const OptionsList& options,
const std::string& prefix
);
static void RegisterOptions(
SmartPtr<RegisteredOptions> roptions
);
protected:
virtual bool PerformRestoration();
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.
*/
///@{
/** Default Constructor */
MinC_1NrmRestorationPhase();
/** Copy Constructor */
MinC_1NrmRestorationPhase(
const MinC_1NrmRestorationPhase&
);
/** Default Assignment Operator */
void operator=(
const MinC_1NrmRestorationPhase&
);
///@}
/** @name Strategy objects */
///@{
SmartPtr<IpoptAlgorithm> resto_alg_;
SmartPtr<EqMultiplierCalculator> eq_mult_calculator_;
///@}
/** Copy of original options, which is required to initialize the
* Ipopt algorithm strategy object before restoration phase is
* started.
*/
SmartPtr<OptionsList> resto_options_;
/** @name Algorithmic parameters */
///@{
Number constr_mult_reset_threshold_;
/** Maximal allowed value of a bound multiplier after restoration
* phase.
*/
Number bound_mult_reset_threshold_;
/** Indicates whether problem can be expected to be infeasible.
*
* This will request to set kappa_resto to a small value for
* the first time the restoration phase is called. (ToDo)
*/
bool expect_infeasible_problem_;
/** Constraint violation tolerance */
Number constr_viol_tol_;
/** Time limits */
Number max_wall_time_;
Number max_cpu_time_;
/** Primal infeasibility tolerance for declaring failure of
* restoration phase when the non-regular termination tests are
* met.
*/
Number resto_failure_feasibility_threshold_;
///@}
/** Counter for the number of time that PerformRestoration is
* called.
*/
Index count_restorations_;
/** @name Auxiliary methods */
///@{
/** Method for computing "primal-dual" step in bound multipliers,
* given step in slacks.
*/
void ComputeBoundMultiplierStep(
Vector& delta_z,
const Vector& curr_z,
const Vector& curr_slack,
const Vector& trial_slack
);
///@}
};
} // namespace Ipopt
#endif