Main Page
Namespaces
Classes
Files
File List
File Members
build
buildd
coinor-ipopt-3.10.2
Ipopt
src
Algorithm
IpNLPBoundsRemover.hpp
Go to the documentation of this file.
1
// Copyright (C) 2008, 2010 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpNLP.hpp 949 2007-03-27 00:41:26Z andreasw $
6
//
7
// Authors: Andreas Waechter IBM 2008-08-25
8
9
#ifndef __IPNLPBOUNDSREMOVER_HPP__
10
#define __IPNLPBOUNDSREMOVER_HPP__
11
12
#include "
IpNLP.hpp
"
13
14
namespace
Ipopt
15
{
24
class
NLPBoundsRemover
:
public
NLP
25
{
26
public
:
31
NLPBoundsRemover
(
NLP
&
nlp
,
bool
allow_twosided_inequalities =
false
);
32
34
virtual
~NLPBoundsRemover
()
35
{}
37
43
virtual
bool
ProcessOptions
(
const
OptionsList
& options,
44
const
std::string& prefix)
45
{
46
return
nlp_
->
ProcessOptions
(options, prefix);
47
}
48
52
virtual
bool
GetSpaces
(
SmartPtr<const VectorSpace>
& x_space,
53
SmartPtr<const VectorSpace>
& c_space,
54
SmartPtr<const VectorSpace>
& d_space,
55
SmartPtr<const VectorSpace>
& x_l_space,
56
SmartPtr<const MatrixSpace>
& px_l_space,
57
SmartPtr<const VectorSpace>
& x_u_space,
58
SmartPtr<const MatrixSpace>
& px_u_space,
59
SmartPtr<const VectorSpace>
& d_l_space,
60
SmartPtr<const MatrixSpace>
& pd_l_space,
61
SmartPtr<const VectorSpace>
& d_u_space,
62
SmartPtr<const MatrixSpace>
& pd_u_space,
63
SmartPtr<const MatrixSpace>
& Jac_c_space,
64
SmartPtr<const MatrixSpace>
& Jac_d_space,
65
SmartPtr<const SymMatrixSpace>
& Hess_lagrangian_space);
66
68
virtual
bool
GetBoundsInformation
(
const
Matrix
& Px_L,
69
Vector
&
x_L
,
70
const
Matrix
& Px_U,
71
Vector
&
x_U
,
72
const
Matrix
& Pd_L,
73
Vector
& d_L,
74
const
Matrix
& Pd_U,
75
Vector
& d_U);
76
80
virtual
bool
GetStartingPoint
(
SmartPtr<Vector>
x
,
81
bool
need_x,
82
SmartPtr<Vector>
y_c,
83
bool
need_y_c,
84
SmartPtr<Vector>
y_d,
85
bool
need_y_d,
86
SmartPtr<Vector>
z_L,
87
bool
need_z_L,
88
SmartPtr<Vector>
z_U,
89
bool
need_z_U);
90
94
virtual
bool
GetWarmStartIterate
(
IteratesVector
& warm_start_iterate)
95
{
96
return
nlp_
->
GetWarmStartIterate
(warm_start_iterate);
97
}
99
103
virtual
bool
Eval_f
(
const
Vector
&
x
,
Number
& f)
104
{
105
return
nlp_
->
Eval_f
(x, f);
106
}
107
108
virtual
bool
Eval_grad_f
(
const
Vector
&
x
,
Vector
& g_f)
109
{
110
return
nlp_
->
Eval_grad_f
(x, g_f);
111
}
112
113
virtual
bool
Eval_c
(
const
Vector
&
x
,
Vector
& c)
114
{
115
return
nlp_
->
Eval_c
(x, c);
116
}
117
118
virtual
bool
Eval_jac_c
(
const
Vector
&
x
,
Matrix
& jac_c)
119
{
120
return
nlp_
->
Eval_jac_c
(x, jac_c);
121
}
122
123
virtual
bool
Eval_d
(
const
Vector
&
x
,
Vector
& d);
124
125
virtual
bool
Eval_jac_d
(
const
Vector
&
x
,
Matrix
& jac_d);
126
127
virtual
bool
Eval_h
(
const
Vector
&
x
,
128
Number
obj_factor,
129
const
Vector
& yc,
130
const
Vector
& yd,
131
SymMatrix
& h);
133
142
virtual
void
FinalizeSolution
(
SolverReturn
status,
143
const
Vector
&
x
,
const
Vector
& z_L,
144
const
Vector
& z_U,
145
const
Vector
& c,
const
Vector
& d,
146
const
Vector
& y_c,
const
Vector
& y_d,
147
Number
obj_value,
148
const
IpoptData
* ip_data,
149
IpoptCalculatedQuantities
* ip_cq);
150
166
virtual
bool
IntermediateCallBack
(
AlgorithmMode
mode,
167
Index
iter,
Number
obj_value,
168
Number
inf_pr,
Number
inf_du,
169
Number
mu,
Number
d_norm,
170
Number
regularization_size,
171
Number
alpha_du,
Number
alpha_pr,
172
Index
ls_trials,
173
const
IpoptData
* ip_data,
174
IpoptCalculatedQuantities
* ip_cq)
175
{
176
return
nlp_
->
IntermediateCallBack
(mode,iter, obj_value, inf_pr, inf_du,
177
mu, d_norm, regularization_size,
178
alpha_du, alpha_pr, ls_trials,
179
ip_data, ip_cq);
180
}
182
187
virtual
void
GetScalingParameters
(
188
const
SmartPtr<const VectorSpace>
x_space,
189
const
SmartPtr<const VectorSpace>
c_space,
190
const
SmartPtr<const VectorSpace>
d_space,
191
Number
&
obj_scaling
,
192
SmartPtr<Vector>
&
x_scaling
,
193
SmartPtr<Vector>
& c_scaling,
194
SmartPtr<Vector>
& d_scaling)
const
;
196
210
virtual
void
211
GetQuasiNewtonApproximationSpaces
(
SmartPtr<VectorSpace>
& approx_space,
212
SmartPtr<Matrix>
& P_approx)
213
{
214
nlp_
->
GetQuasiNewtonApproximationSpaces
(approx_space, P_approx);
215
}
216
218
SmartPtr<NLP>
nlp
()
219
{
220
return
nlp_
;
221
}
222
223
private
:
233
NLPBoundsRemover
();
235
NLPBoundsRemover
(
const
NLPBoundsRemover
&);
236
238
void
operator=
(
const
NLPBoundsRemover
&);
240
242
SmartPtr<NLP>
nlp_
;
243
245
SmartPtr<const Matrix>
Px_l_orig_
;
246
248
SmartPtr<const Matrix>
Px_u_orig_
;
249
251
SmartPtr<const VectorSpace>
d_space_orig_
;
252
255
bool
allow_twosided_inequalities_
;
256
};
257
258
}
// namespace Ipopt
259
260
#endif
Generated on Fri Jun 29 2012 06:35:13 by
1.8.1.1