-
Notifications
You must be signed in to change notification settings - Fork 5
/
jobshop.fzn
95 lines (95 loc) · 7.95 KB
/
jobshop.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
array [1..2] of int: X_INTRODUCED_22_ = [1,-1];
var 0..38: X_INTRODUCED_0_;
var 0..38: X_INTRODUCED_1_;
var 0..38: X_INTRODUCED_2_;
var 0..38: X_INTRODUCED_3_;
var 0..38: X_INTRODUCED_4_;
var 0..38: X_INTRODUCED_5_;
var 0..38: X_INTRODUCED_6_;
var 0..38: X_INTRODUCED_7_;
var 0..38: X_INTRODUCED_8_;
var 0..38: X_INTRODUCED_9_;
var 0..38: X_INTRODUCED_10_;
var 0..38: X_INTRODUCED_11_;
var 2..40: X_INTRODUCED_14_ ::var_is_introduced :: is_defined_var;
var 4..42: X_INTRODUCED_15_ ::var_is_introduced :: is_defined_var;
var 4..42: X_INTRODUCED_19_ ::var_is_introduced :: is_defined_var;
var 4..42: X_INTRODUCED_23_ ::var_is_introduced :: is_defined_var;
var 4..38: X_INTRODUCED_24_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_35_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_36_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_37_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_38_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_39_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_40_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_41_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_42_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_43_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_44_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_45_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_46_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_47_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_48_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_49_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_50_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_51_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_52_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_53_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_54_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_55_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_56_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_57_ ::var_is_introduced :: is_defined_var;
var bool: X_INTRODUCED_58_ ::var_is_introduced :: is_defined_var;
array [1..12] of var int: s:: output_array([1..3,1..4]) = [X_INTRODUCED_0_,X_INTRODUCED_1_,X_INTRODUCED_2_,X_INTRODUCED_3_,X_INTRODUCED_4_,X_INTRODUCED_5_,X_INTRODUCED_6_,X_INTRODUCED_7_,X_INTRODUCED_8_,X_INTRODUCED_9_,X_INTRODUCED_10_,X_INTRODUCED_11_];
array [1..12] of var int: X_INTRODUCED_59_ ::var_is_introduced = [X_INTRODUCED_0_,X_INTRODUCED_1_,X_INTRODUCED_2_,X_INTRODUCED_3_,X_INTRODUCED_4_,X_INTRODUCED_5_,X_INTRODUCED_6_,X_INTRODUCED_7_,X_INTRODUCED_8_,X_INTRODUCED_9_,X_INTRODUCED_10_,X_INTRODUCED_11_];
constraint int_lin_eq(X_INTRODUCED_22_,[X_INTRODUCED_19_,X_INTRODUCED_3_],4):: defines_var(X_INTRODUCED_19_);
constraint int_max(X_INTRODUCED_14_,X_INTRODUCED_19_,X_INTRODUCED_23_):: defines_var(X_INTRODUCED_23_);
constraint int_max(X_INTRODUCED_15_,X_INTRODUCED_23_,X_INTRODUCED_24_):: defines_var(X_INTRODUCED_24_);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_0_,X_INTRODUCED_1_],-3);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_1_,X_INTRODUCED_2_],-3);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_2_,X_INTRODUCED_3_],-4);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_4_,X_INTRODUCED_5_],-4);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_5_,X_INTRODUCED_6_],-3);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_6_,X_INTRODUCED_7_],-2);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_8_,X_INTRODUCED_9_],-3);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_9_,X_INTRODUCED_10_],-3);
constraint int_lin_le(X_INTRODUCED_22_,[X_INTRODUCED_10_,X_INTRODUCED_11_],-3);
constraint array_bool_or([X_INTRODUCED_35_,X_INTRODUCED_36_],true);
constraint array_bool_or([X_INTRODUCED_37_,X_INTRODUCED_38_],true);
constraint array_bool_or([X_INTRODUCED_39_,X_INTRODUCED_40_],true);
constraint array_bool_or([X_INTRODUCED_41_,X_INTRODUCED_42_],true);
constraint array_bool_or([X_INTRODUCED_43_,X_INTRODUCED_44_],true);
constraint array_bool_or([X_INTRODUCED_45_,X_INTRODUCED_46_],true);
constraint array_bool_or([X_INTRODUCED_47_,X_INTRODUCED_48_],true);
constraint array_bool_or([X_INTRODUCED_49_,X_INTRODUCED_50_],true);
constraint array_bool_or([X_INTRODUCED_51_,X_INTRODUCED_52_],true);
constraint array_bool_or([X_INTRODUCED_53_,X_INTRODUCED_54_],true);
constraint array_bool_or([X_INTRODUCED_55_,X_INTRODUCED_56_],true);
constraint array_bool_or([X_INTRODUCED_57_,X_INTRODUCED_58_],true);
constraint int_lin_eq([1,-1],[X_INTRODUCED_7_,X_INTRODUCED_14_],-2):: defines_var(X_INTRODUCED_14_);
constraint int_lin_eq([1,-1],[X_INTRODUCED_11_,X_INTRODUCED_15_],-4):: defines_var(X_INTRODUCED_15_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_4_,X_INTRODUCED_0_],-4,X_INTRODUCED_35_):: defines_var(X_INTRODUCED_35_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_0_,X_INTRODUCED_4_],-3,X_INTRODUCED_36_):: defines_var(X_INTRODUCED_36_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_6_,X_INTRODUCED_1_],-2,X_INTRODUCED_37_):: defines_var(X_INTRODUCED_37_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_1_,X_INTRODUCED_6_],-3,X_INTRODUCED_38_):: defines_var(X_INTRODUCED_38_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_5_,X_INTRODUCED_2_],-3,X_INTRODUCED_39_):: defines_var(X_INTRODUCED_39_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_2_,X_INTRODUCED_5_],-4,X_INTRODUCED_40_):: defines_var(X_INTRODUCED_40_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_7_,X_INTRODUCED_3_],-2,X_INTRODUCED_41_):: defines_var(X_INTRODUCED_41_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_3_,X_INTRODUCED_7_],-4,X_INTRODUCED_42_):: defines_var(X_INTRODUCED_42_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_10_,X_INTRODUCED_0_],-3,X_INTRODUCED_43_):: defines_var(X_INTRODUCED_43_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_0_,X_INTRODUCED_10_],-3,X_INTRODUCED_44_):: defines_var(X_INTRODUCED_44_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_9_,X_INTRODUCED_1_],-3,X_INTRODUCED_45_):: defines_var(X_INTRODUCED_45_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_1_,X_INTRODUCED_9_],-3,X_INTRODUCED_46_):: defines_var(X_INTRODUCED_46_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_11_,X_INTRODUCED_2_],-4,X_INTRODUCED_47_):: defines_var(X_INTRODUCED_47_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_2_,X_INTRODUCED_11_],-4,X_INTRODUCED_48_):: defines_var(X_INTRODUCED_48_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_8_,X_INTRODUCED_3_],-3,X_INTRODUCED_49_):: defines_var(X_INTRODUCED_49_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_3_,X_INTRODUCED_8_],-4,X_INTRODUCED_50_):: defines_var(X_INTRODUCED_50_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_10_,X_INTRODUCED_4_],-3,X_INTRODUCED_51_):: defines_var(X_INTRODUCED_51_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_4_,X_INTRODUCED_10_],-4,X_INTRODUCED_52_):: defines_var(X_INTRODUCED_52_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_11_,X_INTRODUCED_5_],-4,X_INTRODUCED_53_):: defines_var(X_INTRODUCED_53_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_5_,X_INTRODUCED_11_],-3,X_INTRODUCED_54_):: defines_var(X_INTRODUCED_54_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_9_,X_INTRODUCED_6_],-3,X_INTRODUCED_55_):: defines_var(X_INTRODUCED_55_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_6_,X_INTRODUCED_9_],-2,X_INTRODUCED_56_):: defines_var(X_INTRODUCED_56_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_8_,X_INTRODUCED_7_],-3,X_INTRODUCED_57_):: defines_var(X_INTRODUCED_57_);
constraint int_lin_le_reif(X_INTRODUCED_22_,[X_INTRODUCED_7_,X_INTRODUCED_8_],-2,X_INTRODUCED_58_):: defines_var(X_INTRODUCED_58_);
solve :: int_search(X_INTRODUCED_59_,input_order,indomain_min,complete) minimize X_INTRODUCED_24_;