Main Page
Namespaces
Classes
Files
File List
File Members
var
build
temp
tmp.niCloInx4p
4.0-0-0
coinor-ipopt
coinor-ipopt-3.10.2
Ipopt
src
Algorithm
IpLimMemQuasiNewtonUpdater.hpp
Go to the documentation of this file.
1
// Copyright (C) 2005, 2010 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpLimMemQuasiNewtonUpdater.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Andreas Waechter IBM 2005-12-26
8
9
#ifndef __IPLIMMEMQUASINEWTONUPDATER_HPP__
10
#define __IPLIMMEMQUASINEWTONUPDATER_HPP__
11
12
#include "
IpHessianUpdater.hpp
"
13
#include "
IpLowRankUpdateSymMatrix.hpp
"
14
#include "
IpMultiVectorMatrix.hpp
"
15
#include "
IpDenseVector.hpp
"
16
#include "
IpDenseGenMatrix.hpp
"
17
#include "
IpDenseSymMatrix.hpp
"
18
19
namespace
Ipopt
20
{
21
25
class
LimMemQuasiNewtonUpdater
:
public
HessianUpdater
26
{
27
public
:
31
LimMemQuasiNewtonUpdater
(
bool
update_for_resto);
32
34
virtual
~LimMemQuasiNewtonUpdater
()
35
{}
37
39
virtual
bool
InitializeImpl
(
const
OptionsList
& options,
40
const
std::string& prefix);
41
44
virtual
void
UpdateHessian
();
45
48
static
void
RegisterOptions
(
SmartPtr<RegisteredOptions>
roptions);
50
51
private
:
61
LimMemQuasiNewtonUpdater
(
const
LimMemQuasiNewtonUpdater
&);
62
64
void
operator=
(
const
LimMemQuasiNewtonUpdater
&);
66
68
SmartPtr<const LowRankUpdateSymMatrixSpace>
h_space_
;
69
73
Index
limited_memory_max_history_
;
75
enum
LMUpdateType
76
{
77
BFGS
=0,
78
SR1
79
};
81
LMUpdateType
limited_memory_update_type_
;
83
enum
LMInitialization
84
{
85
SCALAR1
=0,
86
SCALAR2
,
87
SCALAR3
,
88
SCALAR4
,
89
CONSTANT
90
};
92
LMInitialization
limited_memory_initialization_
;
95
Number
limited_memory_init_val_
;
98
Index
limited_memory_max_skipping_
;
100
Number
sigma_safe_min_
;
102
Number
sigma_safe_max_
;
105
bool
limited_memory_special_for_resto_
;
107
113
const
bool
update_for_resto_
;
116
Number
last_eta_
;
120
SmartPtr<const Vector>
curr_DR_x_
;
122
TaggedObject::Tag
curr_DR_x_tag_
;
127
SmartPtr<const Vector>
curr_red_DR_x_
;
130
Number
curr_eta_
;
131
134
Index
lm_skipped_iter_
;
135
139
Index
curr_lm_memory_
;
141
SmartPtr<MultiVectorMatrix>
S_
;
145
SmartPtr<MultiVectorMatrix>
Y_
;
148
SmartPtr<MultiVectorMatrix>
Ypart_
;
151
SmartPtr<DenseVector>
D_
;
153
SmartPtr<DenseGenMatrix>
L_
;
155
SmartPtr<Vector>
B0_
;
159
Number
sigma_
;
161
SmartPtr<MultiVectorMatrix>
V_
;
163
SmartPtr<MultiVectorMatrix>
U_
;
166
SmartPtr<DenseSymMatrix>
SdotS_
;
169
bool
SdotS_uptodate_
;
171
SmartPtr<MultiVectorMatrix>
DRS_
;
174
SmartPtr<DenseSymMatrix>
STDRS_
;
176
SmartPtr<const Vector>
last_x_
;
178
SmartPtr<const Vector>
last_grad_f_
;
180
SmartPtr<const Matrix>
last_jac_c_
;
182
SmartPtr<const Matrix>
last_jac_d_
;
184
Index
curr_lm_memory_old_
;
186
SmartPtr<MultiVectorMatrix>
S_old_
;
190
SmartPtr<MultiVectorMatrix>
Y_old_
;
193
SmartPtr<MultiVectorMatrix>
Ypart_old_
;
196
SmartPtr<DenseVector>
D_old_
;
198
SmartPtr<DenseGenMatrix>
L_old_
;
200
SmartPtr<Vector>
B0_old_
;
204
Number
sigma_old_
;
206
SmartPtr<MultiVectorMatrix>
V_old_
;
208
SmartPtr<MultiVectorMatrix>
U_old_
;
211
SmartPtr<DenseSymMatrix>
SdotS_old_
;
214
bool
SdotS_uptodate_old_
;
216
SmartPtr<MultiVectorMatrix>
DRS_old_
;
219
SmartPtr<DenseSymMatrix>
STDRS_old_
;
221
228
bool
CheckSkippingBFGS
(
Vector
& s_new,
Vector
& y_new);
233
bool
UpdateInternalData
(
const
Vector
& s_new,
const
Vector
& y_new,
234
SmartPtr<Vector>
ypart_new);
240
void
AugmentMultiVector
(
SmartPtr<MultiVectorMatrix>
& V,
241
const
Vector
& v_new);
247
void
AugmentDenseVector
(
SmartPtr<DenseVector>
& V,
248
Number
v_new);
256
void
AugmentLMatrix
(
SmartPtr<DenseGenMatrix>
& V,
257
const
MultiVectorMatrix
& S,
258
const
MultiVectorMatrix
& Y);
265
void
AugmentSdotSMatrix
(
SmartPtr<DenseSymMatrix>
& V,
266
const
MultiVectorMatrix
& S);
274
void
AugmentSTDRSMatrix
(
SmartPtr<DenseSymMatrix>
& V,
275
const
MultiVectorMatrix
& S,
276
const
MultiVectorMatrix
& DRS);
277
282
void
ShiftMultiVector
(
SmartPtr<MultiVectorMatrix>
& V,
const
Vector
& v_new);
288
void
ShiftDenseVector
(
SmartPtr<DenseVector>
& V,
Number
v_new);
295
void
ShiftLMatrix
(
SmartPtr<DenseGenMatrix>
& V,
296
const
MultiVectorMatrix
& S,
297
const
MultiVectorMatrix
& Y);
303
void
ShiftSdotSMatrix
(
SmartPtr<DenseSymMatrix>
& V,
304
const
MultiVectorMatrix
& S);
310
void
ShiftSTDRSMatrix
(
SmartPtr<DenseSymMatrix>
& V,
311
const
MultiVectorMatrix
& S,
312
const
MultiVectorMatrix
& DRS);
315
void
RecalcY
(
Number
eta,
const
Vector
& DR_x,
316
MultiVectorMatrix
& S,
317
MultiVectorMatrix
& Ypart,
318
SmartPtr<MultiVectorMatrix>
& Y);
320
void
RecalcD
(
MultiVectorMatrix
& S,
321
MultiVectorMatrix
& Y,
322
SmartPtr<DenseVector>
& D);
324
void
RecalcL
(
MultiVectorMatrix
& S,
325
MultiVectorMatrix
& Y,
326
SmartPtr<DenseGenMatrix>
& L);
336
bool
SplitEigenvalues
(
DenseGenMatrix
& Q,
const
DenseVector
& E,
337
SmartPtr<DenseGenMatrix>
& Qminus,
338
SmartPtr<DenseGenMatrix>
& Qplus);
342
void
StoreInternalDataBackup
();
345
void
RestoreInternalDataBackup
();
348
void
ReleaseInternalDataBackup
();
351
void
SetW
();
353
354
};
355
356
}
// namespace Ipopt
357
358
#endif
Generated on Mon Mar 17 2014 19:49:12 by
1.8.1.2