-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCONT5-QP.SIF
227 lines (167 loc) · 5.42 KB
/
CONT5-QP.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
***************************
* SET UP THE INITIAL DATA *
***************************
NAME CONT5-QP
* Problem :
* *********
* A linear-quadratic control problem as suggested by
* K. Schittkowski,
* ``Numerical solution of a time-optimal parabolic boundary-value
* control problem'', J. Optim. Theory Appl., vol. 27, pp. 271-290, 1979,
* H. Goldberg and F. Troltzsch,
* ``On a Lagrange-Newton method for a nonlinear parabolic boundary control
* problem'', Optim. Meth. Software, vol. 8, pp. 225-247, 1998.
* and
* H. D. Mittelmann,
* ``Verification of Second-Order Sufficient Optimality Conditions
* for Semilinear Elliptic and Parabolic Control Problems'',
* to appear in Comp. Optim. Applic. 2000.
* See also Hans Mittelmann's WWW article
* http://plato.la.asu.edu/papers/paper90/paper.html
* where the problem is example 5.2-I.
* SIF input: Nick Gould, August 2000
* classification QLR2-MN-V-V
* Number of nodes in x direction
IE n 200 $-PARAMETER
*IE n 300 $-PARAMETER
*IE n 400 $-PARAMETER
*IE n 600 $-PARAMETER
*IE n 800 $-PARAMETER
*IE n 1000 $-PARAMETER
* Number of nodes in y direction
I= m n
RE t 1.58
RE a 0.001
* Other useful parameters
IE 0 0
IE 1 1
IE 2 2
IA n-1 n -1
IA n-2 n -2
IA m-1 m -1
RE one 1.0
RE 0.5 0.5
RE -2.0 -2.0
RE 1.5 1.5
RI rn n
RI rm m
R/ dx one rn
R* h2 dx dx
R/ dt t rm
R/ 1/dt one dt
RM -1/dt 1/dt -1.0
R/ 1/h2 one h2
RM -1/2h2 1/h2 -0.5
RM 0.5dx dx 0.5
RM 0.25dx dx 0.25
R* adt a dt
RM 0.5adt adt 0.5
RM 0.25adt adt 0.25
VARIABLES
DO j 0 n
DO i 0 m
X y(i,j)
ND
DO i 1 m
X u(i)
ND
GROUPS
* objective function (see later)
N f
* constraints
* pde{i in 0..m-1, j in 1..n-1}:
* (y[i+1,j] - y[i,j])/dt - .5*(y[i,j-1] - 2*y[i,j] + y[i,j+1]
* + y[i+1,j-1] - 2*y[i+1,j] + y[i+1,j+1])/h2 = 0
DO j 1 n-1
IA j+1 j 1
IA j-1 j -1
DO i 0 m-1
IA i+1 i 1
ZE p(i,j) y(i+1,j) 1/dt
ZE p(i,j) y(i,j) -1/dt
ZE p(i,j) y(i,j-1) -1/2h2
ZE p(i,j) y(i,j) 1/h2
ZE p(i,j) y(i,j+1) -1/2h2
ZE p(i,j) y(i+1,j-1) -1/2h2
ZE p(i,j) y(i+1,j) 1/h2
ZE p(i,j) y(i+1,j+1) -1/2h2
ND
* bc1 {i in 1..m}: y[i,2] - 4*y[i,1] + 3*y[i,0] = 0;
DO i 1 m
XE bc1(i) y(i,2) 1.0 y(i,1) -4.0
XE bc1(i) y(i,0) 3.0
ND
* bc2 {i in 1..m}: (y[i,n-2] - 4*y[i,n-1] + 3*y[i,n])/(2*dx) - u[i] + y[i,n]
DO i 1 m
R/ 1/2dx 0.5 dx
R/ -4/2dx -2.0 dx
R/ 3/2dx 1.5 dx
ZE bc2(i) y(i,n-2) 1/2dx
ZE bc2(i) y(i,n-1) -4/2dx
ZE bc2(i) y(i,n) 3/2dx
XE bc2(i) u(i) -1.0
XE bc2(i) y(i,n) 1.0
ND
BOUNDS
DO j 0 n
XX CONT5-QP y(0,j) 0.0
DO i 1 m
XL CONT5-QP y(i,j) -1.0
XU CONT5-QP y(i,j) 1.0
ND
DO i 1 m
XL CONT5-QP u(i) 0.0
XU CONT5-QP u(i) 1.0
ND
ELEMENT TYPE
EV YMYT2 Y
EP YMYT2 YT
EV U2 U
ELEMENT USES
* elements p(j) = (y[m,j] - yt[j])^2, where yt := .5*(1 - (j*dx)^2) j = 0,...,n
DO j 0 n
RI rj j
R* jdx rj dx
R* jdx2 jdx jdx
R- 1-jdx2 one jdx2
R* yt 0.5 1-jdx2
XT p(j) YMYT2
ZV p(j) Y y(m,j)
ZP p(j) YT yt
ND
* elements q(i) = u[i]^2, i = 1, ,,, m
DO i 1 m
XT q(i) U2
ZV q(i) U u(i)
ND
GROUP USES
* objective f: .25*dx*( p[0] + 2 * sum{j=1,,n-1} p[j] + p[n] )
* + .25*a*dt*( 2* sum{i in 1..m-1} q[i] + q[m])
ZE f p(0) 0.25dx
DO j 1 n-1
ZE f p(j) 0.5dx
ND
ZE f p(n) 0.25dx
DO i 1 m-1
ZE f q(i) 0.5adt
ND
ZE f q(m) 0.25adt
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS CONT5-QP
TEMPORARIES
R YMYT
INDIVIDUALS
T YMYT2
A YMYT Y - YT
F YMYT * YMYT
G Y 2.0 * YMYT
H Y Y 2.0
T U2
F U * U
G U 2.0 * U
H U U 2.0
ENDATA