-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMATRIX2.SIF
143 lines (95 loc) · 2.58 KB
/
MATRIX2.SIF
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
142
143
***************************
* SET UP THE INITIAL DATA *
***************************
NAME MATRIX2
* Problem :
* *********
* Find the pair of 2 by 2 symmetric matrices that are closest in
* Frobenius norm, subject to the first (X) being positive semidefinite and
* the second (Y) being negative semidefinite.
* Source : a problem made up for the SIF/LANCELOT user' manual.
* SIF input: Ph. Toint, Jan 91.
* classification QOR2-AY-6-2
VARIABLES
X11
X12
X22
Y11
Y12
Y22
GROUPS
XN FROBDIST
XG XPOSDEF
XL YNEGDEF
BOUNDS
XR MATRIX2 X12
XR MATRIX2 Y12
XM MATRIX2 Y11
XM MATRIX2 Y22
START POINT
XV MATRIX2 'DEFAULT' 1.0
ELEMENT TYPE
EV ISQ V W
IV ISQ U
EV SQ X
EV 2PR X Y
ELEMENT USES
* Elements from the objective
XT XY11SQ ISQ
ZV XY11SQ V X11
ZV XY11SQ W Y11
XT XY12SQ ISQ
ZV XY12SQ V X12
ZV XY12SQ W Y12
XT XY22SQ ISQ
ZV XY22SQ V X22
ZV XY22SQ W Y22
* Constraint that X is positive semidefinite
XT X1122 2PR
ZV X1122 X X11
ZV X1122 Y X22
XT X12SQ SQ
ZV X12SQ X X12
* Constraint that Y is negative semidefinite
XT Y1122 2PR
ZV Y1122 X Y11
ZV Y1122 Y Y22
XT Y12SQ SQ
ZV Y12SQ X Y12
GROUP USES
* Objective function
XE FROBDIST XY11SQ XY22SQ
XE FROBDIST XY12SQ 2.0
* Constraint that X is positive semidefinite
XE XPOSDEF X1122 X12SQ -1.0
* Constraint that Y is negative semidefinite
XE YNEGDEF Y1122 Y12SQ -1.0
OBJECT BOUND
LO MATRIX2 0.0
* Solution
*LO SOLTN 0.0
ENDATA
***********************
* SET UP THE ELEMENTS *
* ROUTINE *
***********************
ELEMENTS MATRIX2
INDIVIDUALS
* Square of an internal variable
T ISQ
R U V 1.0 W -1.0
F U * U
G U U + U
H U U 2.0
* Square of an elemental variable
T SQ
F X * X
G X X + X
H X X 2.0
* Product of 2 elemental variables
T 2PR
F X * Y
G X Y
G Y X
H X Y 1.0
ENDATA