From b80ce77686f9e05051e7c97eb6e1e83aa8641833 Mon Sep 17 00:00:00 2001 From: Michael Marte Date: Mon, 12 Sep 2016 11:53:01 +0200 Subject: [PATCH 1/2] Added missing problems and instances from the MiniZinc challenges 2012 to 2015 --- ghoulomb/3-11-29.dzn | 3 ++ ghoulomb/5-7-22.dzn | 3 ++ league/model20-5-4.dzn | 11 ++++ league/model30-8-4.dzn | 15 ++++++ league/model40-5-11.dzn | 13 +++++ league/model55-13-15.dzn | 22 ++++++++ nmseq/143.dzn | 1 + nmseq/202.dzn | 1 + nmseq/395.dzn | 1 + nmseq/478.dzn | 1 + nmseq/99.dzn | 1 + nonogram/dom_06.dzn | 31 +++++++++++ nonogram/dom_08.dzn | 39 ++++++++++++++ nonogram/dom_10.dzn | 47 +++++++++++++++++ nonogram/dom_12.dzn | 55 +++++++++++++++++++ nonogram/dom_14.dzn | 63 ++++++++++++++++++++++ radiation/i6-7.dzn | 14 +++++ radiation/i7-15.dzn | 15 ++++++ radiation/i8-7.dzn | 16 ++++++ radiation/i9-23.dzn | 17 ++++++ radiation/m06_15_15.dzn | 10 ++++ radiation/m07_07_20.dzn | 11 ++++ radiation/m12_10_20.dzn | 16 ++++++ radiation/m18_12_05.dzn | 22 ++++++++ radiation/m40_10_02.dzn | 44 ++++++++++++++++ rcpsp/11.dzn | 38 ++++++++++++++ rcpsp/12.dzn | 26 +++++++++ rcpsp/13.dzn | 24 +++++++++ rcpsp/14.dzn | 59 +++++++++++++++++++++ rcpsp/15.dzn | 111 +++++++++++++++++++++++++++++++++++++++ 30 files changed, 730 insertions(+) create mode 100644 ghoulomb/3-11-29.dzn create mode 100644 ghoulomb/5-7-22.dzn create mode 100644 league/model20-5-4.dzn create mode 100644 league/model30-8-4.dzn create mode 100644 league/model40-5-11.dzn create mode 100644 league/model55-13-15.dzn create mode 100644 nmseq/143.dzn create mode 100644 nmseq/202.dzn create mode 100644 nmseq/395.dzn create mode 100644 nmseq/478.dzn create mode 100644 nmseq/99.dzn create mode 100644 nonogram/dom_06.dzn create mode 100644 nonogram/dom_08.dzn create mode 100644 nonogram/dom_10.dzn create mode 100644 nonogram/dom_12.dzn create mode 100644 nonogram/dom_14.dzn create mode 100644 radiation/i6-7.dzn create mode 100644 radiation/i7-15.dzn create mode 100644 radiation/i8-7.dzn create mode 100644 radiation/i9-23.dzn create mode 100644 radiation/m06_15_15.dzn create mode 100644 radiation/m07_07_20.dzn create mode 100644 radiation/m12_10_20.dzn create mode 100644 radiation/m18_12_05.dzn create mode 100644 radiation/m40_10_02.dzn create mode 100644 rcpsp/11.dzn create mode 100644 rcpsp/12.dzn create mode 100644 rcpsp/13.dzn create mode 100644 rcpsp/14.dzn create mode 100644 rcpsp/15.dzn diff --git a/ghoulomb/3-11-29.dzn b/ghoulomb/3-11-29.dzn new file mode 100644 index 00000000..378cba2d --- /dev/null +++ b/ghoulomb/3-11-29.dzn @@ -0,0 +1,3 @@ +m1 = 3; +m2 = 11; +m3 = 29; diff --git a/ghoulomb/5-7-22.dzn b/ghoulomb/5-7-22.dzn new file mode 100644 index 00000000..a591af2e --- /dev/null +++ b/ghoulomb/5-7-22.dzn @@ -0,0 +1,3 @@ +m1 = 5; +m2 = 7; +m3 = 22; diff --git a/league/model20-5-4.dzn b/league/model20-5-4.dzn new file mode 100644 index 00000000..126de129 --- /dev/null +++ b/league/model20-5-4.dzn @@ -0,0 +1,11 @@ +n_persons_in_group = 3; +n = 20; +ranking = [ 1, 1, 1, 1 +, 2 +, 3, 3, 3, 3, 3, 3 +, 4 +, 5, 5, 5, 5, 5, 5, 5, 5 +]; +country = [ 1, 1, 1, 2, 4, 1, 3, 4, 1, 4 +, 1, 4, 1, 4, 1, 1, 4, 1, 1, 4 +]; diff --git a/league/model30-8-4.dzn b/league/model30-8-4.dzn new file mode 100644 index 00000000..d8bea280 --- /dev/null +++ b/league/model30-8-4.dzn @@ -0,0 +1,15 @@ +n_persons_in_group = 4; +n = 30; +ranking = [ 1, 1, 1, 1, 1, 1, 1, 1, 1 +, 2, 2, 2, 2, 2 +, 3 +, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +, 5, 5 +, 6 +, 7 +, 8 +]; +country = [ 3, 3, 4, 3, 3, 3, 3, 3, 2, 1 +, 1, 1, 3, 4, 1, 4, 3, 1, 1, 3 +, 3, 3, 4, 1, 4, 2, 4, 3, 1, 1 +]; diff --git a/league/model40-5-11.dzn b/league/model40-5-11.dzn new file mode 100644 index 00000000..f6d38982 --- /dev/null +++ b/league/model40-5-11.dzn @@ -0,0 +1,13 @@ +n_persons_in_group = 4; +n = 40; +ranking = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 +, 4, 4 +, 5 +]; +country = [ 3, 8, 8, 3, 2, 2, 2, 2, 8, 8 +, 1, 2, 3, 4, 10, 8, 1, 11, 6, 5 +, 7, 8, 8, 8, 1, 8, 3, 1, 3, 2 +, 3, 8, 9, 8, 3, 8, 1, 2, 8, 1 +]; diff --git a/league/model55-13-15.dzn b/league/model55-13-15.dzn new file mode 100644 index 00000000..56e6e3b5 --- /dev/null +++ b/league/model55-13-15.dzn @@ -0,0 +1,22 @@ +n_persons_in_group = 3; +n = 55; +ranking = [ 1 +, 2 +, 3 +, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +, 5 +, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 +, 7 +, 8 +, 9 +, 10 +, 11 +, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 +, 13 +]; +country = [ 1, 7, 11, 1, 10, 8, 2, 1, 13, 1 +, 4, 6, 14, 5, 14, 3, 14, 14, 14, 10 +, 13, 14, 14, 1, 14, 15, 13, 14, 1, 10 +, 11, 12, 1, 11, 14, 11, 11, 13, 14, 3 +, 14, 10, 11, 13, 9, 14, 1, 11, 10, 1 +, 11, 11, 10, 14, 1]; diff --git a/nmseq/143.dzn b/nmseq/143.dzn new file mode 100644 index 00000000..8eb12af6 --- /dev/null +++ b/nmseq/143.dzn @@ -0,0 +1 @@ +n = 143; diff --git a/nmseq/202.dzn b/nmseq/202.dzn new file mode 100644 index 00000000..32fd6d9d --- /dev/null +++ b/nmseq/202.dzn @@ -0,0 +1 @@ +n = 202; diff --git a/nmseq/395.dzn b/nmseq/395.dzn new file mode 100644 index 00000000..7944bb07 --- /dev/null +++ b/nmseq/395.dzn @@ -0,0 +1 @@ +n = 395; diff --git a/nmseq/478.dzn b/nmseq/478.dzn new file mode 100644 index 00000000..6987add0 --- /dev/null +++ b/nmseq/478.dzn @@ -0,0 +1 @@ +n = 478; diff --git a/nmseq/99.dzn b/nmseq/99.dzn new file mode 100644 index 00000000..37ad08df --- /dev/null +++ b/nmseq/99.dzn @@ -0,0 +1 @@ +n = 99; diff --git a/nonogram/dom_06.dzn b/nonogram/dom_06.dzn new file mode 100644 index 00000000..b838d4ef --- /dev/null +++ b/nonogram/dom_06.dzn @@ -0,0 +1,31 @@ +X = 13; +Y = 13; +maxlen = 5; +rows = [|1, 1, 1, -1, -1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |]; +cols = [|1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, -1, -1 + |]; diff --git a/nonogram/dom_08.dzn b/nonogram/dom_08.dzn new file mode 100644 index 00000000..c7627ac7 --- /dev/null +++ b/nonogram/dom_08.dzn @@ -0,0 +1,39 @@ +X = 17; +Y = 17; +maxlen = 5; +rows = [|1, 1, 1, -1, -1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |]; +cols = [|1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, -1, -1 + |]; diff --git a/nonogram/dom_10.dzn b/nonogram/dom_10.dzn new file mode 100644 index 00000000..f8e5a70b --- /dev/null +++ b/nonogram/dom_10.dzn @@ -0,0 +1,47 @@ +X = 21; +Y = 21; +maxlen = 5; +rows = [|1, 1, 1, -1, -1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |]; +cols = [|1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, -1, -1 + |]; diff --git a/nonogram/dom_12.dzn b/nonogram/dom_12.dzn new file mode 100644 index 00000000..6f3ee0d9 --- /dev/null +++ b/nonogram/dom_12.dzn @@ -0,0 +1,55 @@ +X = 25; +Y = 25; +maxlen = 5; +rows = [|1, 1, 1, -1, -1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |]; +cols = [|1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, -1, -1 + |]; diff --git a/nonogram/dom_14.dzn b/nonogram/dom_14.dzn new file mode 100644 index 00000000..43ab985b --- /dev/null +++ b/nonogram/dom_14.dzn @@ -0,0 +1,63 @@ +X = 29; +Y = 29; +maxlen = 5; +rows = [|1, 1, 1, -1, -1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, 0, 1 + |1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |]; +cols = [|1, -1, -1, -1, -1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 0, 1, 1, 1 + |1, -1, -1, -1, -1 + |1, 1, 1, -1, -1 + |]; diff --git a/radiation/i6-7.dzn b/radiation/i6-7.dzn new file mode 100644 index 00000000..3274c516 --- /dev/null +++ b/radiation/i6-7.dzn @@ -0,0 +1,14 @@ + +m = 6; % rows +n = 6; % columns + +% max intensity = 7 +Intensity = [| +7, 0, 1, 2, 7, 4 | +6, 1, 7, 6, 4, 3 | +6, 0, 0, 1, 4, 6 | +7, 2, 6, 6, 0, 5 | +7, 1, 2, 1, 7, 2 | +5, 1, 7, 0, 6, 1 +|]; + diff --git a/radiation/i7-15.dzn b/radiation/i7-15.dzn new file mode 100644 index 00000000..10825b30 --- /dev/null +++ b/radiation/i7-15.dzn @@ -0,0 +1,15 @@ + +m = 7; % rows +n = 7; % columns + +% max intensity = 15 +Intensity = [| + 9, 13, 14, 1, 3, 13, 9 | +14, 9, 3, 7, 3, 4, 5 | + 0, 3, 4, 5, 3, 10, 13 | + 2, 5, 12, 12, 10, 4, 14 | + 2, 8, 5, 11, 6, 13, 2 | +14, 2, 3, 14, 7, 7, 2 | + 2, 7, 1, 3, 9, 14, 9 +|]; + diff --git a/radiation/i8-7.dzn b/radiation/i8-7.dzn new file mode 100644 index 00000000..f948403f --- /dev/null +++ b/radiation/i8-7.dzn @@ -0,0 +1,16 @@ + +m = 8; % rows +n = 8; % columns + +% max intensity = 7 +Intensity = [| +5, 7, 3, 1, 1, 0, 5, 2 | +0, 1, 1, 6, 4, 1, 4, 0 | +5, 4, 0, 6, 0, 2, 5, 2 | +3, 4, 6, 1, 0, 2, 4, 4 | +4, 0, 6, 6, 4, 6, 5, 6 | +0, 4, 4, 2, 2, 7, 4, 7 | +1, 6, 3, 3, 7, 5, 3, 3 | +2, 5, 4, 4, 2, 6, 0, 7 +|]; + diff --git a/radiation/i9-23.dzn b/radiation/i9-23.dzn new file mode 100644 index 00000000..4da5640b --- /dev/null +++ b/radiation/i9-23.dzn @@ -0,0 +1,17 @@ + +m = 9; % rows +n = 9; % columns + +% max intensity = 23 +Intensity = [| + 9, 22, 15, 23, 12, 16, 15, 15, 2 | + 9, 2, 9, 1, 1, 23, 17, 14, 15 | + 5, 9, 8, 15, 16, 7, 9, 18, 0 | + 1, 19, 9, 8, 1, 21, 1, 10, 13 | +13, 14, 1, 5, 15, 12, 17, 9, 22 | +10, 23, 18, 4, 15, 3, 3, 6, 22 | +13, 18, 3, 4, 6, 14, 8, 18, 13 | + 9, 16, 16, 21, 20, 14, 16, 8, 4 | + 5, 19, 0, 16, 20, 15, 8, 2, 9 +|]; + diff --git a/radiation/m06_15_15.dzn b/radiation/m06_15_15.dzn new file mode 100644 index 00000000..96e2bad4 --- /dev/null +++ b/radiation/m06_15_15.dzn @@ -0,0 +1,10 @@ +m = 6; % rows +n = 6; % columns + +Intensity = [| + 13, 10, 7, 12, 8, 3 | + 9, 14, 14, 10, 15, 14 | + 6, 0, 6, 4, 6, 8 | + 5, 2, 11, 14, 11, 1 | + 1, 0, 1, 2, 0, 1 | + 1, 14, 11, 8, 10, 3 |]; diff --git a/radiation/m07_07_20.dzn b/radiation/m07_07_20.dzn new file mode 100644 index 00000000..c5aa027c --- /dev/null +++ b/radiation/m07_07_20.dzn @@ -0,0 +1,11 @@ +m = 7; % rows +n = 7; % columns + +Intensity = [| + 1, 1, 1, 3, 6, 1, 7 | + 3, 6, 2, 5, 6, 0, 6 | + 1, 4, 6, 1, 6, 5, 0 | + 6, 7, 2, 7, 2, 0, 3 | + 2, 1, 6, 3, 2, 0, 6 | + 0, 1, 5, 3, 0, 0, 0 | + 6, 0, 6, 0, 4, 5, 1 |]; diff --git a/radiation/m12_10_20.dzn b/radiation/m12_10_20.dzn new file mode 100644 index 00000000..e6959c14 --- /dev/null +++ b/radiation/m12_10_20.dzn @@ -0,0 +1,16 @@ +m = 12; % rows +n = 12; % columns + +Intensity = [| + 7, 9, 2, 2, 5, 4, 0, 0, 0, 4, 6, 7 | + 5, 10, 2, 1, 10, 6, 7, 10, 4, 1, 1, 4 | +10, 0, 10, 3, 5, 5, 5, 2, 10, 5, 9, 10 | + 0, 7, 3, 2, 8, 7, 8, 5, 8, 1, 10, 4 | + 4, 0, 5, 10, 7, 7, 4, 3, 0, 10, 0, 3 | +10, 4, 8, 10, 9, 1, 8, 6, 6, 7, 5, 0 | + 8, 2, 3, 7, 9, 3, 7, 8, 0, 2, 5, 9 | + 3, 10, 8, 7, 5, 10, 10, 10, 2, 8, 8, 8 | + 9, 9, 7, 2, 5, 8, 10, 5, 8, 9, 5, 7 | + 2, 3, 8, 3, 8, 8, 0, 2, 1, 1, 7, 3 | + 4, 9, 9, 5, 1, 4, 1, 0, 2, 7, 8, 4 | + 5, 4, 6, 2, 4, 4, 10, 8, 1, 3, 10, 9 |]; diff --git a/radiation/m18_12_05.dzn b/radiation/m18_12_05.dzn new file mode 100644 index 00000000..dfbf5d61 --- /dev/null +++ b/radiation/m18_12_05.dzn @@ -0,0 +1,22 @@ +m = 18; % rows +n = 18; % columns + +Intensity = [| + 9, 0, 3, 3, 3, 8, 0, 6, 10, 8, 9, 2, 11, 6, 11, 6, 8, 3 | +11, 11, 1, 4, 9, 12, 4, 12, 12, 5, 8, 12, 6, 2, 7, 4, 9, 12 | + 8, 0, 10, 0, 8, 7, 4, 4, 10, 12, 9, 1, 12, 6, 4, 12, 7, 0 | +12, 6, 4, 0, 9, 10, 6, 6, 6, 5, 2, 9, 2, 1, 0, 6, 11, 9 | + 6, 1, 0, 12, 9, 0, 2, 1, 8, 6, 9, 3, 6, 3, 3, 3, 6, 7 | + 0, 0, 8, 3, 7, 12, 10, 12, 1, 9, 7, 3, 7, 3, 2, 10, 4, 10 | + 8, 12, 11, 3, 3, 5, 8, 8, 6, 8, 7, 1, 9, 8, 11, 6, 8, 5 | +12, 8, 6, 3, 12, 4, 3, 4, 10, 0, 5, 9, 1, 6, 7, 3, 0, 7 | + 6, 10, 6, 1, 3, 7, 12, 6, 7, 12, 3, 10, 11, 8, 2, 8, 12, 8 | + 4, 6, 1, 2, 0, 1, 1, 7, 2, 3, 4, 5, 2, 2, 11, 4, 8, 6 | + 6, 12, 6, 8, 9, 11, 5, 1, 1, 11, 8, 7, 12, 11, 12, 4, 3, 5 | + 0, 8, 8, 5, 3, 4, 1, 10, 7, 0, 5, 1, 0, 9, 3, 11, 7, 5 | +10, 9, 0, 1, 11, 11, 7, 5, 7, 4, 5, 7, 3, 5, 10, 6, 9, 7 | + 3, 6, 1, 4, 5, 7, 2, 4, 2, 8, 8, 10, 0, 11, 1, 3, 11, 4 | + 3, 9, 11, 1, 6, 2, 12, 0, 7, 12, 1, 2, 0, 7, 0, 4, 2, 6 | + 9, 5, 4, 11, 6, 1, 2, 7, 10, 4, 6, 6, 9, 7, 8, 8, 12, 1 | +10, 7, 8, 9, 12, 12, 6, 4, 12, 4, 6, 12, 4, 2, 5, 11, 11, 7 | + 4, 5, 6, 9, 12, 3, 6, 8, 12, 0, 12, 1, 5, 10, 12, 9, 11, 5 |]; diff --git a/radiation/m40_10_02.dzn b/radiation/m40_10_02.dzn new file mode 100644 index 00000000..542ef565 --- /dev/null +++ b/radiation/m40_10_02.dzn @@ -0,0 +1,44 @@ +m = 40; % rows +n = 40; % columns + +Intensity = [| + 5, 0, 7, 8, 0, 7, 0, 5, 10, 7, 6, 10, 9, 2, 2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2 | + 4, 0, 2, 6, 9, 5, 7, 10, 6, 10, 1, 10, 5, 7, 5, 1, 7, 0, 6, 9, 10, 8, 8, 6, 2, 0, 3, 3, 8, 8, 6, 9, 1, 7, 8, 7, 1, 3, 3, 5 | + 2, 1, 2, 9, 9, 6, 10, 3, 8, 9, 2, 10, 8, 6, 7, 5, 1, 2, 4, 4, 5, 3, 9, 3, 5, 9, 5, 8, 0, 1, 10, 1, 4, 10, 1, 3, 8, 0, 6, 4 | + 9, 0, 10, 5, 0, 2, 0, 7, 1, 10, 10, 0, 4, 8, 1, 5, 4, 6, 4, 5, 1, 2, 3, 8, 8, 6, 8, 7, 10, 2, 2, 0, 9, 9, 5, 0, 1, 1, 3, 6 | + 8, 10, 9, 8, 7, 8, 5, 8, 9, 4, 8, 7, 0, 1, 2, 1, 10, 10, 9, 9, 9, 5, 6, 2, 5, 4, 5, 3, 4, 4, 7, 3, 1, 0, 0, 3, 1, 8, 0, 5 | + 9, 9, 3, 1, 3, 2, 4, 6, 4, 0, 0, 10, 3, 6, 2, 2, 8, 2, 4, 10, 2, 10, 1, 3, 10, 1, 0, 9, 8, 7, 5, 10, 3, 5, 10, 0, 9, 10, 3, 10 | + 0, 5, 0, 9, 8, 9, 0, 8, 0, 0, 2, 6, 1, 1, 10, 10, 6, 2, 6, 10, 10, 0, 3, 2, 1, 7, 8, 0, 2, 10, 8, 2, 3, 6, 10, 10, 5, 5, 8, 9 |]; diff --git a/rcpsp/11.dzn b/rcpsp/11.dzn new file mode 100644 index 00000000..d49cedf6 --- /dev/null +++ b/rcpsp/11.dzn @@ -0,0 +1,38 @@ +n_res = 4; +rc = [ 15, 17, 17, 14 ]; +n_tasks = 30; +d = [ 6, 6, 9, 6, 5, 1, 9, 7, 3, 9, 3, 3, 3, 7, 3, 6, 1, 4, 9, 8, 7, 3, 1, 1, 7, 3, 2, 8, 10, 7 ]; +rr = [| 1, 1, 8, 1, 3, 10, 5, 5, 10, 2, 10, 5, 2, 5, 6, 8, 9, 2, 9, 5, 8, 3, 5, 2, 2, 8, 9, 6, 2, 10 + | 8, 1, 8, 7, 8, 5, 1, 1, 5, 7, 8, 8, 3, 5, 2, 7, 9, 8, 2, 9, 7, 8, 10, 3, 10, 2, 10, 4, 8, 4 + | 10, 5, 8, 7, 5, 2, 9, 9, 1, 7, 4, 7, 9, 6, 1, 4, 6, 6, 6, 10, 1, 4, 6, 6, 7, 3, 2, 1, 5, 2 + | 9, 4, 3, 7, 2, 10, 9, 4, 2, 6, 3, 1, 9, 7, 3, 2, 10, 6, 5, 6, 3, 10, 1, 7, 6, 9, 1, 8, 2, 7 |]; +suc = [ { 4, 7, 8 }, + { 5, 10, 18 }, + { 17, 23, 30 }, + { 6, 17, 30 }, + { 9 }, + { 18 }, + { 12, 19, 28 }, + { 12, 13, 15 }, + { 11, 22 }, + { 17, 23, 24 }, + { 12, 13, 14 }, + { 16, 24 }, + { 29 }, + { 20, 25, 26 }, + { 18, 25 }, + { 21, 23, 26 }, + { 28 }, + { 21 }, + { 21, 22 }, + { 24 }, + { 27 }, + { 26 }, + { 27 }, + { 27 }, + { 28, 29 }, + { 30 }, + { 29 }, + { }, + { }, + { } ]; diff --git a/rcpsp/12.dzn b/rcpsp/12.dzn new file mode 100644 index 00000000..b510dd55 --- /dev/null +++ b/rcpsp/12.dzn @@ -0,0 +1,26 @@ +n_res = 3; +rc = [ 5, 9, 7 ]; +n_tasks = 19; +d = [ 4, 2, 2, 4, 3, 1, 3, 3, 6, 3, 4, 5, 3, 3, 6, 5, 2, 6, 2 ]; +rr = [| 5, 1, 3, 2, 1, 2, 2, 3, 3, 5, 1, 2, 1, 4, 4, 4, 3, 2, 3 + | 1, 2, 3, 3, 2, 1, 1, 3, 2, 2, 1, 2, 1, 3, 2, 3, 1, 3, 1 + | 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2 |]; +suc = [ { 9 }, + { 6 }, + { }, + { }, + { 15 }, + { 13 }, + { }, + { }, + { 15 }, + { }, + { }, + { 16 }, + { }, + { }, + { }, + { }, + { }, + { }, + { } ]; diff --git a/rcpsp/13.dzn b/rcpsp/13.dzn new file mode 100644 index 00000000..627473ec --- /dev/null +++ b/rcpsp/13.dzn @@ -0,0 +1,24 @@ +n_res = 2; +rc = [ 7, 9 ]; +n_tasks = 18; +d = [ 13, 12, 19, 19, 14, 5, 10, 8, 15, 10, 16, 11, 17, 5, 11, 17, 17, 15 ]; +rr = [| 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + | 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2 |]; +suc = [ { 12 }, + { 15 }, + { 8, 13, 14 }, + { 12 }, + { 17 }, + { 13 }, + { }, + { 9, 15 }, + { 10, 17 }, + { 16, 17 }, + { }, + { 16 }, + { }, + { }, + { }, + { }, + { }, + { } ]; diff --git a/rcpsp/14.dzn b/rcpsp/14.dzn new file mode 100644 index 00000000..15cee4b9 --- /dev/null +++ b/rcpsp/14.dzn @@ -0,0 +1,59 @@ +n_res = 6; +rc = [ 10, 10, 11, 10, 10, 10 ]; +n_tasks = 49; +d = [ 1, 9, 4, 3, 5, 1, 1, 5, 3, 1, 9, 6, 1, 6, 4, 1, 1, 8, 6, 7, 1, 5, 4, 8, 2, 3, 2, 9, 6, 1, 1, 9, 5, 5, 1, 1, 2, 1, 7, 1, 1, 5, 6, 1, 9, 2, 1, 4, 9 ]; +rr = [| 0, 3, 4, 9, 0, 6, 8, 0, 9, 4, 0, 9, 10, 0, 0, 0, 7, 9, 0, 0, 4, 7, 7, 0, 3, 3, 0, 0, 10, 0, 10, 0, 9, 5, 0, 5, 10, 0, 0, 0, 0, 0, 0, 0, 6, 0, 4, 0, 3 + | 0, 0, 10, 9, 0, 6, 8, 0, 0, 10, 0, 7, 0, 0, 0, 10, 4, 0, 5, 4, 4, 9, 0, 0, 0, 4, 0, 0, 0, 0, 0, 9, 0, 0, 10, 6, 0, 7, 10, 2, 4, 10, 2, 7, 5, 0, 0, 0, 10 + | 10, 5, 0, 7, 7, 0, 0, 0, 10, 2, 0, 10, 8, 6, 5, 7, 3, 0, 0, 0, 0, 10, 0, 0, 0, 2, 0, 8, 0, 10, 6, 0, 2, 3, 7, 5, 0, 0, 9, 0, 4, 7, 10, 9, 0, 0, 2, 7, 5 + | 3, 0, 5, 0, 10, 0, 0, 3, 0, 10, 10, 7, 0, 10, 10, 0, 0, 10, 4, 0, 10, 0, 0, 0, 5, 4, 0, 10, 0, 0, 5, 0, 0, 0, 0, 7, 0, 8, 7, 4, 0, 0, 5, 0, 9, 0, 0, 8, 10 + | 3, 0, 0, 3, 9, 10, 8, 6, 4, 6, 0, 0, 0, 0, 8, 0, 8, 4, 0, 9, 10, 7, 0, 0, 10, 0, 0, 2, 6, 0, 0, 0, 10, 7, 5, 7, 4, 2, 0, 6, 6, 0, 0, 6, 0, 10, 0, 0, 4 + | 6, 0, 9, 10, 9, 5, 0, 8, 0, 7, 10, 0, 8, 0, 2, 0, 0, 0, 7, 0, 3, 7, 0, 8, 0, 5, 2, 0, 5, 0, 0, 0, 6, 0, 4, 6, 0, 9, 2, 0, 0, 0, 4, 7, 7, 9, 0, 7, 10 |]; +suc = [ { 6 }, + { 4, 7 }, + { 5 }, + { 11 }, + { 10 }, + { 9 }, + { 8 }, + { 13 }, + { 14 }, + { 15 }, + { 12 }, + { 17 }, + { 16 }, + { 18 }, + { 19 }, + { 21, 22 }, + { 23 }, + { 20 }, + { }, + { 24 }, + { 26 }, + { 25 }, + { 27 }, + { 28 }, + { 31 }, + { 29, 30 }, + { }, + { 32, 34 }, + { 35 }, + { 33 }, + { }, + { 39 }, + { 37, 39 }, + { 36, 38 }, + { }, + { 40 }, + { 41 }, + { 43 }, + { 42, 43 }, + { 47 }, + { 44 }, + { 47 }, + { 45, 46 }, + { 48 }, + { 49 }, + { 49 }, + { 49 }, + { }, + { } ]; diff --git a/rcpsp/15.dzn b/rcpsp/15.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10, 8, 5, 2, 3, 3, 4, 7, 3, 6, 5, 1, 3, 8, 3, 7, 9, 6, 1, 6, 5, 3, 3, 2, 9, 2, 10, 5, 5, 1, 8, 9, 7, 5, 3, 10, 3, 8, 6, 7, 1, 4, 4, 2, 7, 9, 3, 5, 5, 1, 10, 8, 10, 4, 10, 1, 5, 10, 2, 4, 5, 8, 10, 2, 3, 8, 10, 10 |]; +suc = [ { 6 }, + { 4, 5 }, + { 7 }, + { 8, 9 }, + { 10, 11 }, + { }, + { }, + { 15 }, + { 12, 13 }, + { }, + { 14 }, + { 18 }, + { 16 }, + { 19 }, + { 17 }, + { 23 }, + { 20 }, + { }, + { 21, 22 }, + { 25 }, + { 26 }, + { }, + { 24, 27 }, + { 31 }, + { 29 }, + { 28, 30 }, + { }, + { 32, 34 }, + { 33, 35 }, + { }, + { }, + { 37 }, + { 36, 39 }, + { }, + { 38 }, + { 41 }, + { 43 }, + { 40 }, + { 42 }, + { 46 }, + { 45 }, + { }, + { 44, 47 }, + { 50 }, + { }, + { 48, 51 }, + { 49 }, + { 52 }, + { }, + { 54, 55 }, + { 53 }, + { 57 }, + { 59 }, + { 56, 58 }, + { }, + { 63 }, + { 60 }, + { 61, 62 }, + { }, + { 65, 66 }, + { 64 }, + { 67 }, + { }, + { 71 }, + { 70 }, + { }, + { 68, 69 }, + { 75 }, + { 72, 73, 74 }, + { }, + { }, + { 77, 78 }, + { 76 }, + { }, + { 79 }, + { 81, 82 }, + { }, + { 80 }, + { 83 }, + { 85 }, + { 84 }, + { 85 }, + { 86, 87 }, + { 88 }, + { 90 }, + { 89, 90 }, + { 91 }, + { 92, 94, 95 }, + { 94 }, + { 93 }, + { 95 }, + { 99 }, + { 98 }, + { 97, 99 }, + { 96 }, + { 100 }, + { 101 }, + { 101 }, + { 100 }, + { }, + { } ]; From 1891399031b8271725ebed8fd531412d82d1f935 Mon Sep 17 00:00:00 2001 From: Michael Marte Date: Wed, 14 Sep 2016 21:37:47 +0200 Subject: [PATCH 2/2] Added the league model from the MiniZinc challenge 2013 --- league/league_mznc2013.mzn | 146 +++++++++++++++++++++++++++++++++++++ league/model20-5-4.dzn | 2 +- league/model30-8-4.dzn | 2 +- league/model40-5-11.dzn | 2 +- league/model55-13-15.dzn | 2 +- 5 files changed, 150 insertions(+), 4 deletions(-) create mode 100644 league/league_mznc2013.mzn diff --git a/league/league_mznc2013.mzn b/league/league_mznc2013.mzn new file mode 100644 index 00000000..ebe0dbe1 --- /dev/null +++ b/league/league_mznc2013.mzn @@ -0,0 +1,146 @@ +% +% Make Leagues (group tournament) +% +% Make group tournament for some games. +% - Ranking should be close in each group. +% - In one group, variety of country (where player comes from) is needed. + +include "globals.mzn"; + +% +% Parameter: max persons in one group +% +int: n_persons_in_league; +int: n_persons_in_group = n_persons_in_league; + +% n_persons_in_group = 3; + +% +% Parameter: number of persons +% +int: n; + +% n = 15; + +% +% Parameter: ranking of persons +% +array [1..n] of int: ranking; + +% ranking = [ 1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6 ]; + +% +% Parameter: where does he/she come from +% +array [1..n] of int: country; + +% country = [ 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 3, 2, 1 ]; + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% How many groups in this model? +int: n_groups = (n + n_persons_in_group - 1) div n_persons_in_group; + +% How many people in each group +array [1..n_groups] of var 0..n_persons_in_group : n_persons; + +% Which group person is assigned to +array [1..n] of var 1..n_groups: assign_to; + +% Ranking in each groups +array [1..n_groups] of var min(ranking)..max(ranking): max_rank; +array [1..n_groups] of var min(ranking)..max(ranking): min_rank; +array [1..n_groups] of var 0..max(ranking): rank_diff; + +% Count of countries in group +% if group G contains country C, countries_in_group_tmp[G, C] = 1 +array[1..n_groups, 1..max(country)] of var 0..1: countries_in_group_tmp; +array[1..n_groups] of var 1..n_persons_in_group: countries_in_group; + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% +% apply n_persons_in_group +% +constraint + forall (i in 1..n_groups) ( + count(assign_to, i, n_persons[i]) + /\ (n_persons_in_group - 1) <= n_persons[i] + /\ n_persons[i] <= n_persons_in_group + ); + +% +% set rank_diff +% +constraint + forall (i in 1..n_groups) ( + rank_diff[i] = max_rank[i] - min_rank[i] + ); + +% +% min, max rank in group +% +constraint + forall (i in 1..n_groups) ( + max_rank[i] = max([ranking[j] * bool2int(assign_to[j] == i) + | j in 1..n]) + ); + +constraint + forall (i in 1..n_groups) ( + min_rank[i] = min([ranking[j] + 10000* bool2int(assign_to[j] != i) + | j in 1..n]) + ); + +% +% how many countries in group? +% +constraint + forall (i in 1..n_groups) ( + forall (j in 1..max(country)) ( + countries_in_group_tmp[i, j] + = bool2int(exists(p in 1..n) + (assign_to[p] = i /\ country[p] = j)) + ) + ); + +constraint + forall (i in 1..n_groups) ( + countries_in_group[i] + = sum([countries_in_group_tmp[i, j] | j in 1..max(country)]) + ); + +% +% sort result +% +constraint + forall (i in 1..n_groups - 1) ( + max_rank[i] <= max_rank[i + 1] + /\ min_rank[i] <= min_rank[i + 1] + ); + +var 1..100000 : objective = (100 * sum(rank_diff) - sum(countries_in_group)); + +solve + :: seq_search([ + int_search(assign_to, first_fail, indomain_max, complete), + int_search([objective], input_order, indomain_min, complete) + ]) + minimize objective; + +output [ + "max_rank = ", show(max_rank), ";\n", + "min_rank = ", show(min_rank), ";\n", + "countries_in_group = ", show(countries_in_group), ";\n", + "objective = ", show(objective), ";\n" +] ++ [ + show(assign_to[i]) ++ + ", person: " ++ show(i) ++ + ", ranking: " ++ show(ranking[i]) ++ + ", country: " ++ show(country[i]) ++ + "\n" +| i in 1..n]; + diff --git a/league/model20-5-4.dzn b/league/model20-5-4.dzn index 126de129..0245226d 100644 --- a/league/model20-5-4.dzn +++ b/league/model20-5-4.dzn @@ -1,4 +1,4 @@ -n_persons_in_group = 3; +n_persons_in_league = 3; n = 20; ranking = [ 1, 1, 1, 1 , 2 diff --git a/league/model30-8-4.dzn b/league/model30-8-4.dzn index d8bea280..3f73a0d3 100644 --- a/league/model30-8-4.dzn +++ b/league/model30-8-4.dzn @@ -1,4 +1,4 @@ -n_persons_in_group = 4; +n_persons_in_league = 4; n = 30; ranking = [ 1, 1, 1, 1, 1, 1, 1, 1, 1 , 2, 2, 2, 2, 2 diff --git a/league/model40-5-11.dzn b/league/model40-5-11.dzn index f6d38982..9a541e15 100644 --- a/league/model40-5-11.dzn +++ b/league/model40-5-11.dzn @@ -1,4 +1,4 @@ -n_persons_in_group = 4; +n_persons_in_league = 4; n = 40; ranking = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 , 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 diff --git a/league/model55-13-15.dzn b/league/model55-13-15.dzn index 56e6e3b5..a8944300 100644 --- a/league/model55-13-15.dzn +++ b/league/model55-13-15.dzn @@ -1,4 +1,4 @@ -n_persons_in_group = 3; +n_persons_in_league = 3; n = 55; ranking = [ 1 , 2