-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathairport.mod
170 lines (159 loc) · 3.84 KB
/
airport.mod
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
# AMPL Model by Hande Y. Benson
#
# Copyright (C) 2001 Princeton University
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and that the copyright notice and this
# permission notice appear in all supporting documentation.
# Source:
# Contribution from a LANCELOT user.
# SIF input : Rodrigo de Barros Nabholz & Maria Aparecida Diniz Ehrhardt
# November 1994, DMA - IMECC- UNICAMP
# Adaptation for CUTE: Ph. Toint, November 1994.
# classification SQR2-MN-84-42
param N:=42;
param r{1..N};
param cx{1..N};
param cy{1..N};
var x{1..N} <= 10, >= -10;
var y{1..N} <= 10, >= -10;
minimize f:
sum {i in 1..N-1, j in i+1..N} ( (x[i]-x[j])^2 + (y[i]-y[j])^2 );
subject to cons1 {i in 1..N}:
(x[i]-cx[i])^2 + (y[i]-cy[i])^2 - r[i] <= 0;
data;
param r:=
1 0.09
2 0.3
3 0.09
4 0.45
5 0.5
6 0.04
7 0.1
8 0.02
9 0.02
10 0.07
11 0.4
12 0.045
13 0.05
14 0.056
15 0.36
16 0.08
17 0.07
18 0.36
19 0.67
20 0.38
21 0.37
22 0.05
23 0.4
24 0.66
25 0.05
26 0.07
27 0.08
28 0.3
29 0.31
30 0.49
31 0.09
32 0.46
33 0.12
34 0.07
35 0.07
36 0.09
37 0.05
38 0.13
39 0.16
40 0.46
41 0.25
42 0.1;
param cx:=
1 -6.3
2 -7.8
3 -9.0
4 -7.2
5 -5.7
6 -1.9
7 -3.5
8 -0.5
9 1.4
10 4.0
11 2.1
12 5.5
13 5.7
14 5.7
15 3.8
16 5.3
17 4.7
18 3.3
19 0.0
20 -1.0
21 -0.4
22 4.2
23 3.2
24 1.7
25 3.3
26 2.0
27 0.7
28 0.1
29 -0.1
30 -3.5
31 -4.0
32 -2.7
33 -0.5
34 -2.9
35 -1.2
36 -0.4
37 -0.1
38 -1.0
39 -1.7
40 -2.1
41 -1.8
42 0.0;
param cy:=
1 8.0
2 5.1
3 2.0
4 2.6
5 5.5
6 7.1
7 5.9
8 6.6
9 6.1
10 5.6
11 4.9
12 4.7
13 4.3
14 3.6
15 4.1
16 3.0
17 2.4
18 3.0
19 4.7
20 3.4
21 2.3
22 1.5
23 0.5
24 -1.7
25 -2.0
26 -3.1
27 -3.5
28 -2.4
29 -1.3
30 0.0
31 -1.7
32 -2.1
33 -0.4
34 -2.9
35 -3.4
36 -4.3
37 -5.2
38 -6.5
39 -7.5
40 -6.4
41 -5.1
42 0.0;
solve;
display f;
display x, y;