forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alldifferent_except_0.fzn
164 lines (164 loc) · 11.5 KB
/
alldifferent_except_0.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
var bool: BOOL____00001 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00002 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00003 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00004 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00005 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00006 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00007 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00008 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00009 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00010 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00011 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00012 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00013 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00014 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00015 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00016 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00017 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00018 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00019 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00020 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00021 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00022 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00023 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00024 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00025 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00026 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00027 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00028 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00029 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00030 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00031 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00032 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00033 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00034 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00035 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00036 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00037 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00038 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00039 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00040 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00041 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00042 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00043 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00044 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00045 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00046 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00047 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00048 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00049 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00050 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00051 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00052 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00053 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00054 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00055 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00056 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00057 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00058 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00059 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00060 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00061 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00062 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00063 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00064 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00065 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00066 :: is_defined_var :: var_is_introduced;
array [1..6] of var 0..9: x :: output_array([1..6]);
constraint array_bool_and([BOOL____00001, BOOL____00002], BOOL____00004) :: defines_var(BOOL____00004);
constraint array_bool_and([BOOL____00001, BOOL____00005], BOOL____00007) :: defines_var(BOOL____00007);
constraint array_bool_and([BOOL____00001, BOOL____00008], BOOL____00010) :: defines_var(BOOL____00010);
constraint array_bool_and([BOOL____00001, BOOL____00011], BOOL____00013) :: defines_var(BOOL____00013);
constraint array_bool_and([BOOL____00001, BOOL____00014], BOOL____00016) :: defines_var(BOOL____00016);
constraint array_bool_and([BOOL____00002, BOOL____00001], BOOL____00018) :: defines_var(BOOL____00018);
constraint array_bool_and([BOOL____00002, BOOL____00005], BOOL____00020) :: defines_var(BOOL____00020);
constraint array_bool_and([BOOL____00002, BOOL____00008], BOOL____00022) :: defines_var(BOOL____00022);
constraint array_bool_and([BOOL____00002, BOOL____00011], BOOL____00024) :: defines_var(BOOL____00024);
constraint array_bool_and([BOOL____00002, BOOL____00014], BOOL____00026) :: defines_var(BOOL____00026);
constraint array_bool_and([BOOL____00005, BOOL____00001], BOOL____00028) :: defines_var(BOOL____00028);
constraint array_bool_and([BOOL____00005, BOOL____00002], BOOL____00030) :: defines_var(BOOL____00030);
constraint array_bool_and([BOOL____00005, BOOL____00008], BOOL____00032) :: defines_var(BOOL____00032);
constraint array_bool_and([BOOL____00005, BOOL____00011], BOOL____00034) :: defines_var(BOOL____00034);
constraint array_bool_and([BOOL____00005, BOOL____00014], BOOL____00036) :: defines_var(BOOL____00036);
constraint array_bool_and([BOOL____00008, BOOL____00001], BOOL____00038) :: defines_var(BOOL____00038);
constraint array_bool_and([BOOL____00008, BOOL____00002], BOOL____00040) :: defines_var(BOOL____00040);
constraint array_bool_and([BOOL____00008, BOOL____00005], BOOL____00042) :: defines_var(BOOL____00042);
constraint array_bool_and([BOOL____00008, BOOL____00011], BOOL____00044) :: defines_var(BOOL____00044);
constraint array_bool_and([BOOL____00008, BOOL____00014], BOOL____00046) :: defines_var(BOOL____00046);
constraint array_bool_and([BOOL____00011, BOOL____00001], BOOL____00048) :: defines_var(BOOL____00048);
constraint array_bool_and([BOOL____00011, BOOL____00002], BOOL____00050) :: defines_var(BOOL____00050);
constraint array_bool_and([BOOL____00011, BOOL____00005], BOOL____00052) :: defines_var(BOOL____00052);
constraint array_bool_and([BOOL____00011, BOOL____00008], BOOL____00054) :: defines_var(BOOL____00054);
constraint array_bool_and([BOOL____00011, BOOL____00014], BOOL____00056) :: defines_var(BOOL____00056);
constraint array_bool_and([BOOL____00014, BOOL____00001], BOOL____00058) :: defines_var(BOOL____00058);
constraint array_bool_and([BOOL____00014, BOOL____00002], BOOL____00060) :: defines_var(BOOL____00060);
constraint array_bool_and([BOOL____00014, BOOL____00005], BOOL____00062) :: defines_var(BOOL____00062);
constraint array_bool_and([BOOL____00014, BOOL____00008], BOOL____00064) :: defines_var(BOOL____00064);
constraint array_bool_and([BOOL____00014, BOOL____00011], BOOL____00066) :: defines_var(BOOL____00066);
constraint bool_le(BOOL____00004, BOOL____00003);
constraint bool_le(BOOL____00007, BOOL____00006);
constraint bool_le(BOOL____00010, BOOL____00009);
constraint bool_le(BOOL____00013, BOOL____00012);
constraint bool_le(BOOL____00016, BOOL____00015);
constraint bool_le(BOOL____00018, BOOL____00017);
constraint bool_le(BOOL____00020, BOOL____00019);
constraint bool_le(BOOL____00022, BOOL____00021);
constraint bool_le(BOOL____00024, BOOL____00023);
constraint bool_le(BOOL____00026, BOOL____00025);
constraint bool_le(BOOL____00028, BOOL____00027);
constraint bool_le(BOOL____00030, BOOL____00029);
constraint bool_le(BOOL____00032, BOOL____00031);
constraint bool_le(BOOL____00034, BOOL____00033);
constraint bool_le(BOOL____00036, BOOL____00035);
constraint bool_le(BOOL____00038, BOOL____00037);
constraint bool_le(BOOL____00040, BOOL____00039);
constraint bool_le(BOOL____00042, BOOL____00041);
constraint bool_le(BOOL____00044, BOOL____00043);
constraint bool_le(BOOL____00046, BOOL____00045);
constraint bool_le(BOOL____00048, BOOL____00047);
constraint bool_le(BOOL____00050, BOOL____00049);
constraint bool_le(BOOL____00052, BOOL____00051);
constraint bool_le(BOOL____00054, BOOL____00053);
constraint bool_le(BOOL____00056, BOOL____00055);
constraint bool_le(BOOL____00058, BOOL____00057);
constraint bool_le(BOOL____00060, BOOL____00059);
constraint bool_le(BOOL____00062, BOOL____00061);
constraint bool_le(BOOL____00064, BOOL____00063);
constraint bool_le(BOOL____00066, BOOL____00065);
constraint int_lt_reif(0, x[1], BOOL____00001) :: defines_var(BOOL____00001);
constraint int_lt_reif(0, x[2], BOOL____00002) :: defines_var(BOOL____00002);
constraint int_lt_reif(0, x[3], BOOL____00005) :: defines_var(BOOL____00005);
constraint int_lt_reif(0, x[4], BOOL____00008) :: defines_var(BOOL____00008);
constraint int_lt_reif(0, x[5], BOOL____00011) :: defines_var(BOOL____00011);
constraint int_lt_reif(0, x[6], BOOL____00014) :: defines_var(BOOL____00014);
constraint int_ne_reif(x[1], x[2], BOOL____00003) :: defines_var(BOOL____00003);
constraint int_ne_reif(x[1], x[3], BOOL____00006) :: defines_var(BOOL____00006);
constraint int_ne_reif(x[1], x[4], BOOL____00009) :: defines_var(BOOL____00009);
constraint int_ne_reif(x[1], x[5], BOOL____00012) :: defines_var(BOOL____00012);
constraint int_ne_reif(x[1], x[6], BOOL____00015) :: defines_var(BOOL____00015);
constraint int_ne_reif(x[2], x[1], BOOL____00017) :: defines_var(BOOL____00017);
constraint int_ne_reif(x[2], x[3], BOOL____00019) :: defines_var(BOOL____00019);
constraint int_ne_reif(x[2], x[4], BOOL____00021) :: defines_var(BOOL____00021);
constraint int_ne_reif(x[2], x[5], BOOL____00023) :: defines_var(BOOL____00023);
constraint int_ne_reif(x[2], x[6], BOOL____00025) :: defines_var(BOOL____00025);
constraint int_ne_reif(x[3], x[1], BOOL____00027) :: defines_var(BOOL____00027);
constraint int_ne_reif(x[3], x[2], BOOL____00029) :: defines_var(BOOL____00029);
constraint int_ne_reif(x[3], x[4], BOOL____00031) :: defines_var(BOOL____00031);
constraint int_ne_reif(x[3], x[5], BOOL____00033) :: defines_var(BOOL____00033);
constraint int_ne_reif(x[3], x[6], BOOL____00035) :: defines_var(BOOL____00035);
constraint int_ne_reif(x[4], x[1], BOOL____00037) :: defines_var(BOOL____00037);
constraint int_ne_reif(x[4], x[2], BOOL____00039) :: defines_var(BOOL____00039);
constraint int_ne_reif(x[4], x[3], BOOL____00041) :: defines_var(BOOL____00041);
constraint int_ne_reif(x[4], x[5], BOOL____00043) :: defines_var(BOOL____00043);
constraint int_ne_reif(x[4], x[6], BOOL____00045) :: defines_var(BOOL____00045);
constraint int_ne_reif(x[5], x[1], BOOL____00047) :: defines_var(BOOL____00047);
constraint int_ne_reif(x[5], x[2], BOOL____00049) :: defines_var(BOOL____00049);
constraint int_ne_reif(x[5], x[3], BOOL____00051) :: defines_var(BOOL____00051);
constraint int_ne_reif(x[5], x[4], BOOL____00053) :: defines_var(BOOL____00053);
constraint int_ne_reif(x[5], x[6], BOOL____00055) :: defines_var(BOOL____00055);
constraint int_ne_reif(x[6], x[1], BOOL____00057) :: defines_var(BOOL____00057);
constraint int_ne_reif(x[6], x[2], BOOL____00059) :: defines_var(BOOL____00059);
constraint int_ne_reif(x[6], x[3], BOOL____00061) :: defines_var(BOOL____00061);
constraint int_ne_reif(x[6], x[4], BOOL____00063) :: defines_var(BOOL____00063);
constraint int_ne_reif(x[6], x[5], BOOL____00065) :: defines_var(BOOL____00065);
solve satisfy;