-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOBSTCLAE.SIF
233 lines (165 loc) · 5.67 KB
/
OBSTCLAE.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
***************************
* SET UP THE INITIAL DATA *
***************************
NAME OBSTCLAE
* Problem :
* *********
* A quadratic obstacle problem by Dembo and Tulowitzki
* The problem comes from the obstacle problem on a rectangle.
* The rectangle is discretized into (px-1)(py-1) little rectangles. The
* heights of the considered surface above the corners of these little
* rectangles are the problem variables, There are px*py of them.
* Source:
* R. Dembo and U. Tulowitzki,
* "On the minimization of quadratic functions subject to box
* constraints",
* WP 71, Yale University (new Haven, USA), 1983.
* See also More 1989 (Problem A, Starting point E)
* SIF input: Ph. Toint, Dec 1989.
* classification QBR2-AY-V-0
* PX is the number of points along the X side of the rectangle
* PY is the number of points along the Y side of the rectangle
*IE PX 4 $-PARAMETER n = 16
*IE PY 4 $-PARAMETER
*IE PX 10 $-PARAMETER n = 100
*IE PY 10 $-PARAMETER
*IE PX 23 $-PARAMETER n = 529
*IE PY 23 $-PARAMETER
*IE PX 32 $-PARAMETER n = 1024
*IE PY 32 $-PARAMETER
*IE PX 75 $-PARAMETER n = 5625 original value
*IE PY 75 $-PARAMETER original value
IE PX 100 $-PARAMETER n = 10000
IE PY 100 $-PARAMETER
*IE PX 125 $-PARAMETER n = 15625
*IE PY 125 $-PARAMETER
* The force constant
RE C 1.0 $-PARAMETER the force constant
* Define a few helpful parameters
IA PX-1 PX -1
RI RPX-1 PX-1
RD HX RPX-1 1.0
IA PY-1 PY -1
RI RPY-1 PY-1
RD HY RPY-1 1.0
R* HXHY HX HY
RD 1/HX HX 1.0
RD 1/HY HY 1.0
R* HX/HY HX 1/HY
R* HY/HX HY 1/HX
RM HY/4HX HY/HX 0.25
RM HX/4HY HX/HY 0.25
R* C0 HXHY C
RM LINC C0 -1.0
IE 1 1
IE 2 2
VARIABLES
* Define one variable per discretized point in the unit square
DO J 1 PX
DO I 1 PY
X X(I,J)
ND
GROUPS
* Define a group per interior node
DO I 2 PY-1
DO J 2 PX-1
ZN G(I,J) X(I,J) LINC
ND
BOUNDS
* Describe the upper osbtacle (problem A)
XU OBSTCLAE 'DEFAULT' 2000.0
* Fix the variables on the lower and upper edges of the unit square
DO J 1 PX
XX OBSTCLAE X(1,J) 0.0
XX OBSTCLAE X(PY,J) 0.0
ND
* Fix the variables on the left and right edges of the unit square
DO I 2 PY-1
XX OBSTCLAE X(I,PX) 0.0
XX OBSTCLAE X(I,1) 0.0
ND
* Decribe the lower obstacle
DO I 2 PY-1
IA I-1 I -1
RI RI-1 I-1
R* XI1 RI-1 HY
RM 3XI1 XI1 3.2
R( SXI1 SIN 3XI1
DO J 2 PX-1
IA J-1 J -1
RI RJ-1 J-1
R* XI2 RJ-1 HX
RM 3XI2 XI2 3.3
R( SXI2 SIN 3XI2
R* LOW SXI1 SXI2
ZL OBSTCLAE X(I,J) LOW
ND
START POINT
* All variables not on the boundary are set to 1.0
* (Starting point E)
XV OBSAE161 'DEFAULT' 1.0
* Start from the boundary values on the lower and upper edges
DO J 1 PX
X OBSTCLAE X(1,J) 0.0
X OBSTCLAE X(PY,J) 0.0
ND
* Start from the boundary values on the left and right edges
DO I 2 PY-1
X OBSTCLAE X(I,PX) 0.0
X OBSTCLAE X(I,1) 0.0
ND
ELEMENT TYPE
EV ISQ V1 V2
IV ISQ U
ELEMENT USES
* Each node has four elements
DO I 2 PY-1
IA I-1 I -1
IA I+1 I 1
DO J 2 PX-1
IA J-1 J -1
IA J+1 J 1
XT A(I,J) ISQ
ZV A(I,J) V1 X(I+1,J)
ZV A(I,J) V2 X(I,J)
XT B(I,J) ISQ
ZV B(I,J) V1 X(I,J+1)
ZV B(I,J) V2 X(I,J)
XT C(I,J) ISQ
ZV C(I,J) V1 X(I-1,J)
ZV C(I,J) V2 X(I,J)
XT D(I,J) ISQ
ZV D(I,J) V1 X(I,J-1)
ZV D(I,J) V2 X(I,J)
ND
GROUP USES
DO I 2 PY-1
DO J 2 PX-1
ZE G(I,J) A(I,J) HY/4HX
ZE G(I,J) B(I,J) HX/4HY
ZE G(I,J) C(I,J) HY/4HX
ZE G(I,J) D(I,J) HX/4HY
ND
OBJECT BOUND
* Solution
*LO SOLTN(4) 0.753659753
*LO SOLTN(10) 1.397897560
*LO SOLTN(23) 1.678027027
*LO SOLTN(32) 1.748270031
*LO SOLTN(75) ???
*LO SOLTN(100) ???
*LO SOLTN(125) ???
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS OBSTCLAE
INDIVIDUALS
* Difference squared
T ISQ
R U V1 1.0 V2 -1.0
F U * U
G U U + U
H U U 2.0
ENDATA