forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arith_or.fzn
39 lines (39 loc) · 2.12 KB
/
arith_or.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
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;
array [1..5] of var 0..1: x :: output_array([1..5]);
array [1..5] of var 0..1: y :: output_array([1..5]);
var 0..0: z :: output_var = 0;
constraint array_bool_or([BOOL____00001, BOOL____00002], true);
constraint array_bool_or([BOOL____00003, BOOL____00004], true);
constraint array_bool_or([BOOL____00005, BOOL____00006], true);
constraint array_bool_or([BOOL____00007, BOOL____00008], true);
constraint array_bool_or([BOOL____00009, BOOL____00010], true);
constraint int_eq(0, x[1]);
constraint int_eq(0, x[3]);
constraint int_eq(0, x[4]);
constraint int_eq(0, y[1]);
constraint int_eq(0, y[2]);
constraint int_eq(0, y[3]);
constraint int_eq(0, y[5]);
constraint int_eq(1, x[2]);
constraint int_eq(1, x[5]);
constraint int_eq(1, y[4]);
constraint int_eq_reif(x[1], z, BOOL____00001) :: defines_var(BOOL____00001);
constraint int_eq_reif(x[2], z, BOOL____00003) :: defines_var(BOOL____00003);
constraint int_eq_reif(x[3], z, BOOL____00005) :: defines_var(BOOL____00005);
constraint int_eq_reif(x[4], z, BOOL____00007) :: defines_var(BOOL____00007);
constraint int_eq_reif(x[5], z, BOOL____00009) :: defines_var(BOOL____00009);
constraint int_eq_reif(y[1], z, BOOL____00002) :: defines_var(BOOL____00002);
constraint int_eq_reif(y[2], z, BOOL____00004) :: defines_var(BOOL____00004);
constraint int_eq_reif(y[3], z, BOOL____00006) :: defines_var(BOOL____00006);
constraint int_eq_reif(y[4], z, BOOL____00008) :: defines_var(BOOL____00008);
constraint int_eq_reif(y[5], z, BOOL____00010) :: defines_var(BOOL____00010);
solve satisfy;