-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
all_interval1.fzn
299 lines (299 loc) · 14.8 KB
/
all_interval1.fzn
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
predicate fzn_all_different_int(array [int] of var int: x);
predicate count(array [int] of var int: x, var int: y, var int: c);
predicate fixed_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, int: b);
predicate global_cardinality(array [int] of var int: x, array [int] of int: cover, array [int] of var int: counts);
predicate maximum_int(var int: m, array [int] of var int: x);
predicate minimum_int(var int: m, array [int] of var int: x);
predicate sliding_sum(int: low, int: up, int: seq, array [int] of var int: vs);
predicate sort(array [int] of var int: x, array [int] of var int: y);
predicate table_bool(array [int] of var bool: x, array [int, int] of bool: t);
predicate table_int(array [int] of var int: x, array [int, int] of int: t);
predicate var_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, var int: b);
var -11..11: INT____00001 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00002 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00003 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00004 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00005 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00006 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00007 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00008 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00009 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00010 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00011 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00012 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00013 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00014 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00015 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00016 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00017 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00018 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00019 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00020 :: is_defined_var :: var_is_introduced;
var -11..11: INT____00021 :: is_defined_var :: var_is_introduced;
var 0..11: INT____00022 :: is_defined_var :: var_is_introduced;
array [1..12] of var 0..11: series :: output_array([0..11]);
constraint int_abs(INT____00001, INT____00002) :: defines_var(INT____00002);
constraint int_abs(INT____00003, INT____00004) :: defines_var(INT____00004);
constraint int_abs(INT____00005, INT____00006) :: defines_var(INT____00006);
constraint int_abs(INT____00007, INT____00008) :: defines_var(INT____00008);
constraint int_abs(INT____00009, INT____00010) :: defines_var(INT____00010);
constraint int_abs(INT____00011, INT____00012) :: defines_var(INT____00012);
constraint int_abs(INT____00013, INT____00014) :: defines_var(INT____00014);
constraint int_abs(INT____00015, INT____00016) :: defines_var(INT____00016);
constraint int_abs(INT____00017, INT____00018) :: defines_var(INT____00018);
constraint int_abs(INT____00019, INT____00020) :: defines_var(INT____00020);
constraint int_abs(INT____00021, INT____00022) :: defines_var(INT____00022);
constraint int_lin_eq([-1, -1, 1], [INT____00001, series[1], series[2]], 0) :: defines_var(INT____00001);
constraint int_lin_eq([-1, -1, 1], [INT____00003, series[2], series[3]], 0) :: defines_var(INT____00003);
constraint int_lin_eq([-1, -1, 1], [INT____00005, series[3], series[4]], 0) :: defines_var(INT____00005);
constraint int_lin_eq([-1, -1, 1], [INT____00007, series[4], series[5]], 0) :: defines_var(INT____00007);
constraint int_lin_eq([-1, -1, 1], [INT____00009, series[5], series[6]], 0) :: defines_var(INT____00009);
constraint int_lin_eq([-1, -1, 1], [INT____00011, series[6], series[7]], 0) :: defines_var(INT____00011);
constraint int_lin_eq([-1, -1, 1], [INT____00013, series[7], series[8]], 0) :: defines_var(INT____00013);
constraint int_lin_eq([-1, -1, 1], [INT____00015, series[8], series[9]], 0) :: defines_var(INT____00015);
constraint int_lin_eq([-1, -1, 1], [INT____00017, series[9], series[10]], 0) :: defines_var(INT____00017);
constraint int_lin_eq([-1, -1, 1], [INT____00019, series[10], series[11]], 0) :: defines_var(INT____00019);
constraint int_lin_eq([-1, -1, 1], [INT____00021, series[11], series[12]], 0) :: defines_var(INT____00021);
constraint int_ne(INT____00002, INT____00004);
constraint int_ne(INT____00002, INT____00006);
constraint int_ne(INT____00002, INT____00008);
constraint int_ne(INT____00002, INT____00010);
constraint int_ne(INT____00002, INT____00012);
constraint int_ne(INT____00002, INT____00014);
constraint int_ne(INT____00002, INT____00016);
constraint int_ne(INT____00002, INT____00018);
constraint int_ne(INT____00002, INT____00020);
constraint int_ne(INT____00002, INT____00022);
constraint int_ne(INT____00004, INT____00002);
constraint int_ne(INT____00004, INT____00006);
constraint int_ne(INT____00004, INT____00008);
constraint int_ne(INT____00004, INT____00010);
constraint int_ne(INT____00004, INT____00012);
constraint int_ne(INT____00004, INT____00014);
constraint int_ne(INT____00004, INT____00016);
constraint int_ne(INT____00004, INT____00018);
constraint int_ne(INT____00004, INT____00020);
constraint int_ne(INT____00004, INT____00022);
constraint int_ne(INT____00006, INT____00002);
constraint int_ne(INT____00006, INT____00004);
constraint int_ne(INT____00006, INT____00008);
constraint int_ne(INT____00006, INT____00010);
constraint int_ne(INT____00006, INT____00012);
constraint int_ne(INT____00006, INT____00014);
constraint int_ne(INT____00006, INT____00016);
constraint int_ne(INT____00006, INT____00018);
constraint int_ne(INT____00006, INT____00020);
constraint int_ne(INT____00006, INT____00022);
constraint int_ne(INT____00008, INT____00002);
constraint int_ne(INT____00008, INT____00004);
constraint int_ne(INT____00008, INT____00006);
constraint int_ne(INT____00008, INT____00010);
constraint int_ne(INT____00008, INT____00012);
constraint int_ne(INT____00008, INT____00014);
constraint int_ne(INT____00008, INT____00016);
constraint int_ne(INT____00008, INT____00018);
constraint int_ne(INT____00008, INT____00020);
constraint int_ne(INT____00008, INT____00022);
constraint int_ne(INT____00010, INT____00002);
constraint int_ne(INT____00010, INT____00004);
constraint int_ne(INT____00010, INT____00006);
constraint int_ne(INT____00010, INT____00008);
constraint int_ne(INT____00010, INT____00012);
constraint int_ne(INT____00010, INT____00014);
constraint int_ne(INT____00010, INT____00016);
constraint int_ne(INT____00010, INT____00018);
constraint int_ne(INT____00010, INT____00020);
constraint int_ne(INT____00010, INT____00022);
constraint int_ne(INT____00012, INT____00002);
constraint int_ne(INT____00012, INT____00004);
constraint int_ne(INT____00012, INT____00006);
constraint int_ne(INT____00012, INT____00008);
constraint int_ne(INT____00012, INT____00010);
constraint int_ne(INT____00012, INT____00014);
constraint int_ne(INT____00012, INT____00016);
constraint int_ne(INT____00012, INT____00018);
constraint int_ne(INT____00012, INT____00020);
constraint int_ne(INT____00012, INT____00022);
constraint int_ne(INT____00014, INT____00002);
constraint int_ne(INT____00014, INT____00004);
constraint int_ne(INT____00014, INT____00006);
constraint int_ne(INT____00014, INT____00008);
constraint int_ne(INT____00014, INT____00010);
constraint int_ne(INT____00014, INT____00012);
constraint int_ne(INT____00014, INT____00016);
constraint int_ne(INT____00014, INT____00018);
constraint int_ne(INT____00014, INT____00020);
constraint int_ne(INT____00014, INT____00022);
constraint int_ne(INT____00016, INT____00002);
constraint int_ne(INT____00016, INT____00004);
constraint int_ne(INT____00016, INT____00006);
constraint int_ne(INT____00016, INT____00008);
constraint int_ne(INT____00016, INT____00010);
constraint int_ne(INT____00016, INT____00012);
constraint int_ne(INT____00016, INT____00014);
constraint int_ne(INT____00016, INT____00018);
constraint int_ne(INT____00016, INT____00020);
constraint int_ne(INT____00016, INT____00022);
constraint int_ne(INT____00018, INT____00002);
constraint int_ne(INT____00018, INT____00004);
constraint int_ne(INT____00018, INT____00006);
constraint int_ne(INT____00018, INT____00008);
constraint int_ne(INT____00018, INT____00010);
constraint int_ne(INT____00018, INT____00012);
constraint int_ne(INT____00018, INT____00014);
constraint int_ne(INT____00018, INT____00016);
constraint int_ne(INT____00018, INT____00020);
constraint int_ne(INT____00018, INT____00022);
constraint int_ne(INT____00020, INT____00002);
constraint int_ne(INT____00020, INT____00004);
constraint int_ne(INT____00020, INT____00006);
constraint int_ne(INT____00020, INT____00008);
constraint int_ne(INT____00020, INT____00010);
constraint int_ne(INT____00020, INT____00012);
constraint int_ne(INT____00020, INT____00014);
constraint int_ne(INT____00020, INT____00016);
constraint int_ne(INT____00020, INT____00018);
constraint int_ne(INT____00020, INT____00022);
constraint int_ne(INT____00022, INT____00002);
constraint int_ne(INT____00022, INT____00004);
constraint int_ne(INT____00022, INT____00006);
constraint int_ne(INT____00022, INT____00008);
constraint int_ne(INT____00022, INT____00010);
constraint int_ne(INT____00022, INT____00012);
constraint int_ne(INT____00022, INT____00014);
constraint int_ne(INT____00022, INT____00016);
constraint int_ne(INT____00022, INT____00018);
constraint int_ne(INT____00022, INT____00020);
constraint int_ne(series[1], series[2]);
constraint int_ne(series[1], series[3]);
constraint int_ne(series[1], series[4]);
constraint int_ne(series[1], series[5]);
constraint int_ne(series[1], series[6]);
constraint int_ne(series[1], series[7]);
constraint int_ne(series[1], series[8]);
constraint int_ne(series[1], series[9]);
constraint int_ne(series[1], series[10]);
constraint int_ne(series[1], series[11]);
constraint int_ne(series[1], series[12]);
constraint int_ne(series[2], series[1]);
constraint int_ne(series[2], series[3]);
constraint int_ne(series[2], series[4]);
constraint int_ne(series[2], series[5]);
constraint int_ne(series[2], series[6]);
constraint int_ne(series[2], series[7]);
constraint int_ne(series[2], series[8]);
constraint int_ne(series[2], series[9]);
constraint int_ne(series[2], series[10]);
constraint int_ne(series[2], series[11]);
constraint int_ne(series[2], series[12]);
constraint int_ne(series[3], series[1]);
constraint int_ne(series[3], series[2]);
constraint int_ne(series[3], series[4]);
constraint int_ne(series[3], series[5]);
constraint int_ne(series[3], series[6]);
constraint int_ne(series[3], series[7]);
constraint int_ne(series[3], series[8]);
constraint int_ne(series[3], series[9]);
constraint int_ne(series[3], series[10]);
constraint int_ne(series[3], series[11]);
constraint int_ne(series[3], series[12]);
constraint int_ne(series[4], series[1]);
constraint int_ne(series[4], series[2]);
constraint int_ne(series[4], series[3]);
constraint int_ne(series[4], series[5]);
constraint int_ne(series[4], series[6]);
constraint int_ne(series[4], series[7]);
constraint int_ne(series[4], series[8]);
constraint int_ne(series[4], series[9]);
constraint int_ne(series[4], series[10]);
constraint int_ne(series[4], series[11]);
constraint int_ne(series[4], series[12]);
constraint int_ne(series[5], series[1]);
constraint int_ne(series[5], series[2]);
constraint int_ne(series[5], series[3]);
constraint int_ne(series[5], series[4]);
constraint int_ne(series[5], series[6]);
constraint int_ne(series[5], series[7]);
constraint int_ne(series[5], series[8]);
constraint int_ne(series[5], series[9]);
constraint int_ne(series[5], series[10]);
constraint int_ne(series[5], series[11]);
constraint int_ne(series[5], series[12]);
constraint int_ne(series[6], series[1]);
constraint int_ne(series[6], series[2]);
constraint int_ne(series[6], series[3]);
constraint int_ne(series[6], series[4]);
constraint int_ne(series[6], series[5]);
constraint int_ne(series[6], series[7]);
constraint int_ne(series[6], series[8]);
constraint int_ne(series[6], series[9]);
constraint int_ne(series[6], series[10]);
constraint int_ne(series[6], series[11]);
constraint int_ne(series[6], series[12]);
constraint int_ne(series[7], series[1]);
constraint int_ne(series[7], series[2]);
constraint int_ne(series[7], series[3]);
constraint int_ne(series[7], series[4]);
constraint int_ne(series[7], series[5]);
constraint int_ne(series[7], series[6]);
constraint int_ne(series[7], series[8]);
constraint int_ne(series[7], series[9]);
constraint int_ne(series[7], series[10]);
constraint int_ne(series[7], series[11]);
constraint int_ne(series[7], series[12]);
constraint int_ne(series[8], series[1]);
constraint int_ne(series[8], series[2]);
constraint int_ne(series[8], series[3]);
constraint int_ne(series[8], series[4]);
constraint int_ne(series[8], series[5]);
constraint int_ne(series[8], series[6]);
constraint int_ne(series[8], series[7]);
constraint int_ne(series[8], series[9]);
constraint int_ne(series[8], series[10]);
constraint int_ne(series[8], series[11]);
constraint int_ne(series[8], series[12]);
constraint int_ne(series[9], series[1]);
constraint int_ne(series[9], series[2]);
constraint int_ne(series[9], series[3]);
constraint int_ne(series[9], series[4]);
constraint int_ne(series[9], series[5]);
constraint int_ne(series[9], series[6]);
constraint int_ne(series[9], series[7]);
constraint int_ne(series[9], series[8]);
constraint int_ne(series[9], series[10]);
constraint int_ne(series[9], series[11]);
constraint int_ne(series[9], series[12]);
constraint int_ne(series[10], series[1]);
constraint int_ne(series[10], series[2]);
constraint int_ne(series[10], series[3]);
constraint int_ne(series[10], series[4]);
constraint int_ne(series[10], series[5]);
constraint int_ne(series[10], series[6]);
constraint int_ne(series[10], series[7]);
constraint int_ne(series[10], series[8]);
constraint int_ne(series[10], series[9]);
constraint int_ne(series[10], series[11]);
constraint int_ne(series[10], series[12]);
constraint int_ne(series[11], series[1]);
constraint int_ne(series[11], series[2]);
constraint int_ne(series[11], series[3]);
constraint int_ne(series[11], series[4]);
constraint int_ne(series[11], series[5]);
constraint int_ne(series[11], series[6]);
constraint int_ne(series[11], series[7]);
constraint int_ne(series[11], series[8]);
constraint int_ne(series[11], series[9]);
constraint int_ne(series[11], series[10]);
constraint int_ne(series[11], series[12]);
constraint int_ne(series[12], series[1]);
constraint int_ne(series[12], series[2]);
constraint int_ne(series[12], series[3]);
constraint int_ne(series[12], series[4]);
constraint int_ne(series[12], series[5]);
constraint int_ne(series[12], series[6]);
constraint int_ne(series[12], series[7]);
constraint int_ne(series[12], series[8]);
constraint int_ne(series[12], series[9]);
constraint int_ne(series[12], series[10]);
constraint int_ne(series[12], series[11]);
solve :: int_search(series, first_fail, indomain_min, complete) satisfy;