forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
among_modulo.fzn
64 lines (64 loc) · 4.22 KB
/
among_modulo.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
var bool: BOOL____00002 :: 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____00009 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00010 :: 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____00019 :: is_defined_var :: var_is_introduced;
var bool: BOOL____00020 :: 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 0..100: INT____00001 :: var_is_introduced;
var 0..99: INT____00003 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00006 :: is_defined_var :: var_is_introduced;
var 0..100: INT____00007 :: var_is_introduced;
var 0..99: INT____00008 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00011 :: is_defined_var :: var_is_introduced;
var 0..100: INT____00012 :: var_is_introduced;
var 0..99: INT____00013 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00016 :: is_defined_var :: var_is_introduced;
var 0..100: INT____00017 :: var_is_introduced;
var 0..99: INT____00018 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00021 :: is_defined_var :: var_is_introduced;
var 0..100: INT____00022 :: var_is_introduced;
var 0..99: INT____00023 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00026 :: is_defined_var :: var_is_introduced;
var 0..5: INT____00027 :: is_defined_var :: var_is_introduced;
var 0..5: nvar :: output_var = INT____00027;
var 2..2: quotient :: output_var = 2;
var 0..0: remainder :: output_var = 0;
array [1..5] of var 1..8: x :: output_array([1..5]);
constraint array_bool_and([BOOL____00004, BOOL____00002], BOOL____00005) :: defines_var(BOOL____00005);
constraint array_bool_and([BOOL____00009, BOOL____00002], BOOL____00010) :: defines_var(BOOL____00010);
constraint array_bool_and([BOOL____00014, BOOL____00002], BOOL____00015) :: defines_var(BOOL____00015);
constraint array_bool_and([BOOL____00019, BOOL____00002], BOOL____00020) :: defines_var(BOOL____00020);
constraint array_bool_and([BOOL____00024, BOOL____00002], BOOL____00025) :: defines_var(BOOL____00025);
constraint bool2int(BOOL____00005, INT____00006) :: defines_var(INT____00006);
constraint bool2int(BOOL____00010, INT____00011) :: defines_var(INT____00011);
constraint bool2int(BOOL____00015, INT____00016) :: defines_var(INT____00016);
constraint bool2int(BOOL____00020, INT____00021) :: defines_var(INT____00021);
constraint bool2int(BOOL____00025, INT____00026) :: defines_var(INT____00026);
constraint int_eq(1, x[5]);
constraint int_eq(4, x[1]);
constraint int_eq(4, x[4]);
constraint int_eq(5, x[2]);
constraint int_eq(8, x[3]);
constraint int_eq_reif(INT____00003, remainder, BOOL____00004) :: defines_var(BOOL____00004);
constraint int_eq_reif(INT____00008, remainder, BOOL____00009) :: defines_var(BOOL____00009);
constraint int_eq_reif(INT____00013, remainder, BOOL____00014) :: defines_var(BOOL____00014);
constraint int_eq_reif(INT____00018, remainder, BOOL____00019) :: defines_var(BOOL____00019);
constraint int_eq_reif(INT____00023, remainder, BOOL____00024) :: defines_var(BOOL____00024);
constraint int_eq_reif(quotient, INT____00001, BOOL____00002);
constraint int_eq_reif(quotient, INT____00007, BOOL____00002);
constraint int_eq_reif(quotient, INT____00012, BOOL____00002);
constraint int_eq_reif(quotient, INT____00017, BOOL____00002);
constraint int_eq_reif(quotient, INT____00022, BOOL____00002);
constraint int_lin_eq([-1, 1, 1, 1, 1, 1], [INT____00027, INT____00006, INT____00011, INT____00016, INT____00021, INT____00026], 0) :: defines_var(INT____00027);
constraint int_mod(x[1], INT____00001, INT____00003) :: defines_var(INT____00003);
constraint int_mod(x[2], INT____00007, INT____00008) :: defines_var(INT____00008);
constraint int_mod(x[3], INT____00012, INT____00013) :: defines_var(INT____00013);
constraint int_mod(x[4], INT____00017, INT____00018) :: defines_var(INT____00018);
constraint int_mod(x[5], INT____00022, INT____00023) :: defines_var(INT____00023);
constraint int_ne_reif(quotient, 0, BOOL____00002) :: defines_var(BOOL____00002);
solve satisfy;