forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
among_interval.fzn
51 lines (51 loc) · 3.32 KB
/
among_interval.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
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____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____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____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____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 0..1: INT____00004 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00008 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00012 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00016 :: is_defined_var :: var_is_introduced;
var 0..1: INT____00020 :: is_defined_var :: var_is_introduced;
var 3..3: low :: output_var = 3;
var 0..5: nvar;
var 5..5: up :: output_var = 5;
array [1..5] of var 1..8: x :: output_array([1..5]);
constraint array_bool_and([BOOL____00001, BOOL____00002], BOOL____00003) :: defines_var(BOOL____00003);
constraint array_bool_and([BOOL____00005, BOOL____00006], BOOL____00007) :: defines_var(BOOL____00007);
constraint array_bool_and([BOOL____00009, BOOL____00010], BOOL____00011) :: defines_var(BOOL____00011);
constraint array_bool_and([BOOL____00013, BOOL____00014], BOOL____00015) :: defines_var(BOOL____00015);
constraint array_bool_and([BOOL____00017, BOOL____00018], BOOL____00019) :: defines_var(BOOL____00019);
constraint bool2int(BOOL____00003, INT____00004) :: defines_var(INT____00004);
constraint bool2int(BOOL____00007, INT____00008) :: defines_var(INT____00008);
constraint bool2int(BOOL____00011, INT____00012) :: defines_var(INT____00012);
constraint bool2int(BOOL____00015, INT____00016) :: defines_var(INT____00016);
constraint bool2int(BOOL____00019, INT____00020) :: defines_var(INT____00020);
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_le_reif(low, x[1], BOOL____00001) :: defines_var(BOOL____00001);
constraint int_le_reif(low, x[2], BOOL____00005) :: defines_var(BOOL____00005);
constraint int_le_reif(low, x[3], BOOL____00009) :: defines_var(BOOL____00009);
constraint int_le_reif(low, x[4], BOOL____00013) :: defines_var(BOOL____00013);
constraint int_le_reif(low, x[5], BOOL____00017) :: defines_var(BOOL____00017);
constraint int_le_reif(x[1], up, BOOL____00002) :: defines_var(BOOL____00002);
constraint int_le_reif(x[2], up, BOOL____00006) :: defines_var(BOOL____00006);
constraint int_le_reif(x[3], up, BOOL____00010) :: defines_var(BOOL____00010);
constraint int_le_reif(x[4], up, BOOL____00014) :: defines_var(BOOL____00014);
constraint int_le_reif(x[5], up, BOOL____00018) :: defines_var(BOOL____00018);
constraint int_lin_eq([-1, 1, 1, 1, 1, 1], [nvar, INT____00004, INT____00008, INT____00012, INT____00016, INT____00020], 0);
solve satisfy;