Add MiniZinc Challenge 2019 and 2020
This commit is contained in:
parent
b140dba4a1
commit
ec16157e9b
101
data/mznc2019/accap/accap.mzn
Normal file
101
data/mznc2019/accap/accap.mzn
Normal file
@ -0,0 +1,101 @@
|
||||
%------------------------------------------------------------------------------
|
||||
% Airport Check-in Counter Allocation Problem (ACCAP) with fixed opening/closing times
|
||||
%------------------------------------------------------------------------------
|
||||
%
|
||||
% Airports have certain number of check-in counters that can be used by any airlines(common-use
|
||||
% check-in counters) throughout the day. Airlines need to start and end the check-in operations
|
||||
% for their flights at given times before the departure time of the flights. Each flight has a
|
||||
% given time interval/duration (opDur) that they need to keep the check-in open, and this is
|
||||
% fixed for the whole duration of the check-in. Given the number of airlines, their flights
|
||||
% (FLIGHTS), starting time of each check-in (xCoor) ,required number of counters (cNum), and
|
||||
% duration of the check-in (opDur), the objective is to find such an allocation of flights
|
||||
% (check-ins) to counters (yCoor: starting counter ID ) to minimise the maximum used number of
|
||||
% counters throughout the day (D), as well as making sure that the flights of the same airlines
|
||||
% are clustered in the same check-in area by minimising the sum of the total distances (S)
|
||||
% between the counters of each pair of flights of the same airline (S).
|
||||
%
|
||||
%
|
||||
%------------------------------------------------------------------------------
|
||||
% Includes
|
||||
|
||||
include "diffn.mzn";
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Sets and indices
|
||||
|
||||
% set of flights
|
||||
int: flights;
|
||||
set of int: FLIGHT = 1..flights;
|
||||
|
||||
% time intervals
|
||||
int: times;
|
||||
set of int: TIME = 1..times;
|
||||
|
||||
% set of counter IDs
|
||||
set of int: COUNTER = 1..sum(cNum);
|
||||
|
||||
% set of airlines
|
||||
int: airlines;
|
||||
set of int: AIRLINE = 1..airlines;
|
||||
|
||||
% set of flights of airlines
|
||||
array[AIRLINE] of set of FLIGHT: FA;
|
||||
|
||||
% set of steart-end check-in times of flights
|
||||
array[FLIGHT] of set of TIME: ISet =
|
||||
[ {k| k in xCoor[f]..(opDur[f] + xCoor[f] - 1)} | f in FLIGHT];
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Variables and parameters
|
||||
|
||||
array[FLIGHT] of int: xCoor; %starting time
|
||||
array[FLIGHT] of var COUNTER: yCoor; %lower-bottom corner of the rectangle (counter) : variable
|
||||
array[FLIGHT] of int: opDur; %Length - opening Duration
|
||||
array[FLIGHT] of int: cNum; %Height - required numebr of counters
|
||||
var max(cNum)..((airlines + 1) * sum(cNum)): objective; %objective: variable
|
||||
|
||||
% Distance between two flights :variable
|
||||
array[AIRLINE] of var 0..sum(cNum): S;
|
||||
|
||||
% Domain of D(maximum counter use) :variable
|
||||
var max(cNum)..sum(cNum): D;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Constraints
|
||||
|
||||
% C1: Non-overlapping constraint
|
||||
constraint diffn(xCoor, yCoor, opDur, cNum);
|
||||
|
||||
% C2: Capacity constraint
|
||||
constraint forall(f in FLIGHT)( (yCoor[f] + cNum[f] - 1) <= D );
|
||||
|
||||
% C3: Distance constraint
|
||||
constraint forall(a in AIRLINE, f, g in FA[a] where f != g)(
|
||||
((yCoor[f] + cNum[f] - 1) - (yCoor[g]) <= S[a])
|
||||
);
|
||||
|
||||
% C4: Objective function
|
||||
constraint objective = sum(a in AIRLINE)(S[a]) + D;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Solve item
|
||||
|
||||
solve
|
||||
:: seq_search([
|
||||
int_search(yCoor, first_fail, indomain_min, complete),
|
||||
int_search(S, first_fail, indomain_min, complete),
|
||||
int_search([D], input_order, indomain_min, complete)
|
||||
])
|
||||
minimize objective;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Output
|
||||
|
||||
output [
|
||||
"yCoor = \(yCoor);\n",
|
||||
"S = \(S);\n",
|
||||
"D = \(D);\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
||||
|
||||
|
8
data/mznc2019/accap/accap_instance3.dzn
Normal file
8
data/mznc2019/accap/accap_instance3.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
% Instance 3 %
|
||||
opDur=[4,2,2,2,5,6,3,2,2,5,4,2,5,6,4,2,4,2,6,5];
|
||||
cNum=[2,5,1,2,2,1,4,5,4,5,1,5,2,3,3,5,3,3,5,4];
|
||||
xCoor=[4,7,8,8,3,1,4,6,4,2,3,7,4,2,3,6,1,3,3,2];
|
||||
FA=[{3,4,6,9,12,14},{2,5,7,8,10,11,13,15,17,20},{1,16,18,19}];
|
||||
airlines=3;
|
||||
flights=20;
|
||||
times=10;
|
5
data/mznc2019/accap/accap_instance3.meta
Normal file
5
data/mznc2019/accap/accap_instance3.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=accap.mzn
|
||||
DATA=accap_instance3.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,accap
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/accap/accap_instance5.dzn
Normal file
8
data/mznc2019/accap/accap_instance5.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
% Instance 5 %
|
||||
opDur=[3,4,2,5,5,5,3,3,2,6,5,6,6,3,3,4,5,5,5,4,6,3,3,4,5,5,3,5,2,2,5,6,3,6,6,3,3,6,2,3,6,2,5,4,2,6,5,5,5,2];
|
||||
cNum=[1,5,2,5,3,5,1,3,1,4,2,5,4,1,1,5,5,5,3,2,3,5,2,4,5,1,5,5,5,1,2,1,5,5,5,2,3,3,4,2,1,3,4,1,3,1,3,5,1,4];
|
||||
xCoor=[26,5,7,2,6,23,21,11,23,17,18,19,10,2,21,26,12,11,2,10,15,15,19,10,25,15,21,8,21,3,16,19,7,15,17,10,19,5,4,24,9,1,18,25,5,22,23,25,24,15];
|
||||
FA=[{3,4,7,13,19,24,25,33,34,38,49},{5,9,11,15,21,27,40,41,50},{1,8,10,16,18,28,30,32,37,48},{12,17,29,35,36,39,43},{6,14,22,31,46},{2,20,23,26,42,44,45,47}];
|
||||
airlines=6;
|
||||
flights=50;
|
||||
times=30;
|
5
data/mznc2019/accap/accap_instance5.meta
Normal file
5
data/mznc2019/accap/accap_instance5.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=accap.mzn
|
||||
DATA=accap_instance5.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,accap
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/accap/accap_instance6.dzn
Normal file
8
data/mznc2019/accap/accap_instance6.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
% Instance 6 %
|
||||
opDur=[6,6,2,2,2,6,6,2,2,4,6,4,6,6,4,5,4,5,2,6,2,6,6,3,2,4,5,4,4,2,2,4,3,6,6,5,3,3,3,2,4,4,3,3,5,4,6,2,3,2,6,5,3,6,6,4,2,4,5,6,3,5,4,3,5,4,5,6,6,2,6,5,2,4,2,2,4,2,3,3,6,4,4,6,2];
|
||||
cNum=[5,1,1,5,5,3,2,1,3,3,2,2,1,1,4,5,4,5,4,5,1,5,4,1,2,4,1,4,2,5,3,1,5,5,2,2,2,1,1,4,5,2,1,4,4,1,1,2,1,4,3,5,1,2,5,4,5,4,4,2,4,3,3,3,3,1,1,2,2,2,1,5,5,1,5,1,2,3,5,4,5,3,5,4,1];
|
||||
xCoor=[59,4,1,26,20,15,39,20,45,69,52,60,84,45,3,19,16,1,3,67,72,25,12,67,42,25,32,79,12,11,15,82,68,36,36,87,29,13,2,62,82,49,49,7,90,54,45,9,46,43,53,14,23,40,14,37,56,36,50,28,84,36,8,69,53,71,75,23,65,61,56,59,17,15,12,11,32,43,67,73,59,27,46,19,94];
|
||||
FA=[{1,8,28,33,34,37,54,68,71,76,79},{2,9,12,15,16,18,32,40,55,57,62,67,74,81},{27,38,39,44,48,51,56,58,60,61,66,72,82},{5,7,11,14,21,23,25,29,35,36,43,46,47,49,50,52,59,64,69,70,73,75,77,78,80,84},{3,4,6,10,13,17,19,20,22,24,26,30,31,41,42,45,53,63,65,83,85}];
|
||||
airlines=5;
|
||||
flights=85;
|
||||
times=96;
|
5
data/mznc2019/accap/accap_instance6.meta
Normal file
5
data/mznc2019/accap/accap_instance6.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=accap.mzn
|
||||
DATA=accap_instance6.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,accap
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/accap/accap_instance8.dzn
Normal file
8
data/mznc2019/accap/accap_instance8.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
% Instance 8 %
|
||||
opDur=[4,4,4,3,3,6,3,2,4,6,6,4,2,3,2,3,3,5,5,6,2,2,6,6,2,3,3,4,6,3,4,2,3,4,3,3,6,3,4,5,2,3,3,4,4,4,6,4,4,4,5,6,6,3,6,3,2,6,2,6,6,4,2,6,3,2,4,3,5,4,6,2,4,4,6,5,4,5,5,2,2,3,3,2,5,4,6,4,4,2,4,4,4,5,5,4,4,3,4,4,6,6,3,6,2,6,2,4,3,5,4,2,5,6,3,3,4,4,5,3,3,6,3,6,3,6,5,3,2,6,2,5,4,6,2,4,3,4,6,5,6,5,4,5,2,2,2,4,4,5,6,5,4,4,4,2,6,2,5,6,4,6,2,5,6,6,6,3,5,5,5,4,6,6,6,3,3,3,4,6,4,6,4,2,3,6,4,5,6,3,3,6,3,5,4,4,5,4,6,6,2,6,2,2,2,5,6,5,3,4,3,2,4,5,2,2,5,5,6,5,5,3,5,3,3,5,5,6,4,4,5,6,6,4,2,5,4,3,2,2,5,6,3,5,2,6,6,6,3,3,2,3,5,2,5,2,5,4,3,6,4,3,2,2,3,4,2,3,2,4,2,6,3,6,4,2,3,2,2,4,5,3,3,6,6,2,3,4,4,6,5,4,2,2,4,3,3,4,5,5,3,4,5,4,3,4,5,3,5,6,5,4,5,5,3,6,3,5,2,4,2,5,6,3,4,6,5,3,4,5,6,2,4,6,4,2,3,3,2,6,5,6,3,5,3,4,3,3,5,4,6,2,2,5,5,2,5,4,3,6,5,2,4,3,3,2,6,2,5,2,6,5,4,5,2,5,6,4,2,4,2,3,2,2,6,3,3,6,3,6,5,4,2,2,6,5,3,6,6,4,6,3,5,6,3,2,2,5,6,2,6,5,4,3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2,3,4,5,2,3,1,3,2,2,5,3,4,5,3,2,3,4,1,5,4,2,1,3,3,5,1,4,3,3,1,4,3,5,3,4,2,2,2,2,4,4,2,3,1,3,5,5,2,1,4,3,2,2,3,5,2,4,2,1,2,1,4,2,5,4,3,3,4,5,4,5,1,1,1,3,2,2,2,5];
|
||||
xCoor=[57,70,68,60,48,9,56,67,16,72,64,83,26,90,79,45,48,58,90,78,43,17,85,71,5,4,20,66,77,34,33,42,32,56,64,65,57,41,15,9,64,86,17,4,75,58,51,46,35,49,51,79,27,46,22,63,83,66,77,47,6,62,33,10,23,71,9,14,22,9,35,60,74,3,40,54,43,91,67,86,76,45,76,17,43,69,64,54,69,57,91,91,22,81,35,46,16,9,79,52,41,69,25,43,79,50,88,27,57,8,26,82,27,29,64,16,8,42,40,44,50,76,50,47,61,22,89,62,88,39,14,83,22,77,25,56,41,68,47,11,61,89,77,20,71,94,15,6,28,21,19,1,14,63,91,25,33,64,31,56,89,11,22,37,34,3,18,17,85,86,56,61,68,81,47,1,79,81,87,24,63,58,91,79,58,65,89,34,55,42,91,73,6,53,36,80,85,34,12,25,6,51,69,9,38,41,40,18,74,78,84,85,65,44,29,79,31,28,65,44,15,67,23,17,64,59,91,69,34,78,22,74,78,56,73,4,11,59,3,82,84,65,12,8,80,40,15,87,67,39,10,52,17,4,3,67,51,19,23,84,49,51,57,68,26,55,81,4,67,43,1,13,72,85,47,37,12,26,32,75,64,1,75,35,51,19,21,26,29,38,80,68,59,92,11,3,37,2,59,56,59,40,7,72,73,88,64,34,76,20,11,54,43,7,63,62,48,81,74,2,88,87,66,30,50,24,13,65,73,43,90,77,88,7,13,45,35,59,92,65,10,49,20,74,87,43,69,24,42,73,65,30,34,15,88,29,25,63,86,13,68,45,32,67,25,79,12,88,22,12,59,34,15,9,15,65,10,54,75,90,48,38,79,16,29,71,51,17,22,84,30,23,14,79,77,88,9,8,12,67,37,13,85,87,35,13,22,75,32,18,64,56,29,92,44,88,24,17,42,19,3,91,30,18,30,44,39,3,23,58,52,14,74,15,54,31,51,4,39,4,28,28,44,87,21,86,32,53,26,25,51,57,26,79,57,43,25,42,38,84,83,24,20,52,76,20,86,89,66,8,26,59,20,78,22,28,21,37,22,49,52,58,78,24,70,81,57,75,37,20,54,83,43,87,27,11,45,89,59,69];
|
||||
FA=[{24,25,28,50,160,165,199,237,252,281,417,474},{46,56,171,359,394,444,464},{2,43,45,49,53,76,176,218,285,294,321,342,384,428,441,486},{63,94,130,136,162,183,254,267,317,330,335},{235,322,354,407,408},{7,51,55,85,198,227,287,297,312,368,409,471},{127,271,307,350,456},{4,14,69,91,169,240,284,302,362},{26,105,117,132,153,266,293,415,466,488,489},{10,11,123,159,192,208,220,278,298,320,333,387,400,412,419,426,468},{5,27,61,86,87,128,133,151,175,179,216,273,331},{81,125,262,272,274,344,432,451,463},{34,64,80,219,229,269,295,318,370},{12,40,54,70,106,114,206,301,316,367,381,382,418},{145,149,161,170,195,265,279,395,411,446},{1,163,211,251,288,326,364},{205,210,275,291,399,496},{15,90,102,107,111,338,343,413,477,480,500},{37,236,355,401,405,484},{18,29,88,116,167,185,215,230,233,239,244,372,383,406,425,434,443,487},{71,72,360,376,431,448,492},{52,95,126,193,209,213,242,303,310,339,351,380,390},{73,181,277,300,397,457,469,495},{78,112,121,201,261,296,309,315,459},{60,131,141,157,246,264,268,299,424,447,449},{79,109,113,174,194,250,324,345,385,389,429,470,479,499},{17,22,47,84,101,137,188,214,257,276,374,465,498},{166,196,197,234,238,308,455,478,482},{3,103,283,327,337,375,430},{98,135,150,178,332,365,398,450,491},{9,44,221,224,226,290,329,416},{30,143,156,212,286,340,356,422,436},{66,144,164,228,259,314,336,348,377,404,445,452,473},{19,57,77,96,146,186,207,217,386,420,439,460,485},{35,48,67,68,115,120,180,189,231,232,258,289,311,421,427,437},{20,38,100,177,182,225,325},{75,247,396,475},{32,36,39,89,110,122,154,248,270,305,353,379,494},{8,31,129,142,152,204,222,256,263,391,402,414,481},{58,118,172,190,223,241,334,371,423,438},{16,59,119,140,253},{23,104,124,187,433,435,462,476,497},{41,65,93,99,202,245,304,378,410,458},{21,74,97,147,306,366,369,393,453,467},{83,148,280,323,442},{200,203,249,347,440,490},{82,155,260,373,392,461,472,483},{62,134,138,158,173,184,255,292,313,328,346},{6,13,139,282,349,357,363,388,403,454},{33,42,92,108,168,191,243,319,341,352,358,361,493}];
|
||||
airlines=50;
|
||||
flights=500;
|
||||
times=96;
|
5
data/mznc2019/accap/accap_instance8.meta
Normal file
5
data/mznc2019/accap/accap_instance8.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=accap.mzn
|
||||
DATA=accap_instance8.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,accap
|
||||
TIMELIMIT=1200
|
9
data/mznc2019/accap/accap_instance9.dzn
Normal file
9
data/mznc2019/accap/accap_instance9.dzn
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
% Instance 9 %
|
||||
opDur=[6,4,3,5,5,6,4,6,5,3,4,5,4,2,5,3,4,5,6,3,2,4,5,2,3,6,4,6,3,5,6,2,4,5,3,2,4,3,4,4,4,5,2,4,4,4,2,2,2,4,6,5,3,2,3,6,6,3,5,2,2,5,6,2,3,4,5,6,4,4,5,6,5,2,2,5,3,5,3,6,2,5,3,5,3,2,2,2,2,6,5,5,6,4,3,4,2,2,2,3,5,2,3,6,6,2,2,2,2,4,4,2,3,2,5,6,6,4,2,3,6,2,5,4,5,3,5,5,4,4,6,4,2,4,2,4,5,2,5,4,6,5,4,3,2,6,3,3,3,2,2,5,3,3,3,2,2,4,5,3,6,4,2,3,4,5,4,4,2,3,3,5,6,2,2,3,5,4,5,6,4,4,6,6,6,5,6,4,2,3,5,4,3,6,2,5,5,3,6,4,4,6,4,2,6,3,2,3,2,4,6,5,3,2,6,3,6,3,5,5,6,3,3,3,2,5,6,6,4,5,5,3,6,6,2,4,3,5,3,2,3,2,4,5,4,3,4,6,4,4,3,6,3,6,4,3,2,3,3,4,2,3,3,5,5,2,2,5,5,6,2,2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4,1,1,4,3,2,5,5,5,4,5,2,1,3,2,2,1,2,1,3,5,3,2,1,2,4,3,5,3,4,3,1,3,4,2,1,5,1,1,5,1,4,2,5,3,1,5,2,4,5,2,1,1,5,4,1,2,1,5,5,3,1,1,2,2,3,5,4,1,5,2,2,4,1,5,3,2,2,3,1,5,1,2,2,2,2,2,3,1,4,4,4,5,3,5,3,4,2,5,1,3,2,2,3,2,5,4,5,2,2,4,3,4,1,5,1,4,5,2,2,5,4,3,2,5,3,1,1,2,1,3,1,5,2,2,5,3,2,1,1,5,2,3,5,5,1,3,2,2,4,1,1,3,5,4,1,3,4,1,4,2,1,3,2,4,2,4,1,4,2,2,2,2,3,5,2,5,5,2,5,2,5,2,1,5,4,3,1,4,2,4,1,3,4,5,5,5,4,1,3,3,2,4,3,5,2,3,3,2,4,4,5,3,2,5,3,5,3,5,1,1,2];
|
||||
xCoor=[62,22,50,68,20,33,88,70,81,67,51,72,69,20,15,30,76,84,21,62,76,20,59,25,10,74,38,63,85,10,20,38,90,15,79,85,6,93,40,16,20,89,57,11,54,12,83,78,82,77,31,43,42,26,42,62,63,38,11,92,9,13,23,51,34,15,28,55,6,50,82,2,9,41,31,87,78,79,60,69,25,17,16,71,88,10,77,29,5,26,67,64,31,10,88,72,92,12,69,16,2,49,51,25,28,82,7,58,92,77,77,4,39,54,79,24,70,35,4,12,54,63,16,27,72,24,75,63,46,46,28,69,2,29,65,70,71,48,56,53,52,88,21,13,88,80,40,25,22,93,58,66,31,12,31,36,57,32,59,31,49,61,70,78,8,41,56,91,35,36,79,19,50,23,32,44,4,6,79,26,53,1,83,19,88,64,29,57,36,87,54,29,41,61,19,88,61,36,23,77,61,86,14,25,89,79,53,14,43,7,29,70,50,21,35,25,53,93,44,59,36,73,61,25,63,25,75,28,86,3,40,40,26,39,79,32,93,28,84,83,20,52,28,52,23,85,33,68,87,42,92,5,73,12,73,3,51,72,37,70,40,66,6,66,72,54,20,9,72,76,24,78,45,8,46,70,38,38,22,57,2,5,80,27,62,47,47,54,37,5,23,77,2,87,29,85,78,23,83,62,50,45,55,24,7,83,75,8,85,65,75,67,4,12,47,73,37,1,55,48,38,3,52,66,56,83,24,27,21,64,56,52,8,72,86,59,50,56,57,69,23,81,53,84,72,9,11,71,47,37,24,80,45,1,76,55,50,74,3,42,59,52,58,49,41,45,1,90,9,23,88,77,2,39,32,25,2,22,63,45,17,11,7,56,5,76,7,52,64,27,61,65,54,57,46,23,81,59,48,41,55,24,59,44,82,51,45,46,28,24,9,68,8,5,12,26,61,18,31,26,30,82,49,64,90,85,28,79,55,59,2,1,32,90,5,24,44,60,57,47,81,7,9,78,30,20,74,22,26,43,64,52,22,81,31,32,74,66,37,59,37,55,20,90,8,84,69,30,25,19,66,60,8,69,24,40,27,37,25,55,39,45,12,47,15,38,35,9,56,82,57,85,75,86,39,22,63,79,33,60];
|
||||
FA=[{8,20,85,90,96,165,259,260,271,346,351,375,421,447},{2,11,17,131,147,174,179,236,238,239,267,318,330,363,378,379,461,465,471,484},{5,6,27,101,136,163,268,289,354,382,390},{1,12,19,36,38,73,114,117,120,126,145,176,230,244,245,265,303,327,389,424,474,475,486},{25,31,42,49,102,171,203,222,227,284,304,312,316,326,380,393,427,456,460,481},{58,59,111,116,212,290,310,319,320,340,355,473,499},{56,77,81,94,139,141,173,311,324,397,432,469,485,498,500},{198,200,243,256,266,366,491},{23,67,95,148,152,232,247,257,285,291},{48,70,89,142,143,160,172,195,210,278,296,299,314,362,386,410,420},{3,18,28,40,61,87,109,125,154,170,192,204,226,282,302,371,391,412,418,429,462,468,476,487},{14,29,80,130,153,223,264,270,281,307,333,428,435,450},{65,69,72,75,104,135,193,205,240,254,279,352,367,370,392,402,419,445,477,478,497},{22,63,64,71,105,133,184,246,286,365,387,401,441,467,488},{45,93,106,121,124,155,196,207,218,248,250,313,328,345,348,373,376,384,385,453,482,490,492},{60,98,144,178,215,293,297,336,342,361,395,416},{21,55,113,177,255,262,263,276,317,334,338,349,353,374,399,415,440,444,494},{32,47,66,86,157,166,194,249,339,350,358,422,448,463,470},{30,76,78,92,158,180,181,182,186,189,199,213,219,220,221,233,253,261,360,372,377,383,403,408,417,425,436,451},{16,41,122,123,188,206,258,280,288,292,322,329,357,381,426,433,457,489},{39,68,97,129,185,201,273,277,294,315,321,409,411,414},{52,88,156,225,252,269,298,423,434,458,479,483},{10,33,140,149,159,187,190,209,237,325,430},{4,9,35,119,134,146,197,208,308,323,394,413},{37,83,99,100,151,217,229,235,242,274,275,309,356,364,396,446,459,466,493},{26,46,50,91,110,127,138,272,287,295,331,337,341,344,347,404,405,454,455,496},{15,24,44,53,132,150,169,175,183,241,300,301,305,335,388,398,437,438,449},{13,74,79,103,112,115,118,164,167,231,306,368,407,439,442,443,452,480},{7,34,51,62,84,107,128,161,162,191,234,251,283,332,359,369,400,431,464,472},{43,54,57,82,108,137,168,202,211,214,216,224,228,343,406,495}];
|
||||
airlines=30;
|
||||
flights=500;
|
||||
times=96;
|
5
data/mznc2019/accap/accap_instance9.meta
Normal file
5
data/mznc2019/accap/accap_instance9.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=accap.mzn
|
||||
DATA=accap_instance9.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,accap
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/amaze/2012-03-19.dzn
Normal file
8
data/mznc2019/amaze/2012-03-19.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
X = 10;
|
||||
Y = 10;
|
||||
N = 9;
|
||||
|
||||
end_points_start_x = [1, 2, 6, 7, 4, 2, 6, 5, 3];
|
||||
end_points_start_y = [1, 1, 3, 4, 6, 9, 5, 8, 9];
|
||||
end_points_end_x = [9, 9, 10, 10, 9, 6, 6, 8, 8];
|
||||
end_points_end_y = [1, 2, 8, 7, 9, 4, 8, 7, 6];
|
5
data/mznc2019/amaze/2012-03-19.meta
Normal file
5
data/mznc2019/amaze/2012-03-19.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=amaze3.mzn
|
||||
DATA=2012-03-19.dzn
|
||||
METHOD=sat
|
||||
TAGS=challenge2019,amaze
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/amaze/2012-03-29.dzn
Normal file
8
data/mznc2019/amaze/2012-03-29.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
X = 10;
|
||||
Y = 10;
|
||||
N = 10;
|
||||
|
||||
end_points_start_x = [3, 3, 2, 1, 2, 4, 4, 7, 5, 7];
|
||||
end_points_start_y = [6, 5, 2, 1, 9, 5, 8, 4, 4, 3];
|
||||
end_points_end_x = [9, 6, 10, 10, 9, 6, 7, 8, 6, 8];
|
||||
end_points_end_y = [3, 5, 6, 5, 2, 7, 7, 8, 6, 5];
|
5
data/mznc2019/amaze/2012-03-29.meta
Normal file
5
data/mznc2019/amaze/2012-03-29.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=amaze3.mzn
|
||||
DATA=2012-03-29.dzn
|
||||
METHOD=sat
|
||||
TAGS=challenge2019,amaze
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/amaze/2012-07-13.dzn
Normal file
8
data/mznc2019/amaze/2012-07-13.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
X = 12;
|
||||
Y = 12;
|
||||
N = 13;
|
||||
|
||||
end_points_start_x = [4, 2, 6, 9, 2, 8, 1, 4, 4, 8, 3, 9, 7];
|
||||
end_points_start_y = [8, 2, 6, 8, 11, 10, 4, 4, 3, 2, 5, 4, 5];
|
||||
end_points_end_x = [10, 5, 6, 11, 11, 10, 7, 7, 4, 11, 5, 12, 8];
|
||||
end_points_end_y = [6, 4, 9, 11, 9, 10, 12, 9, 5, 8, 6, 9, 3];
|
5
data/mznc2019/amaze/2012-07-13.meta
Normal file
5
data/mznc2019/amaze/2012-07-13.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=amaze3.mzn
|
||||
DATA=2012-07-13.dzn
|
||||
METHOD=sat
|
||||
TAGS=challenge2019,amaze
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/amaze/2012-07-27.dzn
Normal file
8
data/mznc2019/amaze/2012-07-27.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
X = 12;
|
||||
Y = 12;
|
||||
N = 10;
|
||||
|
||||
end_points_start_x = [4, 3, 8, 2, 2, 6, 1, 1, 3, 3];
|
||||
end_points_start_y = [6, 9, 11, 11, 7, 10, 9, 8, 5, 6];
|
||||
end_points_end_x = [8, 6, 11, 9, 8, 10, 5, 11, 10, 9];
|
||||
end_points_end_y = [7, 6, 8, 9, 10, 6, 8, 7, 3, 4];
|
5
data/mznc2019/amaze/2012-07-27.meta
Normal file
5
data/mznc2019/amaze/2012-07-27.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=amaze3.mzn
|
||||
DATA=2012-07-27.dzn
|
||||
METHOD=sat
|
||||
TAGS=challenge2019,amaze
|
||||
TIMELIMIT=1200
|
136
data/mznc2019/amaze/amaze3.mzn
Normal file
136
data/mznc2019/amaze/amaze3.mzn
Normal file
@ -0,0 +1,136 @@
|
||||
%------------------------------------------------------------------------------%
|
||||
|
||||
include "count.mzn";
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Parameters
|
||||
|
||||
int: X; % Number of cells in the x-direction
|
||||
int: Y; % NUmber of cells in the y-direction
|
||||
int: N; % Number of pairs
|
||||
|
||||
set of int: Pairs = 1..N;
|
||||
set of int: Xs = 1..X;
|
||||
set of int: Ys = 1..Y;
|
||||
|
||||
% These arrays all correspond.
|
||||
%
|
||||
array[Pairs] of Xs: end_points_start_x;
|
||||
array[Pairs] of Ys: end_points_start_y;
|
||||
array[Pairs] of Xs: end_points_end_x;
|
||||
array[Pairs] of Ys: end_points_end_y;
|
||||
|
||||
set of int: Dom = 0..N;
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Variables
|
||||
|
||||
array [Xs, Ys] of var Dom: board;
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Tests
|
||||
|
||||
test is_end_point(int: x, int: y) =
|
||||
exists(i in Pairs)(
|
||||
(end_points_start_x[i] = x /\ end_points_start_y[i] = y)
|
||||
\/ (end_points_end_x [i] = x /\ end_points_end_y [i] = y)
|
||||
);
|
||||
|
||||
test is_neighbour_from_xy(int: x, int: y, int: u, int: v) = (
|
||||
u in Xs /\ v in Ys /\ x in Xs /\ y in Ys
|
||||
/\ ( (x == u /\ y in {v - 1, v + 1})
|
||||
\/ (y == v /\ x in {u - 1, u + 1})
|
||||
)
|
||||
);
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Constraints
|
||||
|
||||
% Endpoints must be match with input
|
||||
%
|
||||
constraint
|
||||
forall(i in Pairs)(
|
||||
board[end_points_start_x[i], end_points_start_y[i]] = i
|
||||
/\ board[end_points_end_x [i], end_points_end_y [i]] = i
|
||||
);
|
||||
|
||||
% Every endpoint has exactly one neighbour
|
||||
%
|
||||
constraint
|
||||
forall(i in Pairs)(
|
||||
let {
|
||||
int: x1 = end_points_start_x[i],
|
||||
int: y1 = end_points_start_y[i],
|
||||
int: y2 = end_points_end_y [i],
|
||||
int: x2 = end_points_end_x [i]
|
||||
} in (
|
||||
count([board[u, v] | u in x1-1..x1+1, v in y1-1..y1+1 where
|
||||
is_neighbour_from_xy(x1, y1, u, v)], i, 1
|
||||
)
|
||||
/\ count([board[u, v] | u in x2-1..x2+1, v in y2-1..y2+1 where
|
||||
is_neighbour_from_xy(x2, y2, u, v)], i, 1
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
% Interior points has exactly two neighbours
|
||||
%
|
||||
constraint
|
||||
forall(x in Xs, y in Ys)(
|
||||
if is_end_point(x, y) then
|
||||
true
|
||||
else
|
||||
board[x, y] != 0 ->
|
||||
count([board[u, v] | u in x-1..x+1, v in y-1..y+1 where
|
||||
is_neighbour_from_xy(x, y, u, v)], board[x, y], 2)
|
||||
endif
|
||||
);
|
||||
|
||||
% Some redudant constraints
|
||||
%
|
||||
constraint redundant_constraint(
|
||||
forall(i in Pairs)(
|
||||
let {
|
||||
int: x1 = min(end_points_start_x[i], end_points_end_x[i]),
|
||||
int: y1 = min(end_points_start_y[i], end_points_end_y[i]),
|
||||
int: x2 = max(end_points_start_x[i], end_points_end_x[i]),
|
||||
int: y2 = max(end_points_start_y[i], end_points_end_y[i])
|
||||
} in (
|
||||
if x1 + 1 < x2 then
|
||||
forall(x in x1+1..x2-1)(
|
||||
sum(z in Ys)(bool2int(board[x, z] == i)) > 0
|
||||
)
|
||||
else
|
||||
true
|
||||
endif
|
||||
/\ if y1 + 1 < y2 then
|
||||
forall(y in y1+1..y2-1)(
|
||||
sum(z in Xs)(bool2int(board[z, y] == i)) > 0
|
||||
)
|
||||
else
|
||||
true
|
||||
endif
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Search
|
||||
|
||||
solve
|
||||
:: int_search(array1d(1..X*Y, board), input_order, indomain_split, complete)
|
||||
satisfy;
|
||||
|
||||
%------------------------------------------------------------------------------%
|
||||
% Output
|
||||
|
||||
output [
|
||||
"% "
|
||||
] ++ [
|
||||
show_int(floor(log10(int2float(N)) + 1.0), board[x, y]) ++
|
||||
if x = X then "\n% " else " " endif
|
||||
| y in Ys, x in Xs
|
||||
] ++ [
|
||||
"\nboard = array2d(", show(Xs), ", ", show(Ys), ", ", show(board), ");\n"
|
||||
];
|
||||
|
8
data/mznc2019/amaze/mod2012-03-29.dzn
Normal file
8
data/mznc2019/amaze/mod2012-03-29.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
X = 14;
|
||||
Y = 10;
|
||||
N = 13;
|
||||
|
||||
end_points_start_x = [ 3, 3, 2, 1, 3, 4, 3, 7, 5,10, 11, 12, 14];
|
||||
end_points_start_y = [ 6, 5, 2, 1, 7, 5, 8, 3, 4, 3, 6, 9, 10];
|
||||
end_points_end_x = [10, 6, 12, 11, 10, 6, 7, 8, 6, 8, 13, 13, 12];
|
||||
end_points_end_y = [ 2, 5, 8, 4, 4, 7, 7, 8, 6, 5, 10, 2, 4];
|
5
data/mznc2019/amaze/mod2012-03-29.meta
Normal file
5
data/mznc2019/amaze/mod2012-03-29.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=amaze3.mzn
|
||||
DATA=mod2012-03-29.dzn
|
||||
METHOD=sat
|
||||
TAGS=challenge2019,amaze
|
||||
TIMELIMIT=1200
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
MODEL=unison.mzn
|
||||
DATA=mips_gcc.cfgrtl.update_br_prob_note.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,code-generator
|
||||
TIMELIMIT=1200
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
MODEL=unison.mzn
|
||||
DATA=mips_gcc.function.use_return_register.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,code-generator
|
||||
TIMELIMIT=1200
|
118
data/mznc2019/code-generator/mips_gobmk.helpers.dragon_weak.dzn
Normal file
118
data/mznc2019/code-generator/mips_gobmk.helpers.dragon_weak.dzn
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
MODEL=unison.mzn
|
||||
DATA=mips_gobmk.helpers.dragon_weak.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,code-generator
|
||||
TIMELIMIT=1200
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
MODEL=unison.mzn
|
||||
DATA=mips_gobmk.patterns.autohelperpat1114.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,code-generator
|
||||
TIMELIMIT=1200
|
118
data/mznc2019/code-generator/mips_mesa.shapes.auxWireBox.dzn
Normal file
118
data/mznc2019/code-generator/mips_mesa.shapes.auxWireBox.dzn
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
MODEL=unison.mzn
|
||||
DATA=mips_mesa.shapes.auxWireBox.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,code-generator
|
||||
TIMELIMIT=1200
|
1300
data/mznc2019/code-generator/unison.mzn
Normal file
1300
data/mznc2019/code-generator/unison.mzn
Normal file
File diff suppressed because it is too large
Load Diff
8
data/mznc2019/fox-geese-corn/fgc_06_07_08_00.dzn
Normal file
8
data/mznc2019/fox-geese-corn/fgc_06_07_08_00.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
f = 6;
|
||||
g = 7;
|
||||
c = 8;
|
||||
k = 4;
|
||||
t = 15;
|
||||
pf = 8;
|
||||
pg = 12;
|
||||
pc = 9;
|
5
data/mznc2019/fox-geese-corn/fgc_06_07_08_00.meta
Normal file
5
data/mznc2019/fox-geese-corn/fgc_06_07_08_00.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=foxgeesecorn.mzn
|
||||
DATA=fgc_06_07_08_00.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,fox-geese-corn
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/fox-geese-corn/fgc_50_50_50_00.dzn
Normal file
8
data/mznc2019/fox-geese-corn/fgc_50_50_50_00.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
f = 50;
|
||||
g = 50;
|
||||
c = 50;
|
||||
k = 7;
|
||||
t = 35;
|
||||
pf = 9;
|
||||
pg = 10;
|
||||
pc = 8;
|
5
data/mznc2019/fox-geese-corn/fgc_50_50_50_00.meta
Normal file
5
data/mznc2019/fox-geese-corn/fgc_50_50_50_00.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=foxgeesecorn.mzn
|
||||
DATA=fgc_50_50_50_00.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,fox-geese-corn
|
||||
TIMELIMIT=1200
|
127
data/mznc2019/fox-geese-corn/foxgeesecorn.mzn
Normal file
127
data/mznc2019/fox-geese-corn/foxgeesecorn.mzn
Normal file
@ -0,0 +1,127 @@
|
||||
%------------------------------------------------------------------------------
|
||||
% Parameters
|
||||
|
||||
int: f;
|
||||
int: g;
|
||||
int: c;
|
||||
int: k;
|
||||
set of int: Cap = 0..k;
|
||||
int: t;
|
||||
set of int: Trips = 1..t;
|
||||
set of int: Trips0 = 0..t;
|
||||
int: pf;
|
||||
int: pg;
|
||||
int: pc;
|
||||
int: maxp = f*pf + g*pg + c*pc;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Variables
|
||||
|
||||
array[Trips] of var Cap: fox;
|
||||
array[Trips] of var Cap: geese;
|
||||
array[Trips] of var Cap: corn;
|
||||
var 0..t: trips;
|
||||
|
||||
array[Trips0] of var 0..f: efox;
|
||||
array[Trips0] of var 0..g: egeese;
|
||||
array[Trips0] of var 0..c: ecorn;
|
||||
|
||||
array[Trips0] of var 0..f: wfox;
|
||||
array[Trips0] of var 0..g: wgeese;
|
||||
array[Trips0] of var 0..c: wcorn;
|
||||
|
||||
var 0..maxp: objective;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Predicates
|
||||
|
||||
predicate alone(
|
||||
var 0..f: fox0, var 0..f: fox1,
|
||||
var 0..g: geese0, var 0..g: geese1,
|
||||
var 0..c: corn0, var 0..c: corn1
|
||||
) =
|
||||
let { var 1..4: c; % the cases we consider
|
||||
% 1: only one type of goods
|
||||
% 2: no fox, geese and corn
|
||||
% 3: fox and corn, no geese
|
||||
% 4: fox and geese (corn or not)
|
||||
} in (
|
||||
c = [1,1,1,2,1,3,4,4][1 + 4*(fox0 > 0) + 2*(geese0 > 0) + (corn0 > 0)]
|
||||
/\ fox1 = fox0 + [0,0,-1,if fox0 > geese0 then -1 else 0 endif][c]
|
||||
/\ geese1 = geese0 + [0,if geese0 > corn0 then -1 else 0 endif, 0, if fox0 > geese0 then 0 else -fox0 endif][c]
|
||||
/\ corn1 = corn0 + [0,if geese0 > corn0 then -1 else -geese0 endif, -1, 0][c]
|
||||
);
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Constraints
|
||||
|
||||
constraint efox[0] = 0 /\ egeese[0] = 0 /\ ecorn[0] = 0;
|
||||
constraint wfox[0] = f /\ wgeese[0] = g /\ wcorn[0] = c;
|
||||
|
||||
constraint forall(i in 1..t)(
|
||||
i <= trips ->
|
||||
if i mod 2 == 1 then
|
||||
alone(
|
||||
wfox[i-1] - fox[i], wfox[i],
|
||||
wgeese[i-1] - geese[i], wgeese[i],
|
||||
wcorn[i-1] - corn[i], wcorn[i]
|
||||
)
|
||||
/\ efox[i] = efox[i-1] + fox[i]
|
||||
/\ egeese[i] = egeese[i-1] + geese[i]
|
||||
/\ ecorn[i] = ecorn[i-1] + corn[i]
|
||||
else
|
||||
alone(
|
||||
efox[i-1] - fox[i], efox[i],
|
||||
egeese[i-1] - geese[i], egeese[i],
|
||||
ecorn[i-1] - corn[i], ecorn[i]
|
||||
)
|
||||
/\ wfox[i] = wfox[i-1] + fox[i]
|
||||
/\ wgeese[i] = wgeese[i-1] + geese[i]
|
||||
/\ wcorn[i] = wcorn[i-1] + corn[i]
|
||||
endif
|
||||
);
|
||||
|
||||
constraint forall(i in 1..t)(fox[i] + geese[i] + corn[i] <= k);
|
||||
|
||||
constraint forall(i in 1..t)(i > trips -> fox[i] = 0 /\ geese[i] = 0 /\ corn[i] = 0);
|
||||
|
||||
constraint objective = efox[trips] * pf + egeese[trips] * pg + ecorn[trips] * pc;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Solve item
|
||||
|
||||
solve
|
||||
:: seq_search([
|
||||
int_search([trips], input_order, indomain_min, complete),
|
||||
int_search(
|
||||
[ if j= 1 then fox[i] elseif j = 2 then geese[i] else corn[i] endif
|
||||
| i in Trips, j in 1..3],
|
||||
input_order,indomain_max, complete
|
||||
)
|
||||
])
|
||||
maximize objective;
|
||||
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Redundant constraints
|
||||
|
||||
constraint redundant_constraint(
|
||||
forall(i in 1..t)(
|
||||
wfox[i-1] + efox[i-1] >= wfox[i] + efox[i]
|
||||
/\ wgeese[i-1] + egeese[i-1] >= wgeese[i] + egeese[i]
|
||||
/\ wcorn[i-1] + ecorn[i-1] >= wcorn[i] + ecorn[i]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Output item
|
||||
|
||||
output [
|
||||
"fox = \(fox);\n",
|
||||
"geese = \(geese);\n",
|
||||
"corn = \(corn);\n",
|
||||
"trips = \(trips);\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
||||
|
8
data/mznc2019/fox-geese-corn/foxgeesecorn_13.dzn
Normal file
8
data/mznc2019/fox-geese-corn/foxgeesecorn_13.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
f = 6;
|
||||
g = 7;
|
||||
c = 8;
|
||||
k = 1;
|
||||
t = 31;
|
||||
pf = 0;
|
||||
pg = 6;
|
||||
pc = 3;
|
5
data/mznc2019/fox-geese-corn/foxgeesecorn_13.meta
Normal file
5
data/mznc2019/fox-geese-corn/foxgeesecorn_13.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=foxgeesecorn.mzn
|
||||
DATA=foxgeesecorn_13.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,fox-geese-corn
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/fox-geese-corn/foxgeesecorn_54.dzn
Normal file
8
data/mznc2019/fox-geese-corn/foxgeesecorn_54.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
f = 118;
|
||||
g = 213;
|
||||
c = 124;
|
||||
k = 178;
|
||||
t = 3;
|
||||
pf = 7;
|
||||
pg = 5;
|
||||
pc = 3;
|
5
data/mznc2019/fox-geese-corn/foxgeesecorn_54.meta
Normal file
5
data/mznc2019/fox-geese-corn/foxgeesecorn_54.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=foxgeesecorn.mzn
|
||||
DATA=foxgeesecorn_54.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,fox-geese-corn
|
||||
TIMELIMIT=1200
|
8
data/mznc2019/fox-geese-corn/foxgeesecorn_60.dzn
Normal file
8
data/mznc2019/fox-geese-corn/foxgeesecorn_60.dzn
Normal file
@ -0,0 +1,8 @@
|
||||
f = 10;
|
||||
g = 10;
|
||||
c = 12;
|
||||
k = 5;
|
||||
t = 19;
|
||||
pf = 1;
|
||||
pg = 1;
|
||||
pc = 1;
|
5
data/mznc2019/fox-geese-corn/foxgeesecorn_60.meta
Normal file
5
data/mznc2019/fox-geese-corn/foxgeesecorn_60.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=foxgeesecorn.mzn
|
||||
DATA=foxgeesecorn_60.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,fox-geese-corn
|
||||
TIMELIMIT=1200
|
250
data/mznc2019/groupsplitter/group.mzn
Normal file
250
data/mznc2019/groupsplitter/group.mzn
Normal file
@ -0,0 +1,250 @@
|
||||
%
|
||||
% Model for group splitting problem
|
||||
%
|
||||
% A group of people want to do activities (Cinema then Restaurant)
|
||||
% in subgroups where the activities for subgroups are supposed to
|
||||
% match better members' preferences.
|
||||
% The aim of our model is to find the best activities and group
|
||||
% combinations to recommend.
|
||||
%
|
||||
% @authors:
|
||||
%
|
||||
% Jacopo Mauro <mauro.jacopo@gmail.com>
|
||||
% Tong Liu <t.liu@unibo.it>
|
||||
%
|
||||
|
||||
include "count.mzn";
|
||||
include "table.mzn";
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Variables and array definitions
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% number of users
|
||||
set of int: user_ids;
|
||||
|
||||
% activities for phase 1
|
||||
set of int: activity1_ids;
|
||||
|
||||
% activities for phase 2
|
||||
set of int: activity2_ids;
|
||||
|
||||
% number of cells
|
||||
set of int: cell_ids;
|
||||
|
||||
% number of groups
|
||||
set of int: group_ids;
|
||||
|
||||
% time domain
|
||||
set of int: time_slot_ids;
|
||||
|
||||
% rating domains
|
||||
set of int: pub_rating_domain = 0..5;
|
||||
set of int: user_rating_domain = -2..2;
|
||||
|
||||
% global constraint Variables
|
||||
int: min_group_size; % min cardinality of a subgroup
|
||||
int: usersn; % number of users
|
||||
int: max_wait; % wait time btw 2 activities
|
||||
int: startAfter; % time after which schedule starts
|
||||
int: eta; % balance user's rating and public rating
|
||||
|
||||
array[activity1_ids,1..5] of int: activities1;
|
||||
array[activity2_ids,1..5] of int: activities2;
|
||||
|
||||
array[user_ids,activity1_ids] of user_rating_domain: preferences1;
|
||||
array[user_ids,activity2_ids] of user_rating_domain: preferences2;
|
||||
|
||||
array[activity1_ids] of int: oid1;
|
||||
array[activity2_ids] of int: oid2;
|
||||
|
||||
array[cell_ids,cell_ids] of int: distances;
|
||||
|
||||
% Create activities1_new for the calculation inserting index in the first position.
|
||||
array[activity1_ids,1..6] of int: activities1_data = array2d(activity1_ids,1..6,
|
||||
[ if i=1 then j else activities1[j,i-1] endif | j in activity1_ids, i in 1..6 ]);
|
||||
array[activity2_ids,1..6] of int: activities2_data = array2d(activity2_ids,1..6,
|
||||
[ if i=1 then j else activities2[j,i-1] endif | j in activity2_ids, i in 1..6 ]);
|
||||
|
||||
% Configure datalist for table constraint
|
||||
array[1..max(user_ids)*max(activity1_ids),1..3] of int: preferences1_data = array2d(1..max(user_ids)*max(activity1_ids),1..3,
|
||||
[ if k=1 then i else if k=2 then j else preferences1[i,j] endif endif | i in user_ids, j in activity1_ids, k in 1..3 ]);
|
||||
array[1..max(user_ids)*max(activity2_ids),1..3] of int: preferences2_data = array2d(1..max(user_ids)*max(activity2_ids),1..3,
|
||||
[ if k=1 then i else if k=2 then j else preferences2[i,j] endif endif | i in user_ids, j in activity2_ids, k in 1..3 ]);
|
||||
array[1..max(cell_ids)*max(cell_ids),1..3] of int: distances_data = array2d(1..max(cell_ids)*max(cell_ids),1..3,
|
||||
[ if k=1 then i else if k=2 then j else distances[i,j] endif endif | i in cell_ids, j in cell_ids, k in 1..3 ]);
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Maps to define a solution
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% map user -> group
|
||||
array[user_ids] of var group_ids: user_group_map1;
|
||||
array[user_ids] of var group_ids: user_group_map2;
|
||||
|
||||
% map group -> activity
|
||||
array[group_ids] of var activity1_ids: group_act_map1;
|
||||
array[group_ids] of var activity2_ids: group_act_map2;
|
||||
|
||||
% map user -> activity
|
||||
array[user_ids] of var activity1_ids: user_act_map1;
|
||||
array[user_ids] of var activity2_ids: user_act_map2;
|
||||
|
||||
% map user -> start of activity
|
||||
array[user_ids] of var time_slot_ids: user_start_time_map1;
|
||||
array[user_ids] of var time_slot_ids: user_start_time_map2;
|
||||
|
||||
% map user -> duration
|
||||
array[user_ids] of var time_slot_ids: user_duration_map1;
|
||||
array[user_ids] of var time_slot_ids: user_duration_map2;
|
||||
|
||||
% map user -> begin
|
||||
array[user_ids] of var time_slot_ids: activity_available_from1;
|
||||
array[user_ids] of var time_slot_ids: activity_available_from2;
|
||||
|
||||
% map user -> end
|
||||
array[user_ids] of var time_slot_ids: user_end_map1;
|
||||
array[user_ids] of var time_slot_ids: user_end_map2;
|
||||
|
||||
% map user -> cell
|
||||
array[user_ids] of var cell_ids: user_cell_map1;
|
||||
array[user_ids] of var cell_ids: user_cell_map2;
|
||||
|
||||
% map user -> type
|
||||
array[user_ids] of var pub_rating_domain: user_pub_rating_map1;
|
||||
array[user_ids] of var pub_rating_domain: user_pub_rating_map2;
|
||||
|
||||
% map user -> weight
|
||||
array[user_ids] of var user_rating_domain: user_weight_map1;
|
||||
array[user_ids] of var user_rating_domain: user_weight_map2;
|
||||
|
||||
% map user -> distance
|
||||
array[user_ids] of var time_slot_ids: user_distance_map;
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Check that the group members satisfy minCardinality
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
constraint forall(i in group_ids) (
|
||||
let { var min_group_size..usersn: c} in (
|
||||
count(user_group_map1,i,c)) );
|
||||
|
||||
constraint forall(i in group_ids) (
|
||||
let { var min_group_size..usersn: c} in (
|
||||
count(user_group_map2,i,c)) );
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Channel constraints
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
table( [ user_act_map1[i], activity_available_from1[i], user_end_map1[i], user_duration_map1[i], user_cell_map1[i], user_pub_rating_map1[i] ], activities1_data) );
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
table( [ user_act_map2[i], activity_available_from2[i], user_end_map2[i], user_duration_map2[i], user_cell_map2[i], user_pub_rating_map2[i] ], activities2_data) );
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
table( [ i, user_act_map1[i], user_weight_map1[i] ], preferences1_data));
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
table( [ i, user_act_map2[i], user_weight_map2[i] ], preferences2_data));
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
table( [ user_cell_map1[i], user_cell_map2[i], user_distance_map[i] ], distances_data));
|
||||
|
||||
% user's activity is also group's activity
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_act_map1[i] = group_act_map1[user_group_map1[i]] );
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_act_map2[i] = group_act_map2[user_group_map2[i]] );
|
||||
|
||||
|
||||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% % Symmetry breaking constraints
|
||||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% user 1 belongs always to the first group
|
||||
constraint redundant_constraint(
|
||||
user_group_map1[min(user_ids)] = min(group_ids) /\
|
||||
user_group_map2[min(user_ids)] = min(group_ids));
|
||||
|
||||
% next user belongs to the group of the previous users or +1
|
||||
constraint symmetry_breaking_constraint(
|
||||
forall (i in 1..max(group_ids)-min(group_ids)+1) (
|
||||
user_group_map1[min(user_ids)+i] in min(group_ids)..min(group_ids)+i /\
|
||||
user_group_map2[min(user_ids)+i] in min(group_ids)..min(group_ids)+i
|
||||
));
|
||||
|
||||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% % Activity temporal constraints
|
||||
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_start_time_map1[i] >= activity_available_from1[i] /\
|
||||
user_start_time_map1[i] <= user_end_map1[i] - user_duration_map1[i]);
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_start_time_map2[i] >= activity_available_from2[i] /\
|
||||
user_start_time_map2[i] <= user_end_map2[i] - user_duration_map2[i]);
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_start_time_map2[i] >= user_start_time_map1[i] + user_duration_map1[i] +
|
||||
user_distance_map[i] /\
|
||||
user_start_time_map2[i] <= user_start_time_map1[i] + user_duration_map1[i] + max_wait );
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Start After Constraint
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
constraint forall(i in user_ids) (
|
||||
user_start_time_map1[i] >= startAfter);
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Compute objective function
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
int: objub = eta*card(user_ids)*2 + (10-eta)*card(user_ids)*5 + (10-eta)*card(user_ids)*5 + eta*card(user_ids)*2;
|
||||
int: objlb=eta*card(user_ids)*(-2)+ (10-eta)*card(user_ids)*0 + (10-eta)*card(user_ids)*0 + eta*card(user_ids)*(-2);
|
||||
var objlb..objub: objective;
|
||||
|
||||
constraint objective = (
|
||||
eta * sum (user_weight_map1) + (10-eta) * sum (user_pub_rating_map1) + (10-eta) * sum (user_pub_rating_map2) + eta * sum (user_weight_map2) );
|
||||
|
||||
solve :: seq_search([
|
||||
int_search(user_group_map1,first_fail, indomain_min, complete),
|
||||
int_search(user_group_map2,first_fail, indomain_min, complete),
|
||||
int_search(user_weight_map1, first_fail, indomain_min, complete),
|
||||
int_search(user_weight_map2, first_fail, indomain_min, complete),
|
||||
int_search(user_act_map1, first_fail, indomain_min, complete),
|
||||
int_search(user_act_map2, first_fail, indomain_min, complete),
|
||||
int_search(user_start_time_map1, first_fail, indomain_min, complete),
|
||||
int_search(user_start_time_map2, first_fail, indomain_min, complete),
|
||||
int_search(user_duration_map1, first_fail, indomain_min, complete),
|
||||
int_search(user_duration_map2, first_fail, indomain_min, complete),
|
||||
int_search(user_end_map1, first_fail, indomain_min, complete),
|
||||
int_search(user_end_map2, first_fail, indomain_min, complete),
|
||||
])
|
||||
maximize objective;
|
||||
|
||||
|
||||
output [
|
||||
"user_group_map1 = \(user_group_map1);\n",
|
||||
"user_group_map2 = \(user_group_map2);\n",
|
||||
"user_weight_map1 = \(user_weight_map1);\n",
|
||||
"user_weight_map2 = \(user_weight_map2);\n",
|
||||
"user_act_map1 = \(user_act_map1);\n",
|
||||
"user_act_map2 = \(user_act_map2);\n",
|
||||
"user_start_time_map1 = \(user_start_time_map1);\n",
|
||||
"user_start_time_map2 = \(user_start_time_map2);\n",
|
||||
"user_duration_map1 = \(user_duration_map1);\n",
|
||||
"user_duration_map2 = \(user_duration_map2);\n",
|
||||
"user_end_map1 = \(user_end_map1);\n",
|
||||
"user_end_map2 = \(user_end_map2);\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
||||
|
18
data/mznc2019/groupsplitter/u12g2pref1.dzn
Normal file
18
data/mznc2019/groupsplitter/u12g2pref1.dzn
Normal file
File diff suppressed because one or more lines are too long
5
data/mznc2019/groupsplitter/u12g2pref1.meta
Normal file
5
data/mznc2019/groupsplitter/u12g2pref1.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=group.mzn
|
||||
DATA=u12g2pref1.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,groupsplitter
|
||||
TIMELIMIT=1200
|
18
data/mznc2019/groupsplitter/u15g5pref0.dzn
Normal file
18
data/mznc2019/groupsplitter/u15g5pref0.dzn
Normal file
File diff suppressed because one or more lines are too long
5
data/mznc2019/groupsplitter/u15g5pref0.meta
Normal file
5
data/mznc2019/groupsplitter/u15g5pref0.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=group.mzn
|
||||
DATA=u15g5pref0.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,groupsplitter
|
||||
TIMELIMIT=1200
|
18
data/mznc2019/groupsplitter/u6g1pref1.dzn
Normal file
18
data/mznc2019/groupsplitter/u6g1pref1.dzn
Normal file
File diff suppressed because one or more lines are too long
5
data/mznc2019/groupsplitter/u6g1pref1.meta
Normal file
5
data/mznc2019/groupsplitter/u6g1pref1.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=group.mzn
|
||||
DATA=u6g1pref1.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,groupsplitter
|
||||
TIMELIMIT=1200
|
18
data/mznc2019/groupsplitter/u7g2pref1.dzn
Normal file
18
data/mznc2019/groupsplitter/u7g2pref1.dzn
Normal file
File diff suppressed because one or more lines are too long
5
data/mznc2019/groupsplitter/u7g2pref1.meta
Normal file
5
data/mznc2019/groupsplitter/u7g2pref1.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=group.mzn
|
||||
DATA=u7g2pref1.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,groupsplitter
|
||||
TIMELIMIT=1200
|
18
data/mznc2019/groupsplitter/u9g1pref1.dzn
Normal file
18
data/mznc2019/groupsplitter/u9g1pref1.dzn
Normal file
File diff suppressed because one or more lines are too long
5
data/mznc2019/groupsplitter/u9g1pref1.meta
Normal file
5
data/mznc2019/groupsplitter/u9g1pref1.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=group.mzn
|
||||
DATA=u9g1pref1.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,groupsplitter
|
||||
TIMELIMIT=1200
|
117
data/mznc2019/hrc/exp1-1-5110.dzn
Normal file
117
data/mznc2019/hrc/exp1-1-5110.dzn
Normal file
@ -0,0 +1,117 @@
|
||||
num_bp = 1;
|
||||
nres = 90;
|
||||
ncoup = 9;
|
||||
nhosp = 9;
|
||||
max_rpref_len = 20;
|
||||
max_hpref_len = 57;
|
||||
rpref = [|3,8,3,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,4,9,9,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,9,8,8,9,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,4,8,4,6,8,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,4,8,8,4,8,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,8,9,8,3,3,9,8,3,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,7,8,9,7,9,8,7,9,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,7,1,7,1,1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,3,5,2,3,5,3,5,4,4,5,4,3,3,3,5,3,3,4,4,4,5,4,2,5,3,2,3,2,3,4,5,3];
|
||||
hpref = [|11,42,8,19,30,83,18,65,73,26,64,77,90,22,78,69,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|73,13,42,68,36,21,38,80,28,79,32,20,60,47,48,51,23,27,87,12,89,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|33,6,60,49,82,81,71,29,38,9,16,35,67,84,20,31,32,65,77,15,44,74,1,80,27,63,86,57,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|62,67,53,4,2,41,79,20,14,5,89,32,36,50,25,70,72,78,63,9,42,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|83,74,81,61,77,25,18,59,10,65,47,8,11,36,89,41,53,75,88,57,31,72,23,33,66,68,34,46,71,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|48,66,47,59,69,43,61,80,28,72,56,57,87,31,30,11,89,85,79,63,51,76,17,4,29,75,70,15,38,20,65,14,44,55,5,62,19,39,24,82,53,45,40,64,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|22,58,54,74,8,31,52,3,35,78,90,60,36,16,85,15,32,37,26,27,79,39,67,11,9,82,13,59,28,10,12,83,25,68,7,76,73,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|29,44,14,9,16,39,18,1,12,63,5,60,22,54,56,33,82,3,37,62,68,4,6,25,23,13,49,26,28,79,53,73,15,75,34,47,10,69,30,67,87,55,88,7,50,71,86,17,46,66,45,76,51,65,43,41,24
|
||||
|52,89,19,58,76,69,3,63,26,1,34,84,37,35,73,33,44,15,49,25,23,7,78,50,77,2,82,90,11,12,28,6,70,51,60,24,64,88,55,20,53,18,9,47,46,45,10,68,38,66,36,80,85,0,0,0,0|];
|
||||
hpref_len = [17,22,29,22,30,44,38,57,53];
|
||||
hrank = [|0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,7,4,0,17,14,0,0,0,10,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,8,0,0,0,16,0,0,0,9,0,0,0,12,15,0,0,0,0,6,0,0,0,0,0,0,13
|
||||
|0,0,0,0,0,0,0,0,0,0,0,20,2,0,0,0,0,0,0,12,6,0,17,0,0,0,18,9,0,0,0,11,0,0,0,5,0,7,0,0,0,3,0,0,0,0,14,15,0,0,16,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,4,0,0,0,0,1,0,0,0,0,0,10,8,0,0,0,0,0,0,19,22,21,0
|
||||
|23,0,0,0,0,2,0,0,10,0,0,0,0,0,20,11,0,0,0,15,0,0,0,0,0,0,25,0,8,0,16,17,1,0,12,0,0,9,0,29,0,0,0,21,0,0,0,0,4,0,0,0,0,0,0,0,28,0,0,3,0,0,26,0,18,0,13,0,0,0,7,0,0,22,0,0,19,0,0,24,6,5,0,14,0,27,0,0,0,0
|
||||
|0,5,0,4,10,0,0,0,20,0,0,0,0,9,0,0,0,0,0,8,0,0,0,22,15,0,0,0,0,0,0,12,0,0,0,13,0,0,0,0,6,21,0,0,0,0,0,0,0,14,0,0,3,0,0,0,0,0,0,0,0,1,19,0,0,0,2,0,0,16,0,17,0,0,0,0,0,18,7,0,0,0,0,0,0,0,0,0,11,0
|
||||
|0,0,0,0,0,0,0,12,0,9,13,0,0,0,0,0,0,7,0,0,0,0,23,0,6,0,0,0,0,0,21,0,24,27,0,14,0,0,0,0,16,0,0,0,0,28,11,0,0,0,0,0,17,0,30,0,20,0,8,0,4,0,0,0,10,25,0,26,0,0,29,22,0,2,18,0,5,0,0,0,3,0,1,0,0,0,0,19,15,0
|
||||
|0,0,0,24,35,0,0,0,0,0,16,0,0,32,28,0,23,0,37,30,0,0,0,39,0,0,0,9,25,15,14,0,0,0,0,0,0,29,38,43,0,0,6,33,42,0,3,1,0,0,21,0,41,0,34,11,12,0,4,0,7,36,20,44,31,2,0,0,5,27,0,10,0,0,26,22,0,0,19,8,0,40,0,0,18,0,13,0,17,0
|
||||
|0,0,8,0,0,0,35,5,25,30,24,31,27,0,16,14,0,0,0,0,0,1,0,0,33,19,20,29,0,0,6,17,0,0,9,13,18,0,22,0,0,0,0,0,0,0,0,38,0,0,0,7,0,3,0,0,0,2,28,12,0,0,0,0,0,0,23,34,0,0,0,0,37,4,0,36,0,10,21,0,0,26,32,0,15,0,0,0,0,11
|
||||
|8,0,18,22,11,23,44,0,4,37,0,9,26,3,33,5,48,7,0,0,0,13,25,57,24,28,0,29,1,39,0,0,16,35,0,0,19,0,6,0,56,0,55,2,51,49,36,0,27,45,53,0,31,14,42,15,0,0,0,12,0,20,10,0,54,50,40,21,38,0,46,0,32,0,34,52,0,0,30,0,0,17,0,0,0,47,41,43,0,0
|
||||
|10,26,7,0,0,32,22,0,43,47,29,30,0,0,18,0,0,42,3,40,0,0,21,36,20,9,0,31,0,0,0,0,16,11,14,51,13,49,0,0,0,0,0,17,46,45,44,0,19,24,34,1,41,0,39,0,0,4,0,35,0,0,8,37,0,50,0,48,6,33,0,0,15,0,0,5,25,23,0,52,0,27,0,12,53,0,0,38,2,28|];
|
||||
hosp_cap = [13,3,14,6,4,12,10,15,13];
|
5
data/mznc2019/hrc/exp1-1-5110.meta
Normal file
5
data/mznc2019/hrc/exp1-1-5110.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=hrc.mzn
|
||||
DATA=exp1-1-5110.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,hrc
|
||||
TIMELIMIT=1200
|
117
data/mznc2019/hrc/exp1-1-5425.dzn
Normal file
117
data/mznc2019/hrc/exp1-1-5425.dzn
Normal file
@ -0,0 +1,117 @@
|
||||
num_bp = 1;
|
||||
nres = 90;
|
||||
ncoup = 9;
|
||||
nhosp = 9;
|
||||
max_rpref_len = 17;
|
||||
max_hpref_len = 58;
|
||||
rpref = [|4,6,4,6,8,4,6,8,8,3,3,3,5,4,0,0,0,0
|
||||
|2,2,6,6,2,4,4,6,4,2,6,4,2,5,0,0,0,0
|
||||
|9,9,7,7,5,5,9,6,6,7,5,6,4,4,4,0,0,0
|
||||
|9,1,9,1,9,1,8,9,1,8,8,8,9,1,8,0,0,0
|
||||
|5,5,4,4,5,4,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,5,4,5,6,6,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,8,1,6,8,1,6,8,1,0,0,0,0,0,0,0,0,0
|
||||
|6,6,6,9,9,9,4,4,4,0,0,0,0,0,0,0,0,0
|
||||
|6,9,6,9,7,7,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,4,9,9,4,9,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,8,7,9,8,9,4,7,8,9,4,4,7,3,8,9,3,0
|
||||
|5,5,1,5,1,1,5,6,6,6,1,6,9,5,9,9,1,0
|
||||
|9,5,6,9,5,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,9,9,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|3,3,3,4,4,4,9,9,9,0,0,0,0,0,0,0,0,0
|
||||
|4,9,5,4,9,5,4,9,5,0,0,0,0,0,0,0,0,0
|
||||
|5,5,9,5,9,9,1,1,1,7,7,7,0,0,0,0,0,0
|
||||
|3,9,3,6,9,6,3,9,6,3,9,6,0,0,0,0,0,0
|
||||
|4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|5,9,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,4,6,0,0,0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,2,4,4,2,3,2,3,2,2,3,3,4,2,3,1,3,4,3,4,2,3,4];
|
||||
hpref = [|41,40,71,64,45,22,32,17,4,28,33,87,12,62,70,7,25,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|81,38,90,34,86,40,14,20,48,39,70,52,23,26,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|11,15,1,68,18,57,30,70,63,89,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|53,21,1,42,89,76,86,80,38,43,59,31,56,8,15,32,6,71,11,57,73,61,90,16,82,36,3,70,19,2,67,5,10,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|48,57,45,68,85,6,88,13,62,2,51,25,63,89,79,34,55,50,64,35,80,24,1,53,3,12,56,41,5,32,16,47,46,87,40,17,58,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|13,90,69,2,82,26,78,8,85,84,18,57,53,32,21,73,29,1,47,79,34,83,35,9,44,37,7,22,86,41,3,65,75,55,12,6,50,27,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|60,11,9,17,54,52,50,44,67,51,3,59,28,53,66,46,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|25,72,76,37,87,66,77,82,75,33,36,28,71,49,56,80,7,4,38,85,41,11,67,47,90,62,30,50,1,78,39,61,29,63,79,84,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|50,69,36,78,64,61,13,72,47,4,54,24,33,30,77,63,75,84,14,21,51,66,68,11,71,65,59,3,12,28,88,20,17,73,27,8,46,44,15,80,87,9,16,26,18,34,81,43,85,67,38,23,74,49,48,58,10,60|];
|
||||
hpref_len = [18,15,11,34,38,39,17,37,58];
|
||||
hrank = [|0,0,0,9,0,0,16,0,0,0,0,13,0,0,0,0,8,0,0,0,0,6,0,0,17,0,0,10,0,0,0,7,11,0,0,0,0,0,0,2,1,0,0,0,5,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,14,0,4,0,0,0,0,0,15,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0
|
||||
|0,15,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,8,0,0,13,0,0,14,0,0,0,0,0,0,0,4,0,0,0,2,10,6,0,0,0,0,0,0,0,9,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,5,0,0,0,3
|
||||
|3,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,5,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,9,0,0,0,0,4,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0
|
||||
|3,30,27,0,32,17,0,14,0,33,19,0,0,0,15,24,0,0,29,0,2,0,0,0,0,0,0,0,0,0,12,16,0,0,0,26,0,9,0,0,0,4,10,0,0,0,0,0,0,0,0,0,1,0,0,13,20,0,11,0,22,0,0,0,0,0,31,0,0,28,18,0,21,34,0,6,0,0,0,8,0,25,0,0,0,7,0,0,5,23
|
||||
|23,10,25,0,29,6,0,0,0,0,0,26,8,0,0,31,36,0,0,38,0,0,0,22,12,0,0,0,0,0,0,30,0,16,20,0,0,0,0,35,28,0,0,0,3,33,32,1,0,18,11,0,24,0,17,27,2,37,0,0,0,9,13,19,0,0,0,4,0,0,0,0,0,0,0,0,0,0,15,21,0,0,0,0,5,0,34,7,14,0
|
||||
|18,4,31,0,0,36,27,8,24,0,0,35,1,0,0,0,0,11,0,0,15,28,0,0,0,6,38,0,17,0,0,14,0,21,23,0,26,0,0,0,30,0,0,25,0,0,19,0,0,37,0,0,13,0,34,39,12,0,0,0,0,0,0,0,32,0,0,0,3,0,0,0,16,0,33,0,0,7,20,0,0,5,22,10,9,29,0,0,0,2
|
||||
|0,0,11,0,0,0,0,0,3,0,2,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,8,0,16,0,0,0,7,10,6,14,5,0,0,0,0,12,1,0,0,0,0,0,15,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|29,0,0,18,0,0,17,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,12,33,27,0,0,10,0,0,11,4,19,31,0,21,37,0,0,0,0,24,0,14,28,0,0,0,0,0,15,0,0,0,0,32,26,34,0,0,6,23,0,0,0,13,2,0,0,9,3,7,30,35,16,0,8,0,36,20,0,5,0,0,25
|
||||
|0,0,28,10,0,0,0,36,42,57,24,29,7,19,39,43,33,45,0,32,20,0,52,12,0,44,35,30,0,14,0,0,13,46,0,3,0,51,0,0,0,0,48,38,0,37,9,55,54,1,21,0,0,11,0,0,0,56,27,58,6,0,16,5,26,22,50,23,2,0,25,8,34,53,17,0,15,4,0,40,47,0,0,18,49,0,41,31,0,0|];
|
||||
hosp_cap = [14,12,2,10,11,12,6,11,12];
|
5
data/mznc2019/hrc/exp1-1-5425.meta
Normal file
5
data/mznc2019/hrc/exp1-1-5425.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=hrc.mzn
|
||||
DATA=exp1-1-5425.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,hrc
|
||||
TIMELIMIT=1200
|
117
data/mznc2019/hrc/exp1-1-5460.dzn
Normal file
117
data/mznc2019/hrc/exp1-1-5460.dzn
Normal file
@ -0,0 +1,117 @@
|
||||
num_bp = 1;
|
||||
nres = 90;
|
||||
ncoup = 9;
|
||||
nhosp = 9;
|
||||
max_rpref_len = 15;
|
||||
max_hpref_len = 52;
|
||||
rpref = [|8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,8,7,7,8,7,2,8,2,7,2,2,8,7,2,0
|
||||
|1,5,1,5,8,8,1,7,5,7,8,7,2,2,2,0
|
||||
|9,9,9,8,8,8,1,0,0,0,0,0,0,0,0,0
|
||||
|4,7,8,4,7,8,4,0,0,0,0,0,0,0,0,0
|
||||
|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,7,6,6,7,3,3,6,3,2,2,2,0,0,0,0
|
||||
|8,2,8,2,5,8,2,5,5,8,2,5,0,0,0,0
|
||||
|8,1,8,1,9,8,9,1,9,0,0,0,0,0,0,0
|
||||
|8,8,9,9,8,6,9,6,6,0,0,0,0,0,0,0
|
||||
|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,8,3,6,8,3,6,8,3,0,0,0,0,0,0,0
|
||||
|6,6,6,1,1,1,8,8,8,0,0,0,0,0,0,0
|
||||
|1,1,5,5,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,8,4,8,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,3,8,5,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|2,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|3,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|5,8,3,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|3,2,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0
|
||||
|5,6,3,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,8,1,7,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,5,3,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,6,3,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,8,3,6,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0|];
|
||||
rpref_len = [3,3,15,15,7,7,0,0,12,12,9,9,0,0,9,9,4,4,4,2,2,3,2,2,3,2,2,3,3,3,3,4,3,4,4,2,3,2,3,2,3,3,2,2,3,2,4,2,5,3,2,3,2,3,4,3,2,0,2,1,3,2,3,2,2,3,2,3,4,2,3,4,4,4,3,3,4,3,2,2,2,2,3,4,2,3,3,4,2,2];
|
||||
hpref = [|74,11,47,42,17,82,84,90,5,71,25,4,16,75,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|50,90,41,64,2,83,32,4,53,70,30,26,79,3,49,10,35,45,20,46,9,71,39,23,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|78,72,21,56,44,88,70,22,61,47,46,19,55,33,62,45,68,86,9,49,75,40,23,87,71,54,15,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|83,49,73,67,79,69,66,6,54,18,77,39,35,28,45,72,29,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|78,64,82,10,19,4,65,22,69,76,73,57,81,59,86,17,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|12,9,29,36,57,15,88,28,2,68,51,61,32,49,74,50,33,76,69,85,56,47,66,62,16,75,78,34,25,77,63,84,41,80,31,55,87,27,72,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|31,28,4,77,52,66,42,85,37,30,73,6,24,25,72,87,84,86,35,34,3,9,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|74,55,33,37,76,51,50,48,53,34,44,39,73,52,40,69,20,56,4,11,88,84,12,81,68,32,60,61,63,47,31,21,22,42,16,35,36,19,89,15,10,24,1,3,65,59,80,5,6,18,26,27
|
||||
|5,41,29,43,67,11,54,89,83,38,34,19,88,77,49,12,52,48,74,30,2,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|];
|
||||
hpref_len = [14,25,28,18,17,39,23,52,22];
|
||||
hrank = [|0,0,0,12,9,0,0,0,0,0,2,0,0,0,0,13,5,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,1,14,0,0,0,0,0,0,6,0,7,0,0,0,0,0,8
|
||||
|0,5,14,8,0,0,0,0,21,16,0,0,0,0,0,0,0,0,0,19,0,0,24,0,0,12,0,0,0,11,0,7,0,0,17,0,0,25,23,0,3,0,0,0,18,20,0,0,15,1,0,0,9,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,10,22,0,0,0,0,0,0,0,13,0,0,0,6,0,0,0,0,0,0,2
|
||||
|0,0,0,0,0,0,0,0,19,0,0,0,0,0,27,0,0,0,12,0,3,8,23,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,22,0,0,0,5,16,11,10,0,20,0,0,0,0,26,13,4,0,0,0,0,9,15,28,0,0,0,0,17,0,7,25,2,0,0,21,0,0,1,0,0,0,0,0,0,0,18,24,6,0,0
|
||||
|0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,14,17,0,0,0,0,0,13,0,0,0,12,0,0,0,0,0,15,0,0,0,2,0,0,0,0,9,18,0,0,0,0,0,0,0,0,0,0,7,4,0,6,0,0,16,3,0,0,0,11,0,5,0,0,0,1,0,0,0,0,0,0,0
|
||||
|0,0,0,6,0,0,0,0,0,4,0,0,0,0,0,0,16,0,5,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,14,0,0,0,0,2,7,0,0,0,9,0,0,0,11,0,0,10,0,1,0,0,13,3,0,0,0,15,0,0,0,0
|
||||
|0,9,0,0,0,0,0,0,2,0,0,1,0,0,6,25,0,0,0,0,0,0,0,0,29,0,38,8,3,0,35,13,17,28,0,4,0,0,0,0,33,0,0,0,0,0,22,0,14,16,11,0,0,0,36,21,5,0,0,0,12,24,31,0,0,23,0,10,19,0,0,39,0,15,26,18,30,27,0,34,0,0,0,32,20,0,37,7,0,0
|
||||
|0,0,21,3,0,12,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,14,0,0,2,0,10,1,0,0,20,19,0,9,0,0,0,0,7,23,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,15,11,0,0,0,4,0,0,0,0,0,0,17,8,18,16,0,0,0
|
||||
|43,0,44,19,48,49,0,0,0,41,20,23,0,0,40,35,0,50,38,17,32,33,0,42,0,51,52,0,0,0,31,26,3,10,36,37,4,0,12,15,0,34,0,11,0,0,30,8,0,7,6,14,9,0,2,18,0,0,46,27,28,0,29,0,45,0,0,25,16,0,0,0,13,1,0,5,0,0,0,47,24,0,0,22,0,0,0,21,39,0
|
||||
|0,21,0,0,1,0,0,0,0,0,6,16,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,3,20,0,22,0,11,0,0,0,10,0,0,2,0,4,0,0,0,0,18,15,0,0,17,0,7,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,19,0,0,14,0,0,0,0,0,9,0,0,0,0,13,8,0|];
|
||||
hosp_cap = [13,13,11,9,8,11,5,12,8];
|
5
data/mznc2019/hrc/exp1-1-5460.meta
Normal file
5
data/mznc2019/hrc/exp1-1-5460.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=hrc.mzn
|
||||
DATA=exp1-1-5460.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,hrc
|
||||
TIMELIMIT=1200
|
129
data/mznc2019/hrc/exp2-1-5145.dzn
Normal file
129
data/mznc2019/hrc/exp2-1-5145.dzn
Normal file
@ -0,0 +1,129 @@
|
||||
num_bp = 1;
|
||||
nres = 100;
|
||||
ncoup = 30;
|
||||
nhosp = 10;
|
||||
max_rpref_len = 25;
|
||||
max_hpref_len = 46;
|
||||
rpref = [|5,7,5,7,5,1,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|5,5,4,4,9,5,9,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|10,3,10,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,7,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|10,10,9,9,10,3,3,9,3,2,10,2,9,3,2,2,0,0,0,0,0,0,0,0,0,0
|
||||
|2,8,2,8,6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,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|5,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|10,4,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|9,3,2,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,4,9,8,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|1,8,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|];
|
||||
rpref_len = [8,8,4,4,16,16,9,9,2,2,12,12,15,15,9,9,2,2,12,12,4,4,15,15,15,15,16,16,6,6,12,12,20,20,5,5,20,20,6,6,15,15,5,5,12,12,7,7,12,12,23,23,15,15,6,6,20,20,25,25,4,2,3,3,4,3,4,3,5,4,5,2,2,4,4,3,2,2,3,3,2,5,4,5,5,4,3,3,5,3,3,5,4,3,2,3,3,4,5,4];
|
||||
hpref = [|94,9,42,1,35,83,66,29,14,79,75,96,59,100,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|72,98,42,77,71,38,54,17,65,5,12,23,82,94,86,13,6,93,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|100,54,67,30,10,73,70,81,86,5,75,3,21,50,49,58,90,98,63,38,52,20,33,46,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|63,34,2,82,84,78,97,95,92,37,83,71,25,49,19,51,26,54,80,57,69,8,61,53,12,99,22,52,88,74,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|24,64,18,2,9,36,52,7,34,43,92,55,21,27,70,28,76,1,96,84,74,45,66,85,6,48,100,30,49,86,69,26,65,60,57,39,11,0,0,0,0,0,0,0,0,0
|
||||
|48,38,89,56,73,77,47,87,55,15,12,67,6,71,27,30,69,16,49,32,57,42,33,91,28,70,24,96,84,60,90,41,65,11,68,40,13,37,31,0,0,0,0,0,0,0
|
||||
|35,93,51,62,22,32,76,52,29,47,43,84,99,27,38,48,31,26,85,92,58,53,54,40,24,97,45,60,74,61,68,46,44,59,20,33,16,56,14,4,19,75,89,1,13,0
|
||||
|93,58,61,34,98,79,6,91,29,72,56,7,63,83,71,82,51,24,41,45,69,85,89,66,76,87,8,36,15,99,94,54,35,42,33,59,28,60,47,26,74,67,100,31,0,0
|
||||
|12,4,64,78,79,44,91,95,59,62,53,27,99,83,51,25,15,98,82,57,26,88,5,65,23,2,28,89,37,60,19,39,85,90,40,52,69,41,20,32,61,93,80,92,16,11
|
||||
|3,57,17,38,81,13,55,24,51,86,92,89,25,5,67,84,75,64,80,68,14,97,23,8,70,42,19,58,37,45,59,7,99,87,82,34,33,46,85,43,50,71,0,0,0,0|];
|
||||
hpref_len = [15,19,25,31,37,39,45,44,46,42];
|
||||
hrank = [|4,0,0,0,0,0,0,0,2,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,5,0,0,0,0,0,0,3,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,11,0,0,0,10,0,0,0,6,0,0,0,0,0,0,0,0,0,0,1,0,12,0,0,0,14
|
||||
|0,0,0,0,10,17,0,0,0,0,0,11,16,0,0,0,8,0,0,0,0,0,12,0,0,0,0,0,0,0,19,0,0,0,0,0,0,6,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,5,1,0,0,0,0,4,0,0,0,0,13,0,0,0,15,0,0,0,0,0,0,18,14,0,0,0,2,0,0
|
||||
|0,0,12,0,10,0,0,0,0,5,0,0,0,0,0,0,0,0,0,22,13,0,0,0,0,0,0,0,0,4,0,0,23,0,0,0,0,20,0,0,0,0,0,0,0,24,0,0,15,14,0,21,0,2,0,0,0,16,0,0,0,0,19,0,0,0,3,0,0,7,0,0,6,0,11,0,0,0,0,0,8,0,0,0,0,9,0,25,0,17,0,0,0,0,0,0,0,18,0,1
|
||||
|0,3,0,0,0,0,0,22,0,0,0,25,31,0,0,0,0,0,15,0,0,27,0,0,13,17,0,0,0,0,0,0,0,2,0,0,10,0,0,0,0,0,0,0,0,0,0,0,14,0,16,28,24,18,0,0,20,0,0,0,23,0,1,0,0,0,0,0,21,0,12,0,0,30,0,0,0,6,0,19,0,4,11,5,0,0,0,29,0,0,0,9,0,0,8,0,7,0,26,0
|
||||
|18,4,0,0,0,25,8,0,5,0,37,0,0,0,0,0,0,3,0,0,13,0,0,1,0,32,14,16,0,28,0,0,0,9,0,6,0,0,36,0,0,0,10,0,22,0,0,26,29,0,0,7,0,0,12,0,35,0,0,34,0,0,0,2,33,23,0,0,31,15,0,0,0,21,0,17,0,0,0,0,0,0,0,20,24,30,0,0,0,0,0,11,0,0,0,19,0,0,0,27
|
||||
|0,0,0,0,0,13,0,0,0,0,34,11,37,0,10,18,0,0,0,0,0,0,0,27,0,0,15,25,0,16,39,20,23,0,0,0,38,2,0,36,32,22,0,0,0,0,7,1,19,0,0,0,0,0,9,4,21,0,0,30,0,0,0,0,33,0,12,35,17,26,14,0,5,0,0,0,6,0,0,0,0,0,0,29,0,0,8,0,3,31,24,0,0,0,0,28,0,0,0,0
|
||||
|44,0,0,40,0,0,0,0,0,0,0,0,45,39,0,37,0,0,41,35,0,5,0,25,0,18,14,0,9,0,17,6,36,0,1,0,0,15,0,24,0,0,11,33,27,32,10,16,0,0,3,8,22,23,0,38,0,21,34,28,30,4,0,0,0,0,0,31,0,0,0,0,0,29,42,7,0,0,0,0,0,0,0,12,19,0,0,0,43,0,0,20,2,0,0,0,26,0,13,0
|
||||
|0,0,0,0,0,7,12,27,0,0,0,0,0,0,29,0,0,0,0,0,0,0,0,18,0,40,0,37,9,0,44,0,35,4,33,28,0,0,0,0,19,34,0,0,20,0,39,0,0,0,17,0,0,32,0,11,0,2,36,38,3,0,13,0,0,24,42,0,21,0,15,10,0,41,0,25,0,0,6,0,0,16,14,0,22,0,26,0,23,0,8,0,1,31,0,0,0,5,30,43
|
||||
|0,26,0,2,23,0,0,0,0,0,46,1,0,0,17,45,0,0,31,39,0,0,25,0,16,21,12,27,0,0,0,40,0,0,0,0,29,0,32,35,38,0,0,6,0,0,0,0,0,0,15,36,11,0,0,0,20,0,9,30,41,10,0,3,24,0,0,0,37,0,0,0,0,0,0,0,0,4,5,43,0,19,14,0,33,0,0,22,28,34,7,44,42,0,8,0,0,18,13,0
|
||||
|0,0,1,0,14,0,32,24,0,0,0,0,6,21,0,0,3,0,27,0,0,0,23,8,13,0,0,0,0,0,0,0,37,36,0,0,29,4,0,0,0,26,40,0,30,38,0,0,0,41,9,0,0,0,7,0,2,28,31,0,0,0,0,18,0,0,15,20,0,25,42,0,0,0,17,0,0,0,0,19,5,35,0,16,39,10,34,0,12,0,0,11,0,0,0,0,22,0,33,0|];
|
||||
hosp_cap = [7,9,14,9,13,8,11,13,10,6];
|
5
data/mznc2019/hrc/exp2-1-5145.meta
Normal file
5
data/mznc2019/hrc/exp2-1-5145.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=hrc.mzn
|
||||
DATA=exp2-1-5145.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,hrc
|
||||
TIMELIMIT=1200
|
129
data/mznc2019/hrc/exp2-1-5600.dzn
Normal file
129
data/mznc2019/hrc/exp2-1-5600.dzn
Normal file
@ -0,0 +1,129 @@
|
||||
num_bp = 1;
|
||||
nres = 100;
|
||||
ncoup = 30;
|
||||
nhosp = 10;
|
||||
max_rpref_len = 20;
|
||||
max_hpref_len = 57;
|
||||
rpref = [|6,2,6,2,6,10,10,2,10,9,6,2,9,10,9,9,8,8,8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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,7,4,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|10,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,5,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,10,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,6,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|7,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|3,2,10,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|4,8,3,5,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,5,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|8,7,6,5,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|6,5,3,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|];
|
||||
rpref_len = [20,20,15,15,9,9,12,12,9,9,6,6,20,20,12,12,9,9,15,15,11,11,7,7,12,12,15,15,14,14,9,9,11,11,12,12,5,5,10,10,5,5,20,20,10,10,10,10,16,16,20,20,8,8,11,11,20,20,16,16,4,5,4,3,5,4,2,3,3,5,4,3,2,3,2,3,3,3,4,3,3,4,5,5,3,4,3,2,4,3,3,2,3,4,2,4,5,4,5,4];
|
||||
hpref = [|24,83,41,59,72,16,20,53,96,27,88,19,2,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|93,37,90,60,96,30,27,55,91,36,8,57,25,50,71,1,61,48,84,2,56,70,47,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|67,86,26,5,62,77,100,40,90,66,81,3,46,82,97,15,68,78,21,14,12,96,29,28,70,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|11,37,20,30,76,3,38,64,51,18,74,42,4,83,72,13,97,84,89,41,91,71,7,35,45,99,94,49,85,31,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|80,64,67,6,55,20,66,7,22,52,50,100,53,92,48,97,65,15,34,43,40,70,99,12,57,36,87,79,54,85,91,98,14,30,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|74,51,54,3,45,43,65,29,89,8,17,56,9,93,12,83,99,25,1,100,6,19,78,21,13,58,66,52,44,14,62,35,16,39,82,68,7,63,98,94,31,5,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|18,41,21,23,40,3,77,32,33,45,84,60,71,46,92,43,9,28,47,99,80,57,2,65,42,81,72,30,6,35,89,76,83,86,79,44,62,61,82,70,95,8,13,66,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|1,45,75,34,78,48,43,46,98,88,22,56,40,97,59,36,73,57,3,24,83,52,29,84,17,86,81,33,58,62,94,50,38,60,11,10,51,89,64,70,44,74,61,5,99,49,69,14,63,27,0,0,0,0,0,0,0
|
||||
|43,79,54,86,32,23,27,98,26,16,56,40,33,87,52,59,19,17,48,53,82,49,61,71,7,21,69,20,24,51,22,9,97,55,57,14,4,68,80,39,1,50,58,10,29,62,28,18,63,95,65,60,73,77,15,44,85
|
||||
|26,84,32,20,69,34,75,23,30,36,1,33,10,4,93,15,37,100,48,96,22,58,65,90,49,27,76,51,13,59,25,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|];
|
||||
hpref_len = [14,24,26,31,35,43,44,50,57,32];
|
||||
hrank = [|0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,12,7,0,0,0,1,14,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,11,0,0,0,0,0,0,0,9,0,0,0,0
|
||||
|16,20,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,7,0,0,6,0,0,0,0,0,10,2,0,0,0,0,0,0,0,0,0,23,18,0,14,0,0,0,0,8,21,12,0,0,4,17,0,0,0,0,0,0,0,0,22,15,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,3,9,0,1,24,0,5,0,0,0,0
|
||||
|0,0,12,0,4,0,0,0,0,0,0,21,0,20,16,0,0,0,0,0,19,0,0,0,0,3,0,24,23,0,26,0,0,0,0,0,0,0,0,8,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,10,1,17,0,25,0,0,0,0,0,0,6,18,0,0,11,14,0,0,0,2,0,0,0,9,0,0,0,0,0,22,15,0,0,7
|
||||
|0,0,6,13,0,0,23,0,0,0,1,0,16,0,0,0,0,10,0,3,0,0,0,0,0,0,0,0,0,4,30,0,0,0,24,0,2,7,0,0,20,12,0,0,25,0,0,0,28,0,9,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,22,15,0,11,0,5,0,0,0,0,0,0,14,18,29,0,31,0,19,0,21,0,0,27,0,0,17,0,26,0
|
||||
|0,0,0,0,0,4,8,0,0,0,0,24,0,33,18,0,0,0,0,6,0,9,0,0,0,0,0,0,0,34,0,0,0,19,0,26,0,0,0,21,0,0,20,0,0,0,0,15,0,11,0,10,13,29,5,0,25,0,0,0,0,0,35,2,17,7,3,0,0,22,0,0,0,0,0,0,0,0,28,1,0,0,0,0,30,0,27,0,0,0,31,14,0,0,0,0,16,32,23,12
|
||||
|19,43,4,0,42,21,37,10,13,0,0,15,25,30,0,33,11,0,22,0,24,0,0,0,18,0,0,0,8,0,41,0,0,0,32,0,0,0,34,0,0,0,6,29,5,0,0,0,0,0,2,28,0,3,0,12,0,26,0,0,0,31,38,0,7,27,0,36,0,0,0,0,0,1,0,0,0,23,0,0,0,35,16,0,0,0,0,0,9,0,0,0,14,40,0,0,0,39,17,20
|
||||
|0,23,6,0,0,29,0,42,17,0,0,0,43,0,0,0,0,1,0,0,3,0,4,0,0,0,0,18,0,28,0,8,9,0,30,0,0,0,0,5,2,25,16,36,10,14,19,0,0,0,0,0,0,0,0,0,22,0,0,12,38,37,0,0,24,44,0,0,0,40,13,27,0,0,0,32,7,0,35,21,26,39,33,11,0,34,0,0,31,0,0,15,0,0,41,0,0,0,20,0
|
||||
|1,0,19,0,44,0,0,0,0,36,35,0,0,48,0,0,25,0,0,0,0,11,0,20,0,0,50,0,23,0,0,0,28,4,0,16,0,33,0,13,0,0,7,41,2,8,0,6,46,32,37,22,0,0,0,12,18,29,15,34,43,30,49,39,0,0,0,0,47,40,0,0,17,42,3,0,0,5,0,0,27,0,21,24,0,26,0,10,38,0,0,0,0,31,0,0,14,9,45,0
|
||||
|41,0,0,37,0,0,25,0,32,44,0,0,0,36,55,10,18,48,17,28,26,31,6,29,0,9,7,47,45,0,0,5,13,0,0,0,0,0,40,12,0,0,1,56,0,0,0,19,22,42,30,15,20,3,34,11,35,43,16,52,23,46,49,0,51,0,0,38,27,0,24,0,53,0,0,0,54,0,2,39,0,21,0,0,57,4,14,0,0,0,0,0,0,0,50,0,33,8,0,0
|
||||
|11,0,0,14,0,0,0,0,0,13,0,0,29,0,16,0,0,0,0,4,0,21,8,0,31,1,26,0,0,9,0,3,12,6,0,10,17,0,0,0,0,0,0,0,0,0,0,19,25,0,28,0,0,0,0,0,0,22,30,0,0,0,0,0,23,0,0,0,5,0,0,0,0,0,7,27,0,0,32,0,0,0,0,2,0,0,0,0,0,24,0,0,15,0,0,20,0,0,0,18|];
|
||||
hosp_cap = [11,9,12,12,9,9,9,12,10,7];
|
5
data/mznc2019/hrc/exp2-1-5600.meta
Normal file
5
data/mznc2019/hrc/exp2-1-5600.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=hrc.mzn
|
||||
DATA=exp2-1-5600.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,hrc
|
||||
TIMELIMIT=1200
|
207
data/mznc2019/hrc/hrc.mzn
Normal file
207
data/mznc2019/hrc/hrc.mzn
Normal file
@ -0,0 +1,207 @@
|
||||
int: num_bp; % Target number of blocking pairs
|
||||
|
||||
int: nres; % Number of residents
|
||||
int: ncoup; % Number of couples
|
||||
int: nhosp; % Number of hospitals
|
||||
|
||||
set of int: Hospitals = 1..nhosp;
|
||||
set of int: Couples = 1..ncoup;
|
||||
set of int: Singles = (2*ncoup+1)..nres;
|
||||
set of int: Residents = 1..nres;
|
||||
|
||||
int: max_rpref_len; % The max length of a res pref list
|
||||
int: max_hpref_len; % The max length of a hosp pref list
|
||||
|
||||
% Resident pref lists (each list has at least one dummy zero at the end)
|
||||
array[Residents,1..max_rpref_len+1] of int: rpref;
|
||||
array[Residents] of int: rpref_len; % The length of each resident's pref list
|
||||
|
||||
array[Hospitals,1..max_hpref_len] of int: hpref; % Hospital preference lists
|
||||
array[Hospitals] of int: hpref_len; % Lengths of hospital pref lists
|
||||
|
||||
% Hospital capacities
|
||||
array[Hospitals] of int: hosp_cap;
|
||||
|
||||
% hrank[i][j] is the rank that hosp i gives res j, or 0 if hosp i doesn't rank res j
|
||||
array[Hospitals,Residents] of int: hrank;
|
||||
|
||||
array[Couples,1..max_rpref_len] of var bool: coup_bp; % Couple blocking pairs
|
||||
array[Singles,1..max_rpref_len] of var bool: single_bp; % Single res blocking pairs
|
||||
|
||||
% coup_assigned[i][j] <-> Couple i assigned is assigned to its jth-preference hospital
|
||||
array[Couples,1..max_rpref_len] of var bool: coup_assigned;
|
||||
% single_assigned[i][j] <-> Single resident i is assigned is assigned to her jth-preference hospital
|
||||
array[Singles,1..max_rpref_len] of var bool: single_assigned;
|
||||
|
||||
array[Couples] of var bool: coup_unassigned; % For each couple c, is c unassigned?
|
||||
array[Singles] of var bool: single_unassigned; % For each single resident r, is r unassigned?
|
||||
|
||||
% Which position on pref list does couple get?
|
||||
% This takes a value one greater than the length of the pref list if unmatched.
|
||||
array[Couples] of var 1..(max_rpref_len+1): coup_pos;
|
||||
array[Singles] of var 1..(max_rpref_len+1): single_pos; % Which position on pref list does single res get?
|
||||
|
||||
% hosp_assigned[i][j] <-> Hospital i is assigned to resident j
|
||||
array[Hospitals,1..max_hpref_len] of var bool: hosp_assigned;
|
||||
|
||||
% Functions to get IDs of first and second resident in a couple
|
||||
function int: first_in_couple(int:i) = i * 2 - 1;
|
||||
function int: second_in_couple(int:i) = i * 2;
|
||||
|
||||
% Ensure that exactly the target number of blocking pairs are present
|
||||
constraint sum(i in Couples, j in 1..rpref_len[i*2-1]) (bool2int(coup_bp[i,j])) +
|
||||
sum(i in Singles, j in 1..rpref_len[i]) (bool2int(single_bp[i,j])) = num_bp;
|
||||
|
||||
% Boolean channeling for resident prefs, and ensure that selected
|
||||
% resident pref position is one of the resident's prefs, or one past
|
||||
% the end of the list (representing unmatched)
|
||||
constraint forall (i in Singles) (
|
||||
single_pos[i] <= rpref_len[i] + 1 /\
|
||||
(single_unassigned[i] <-> single_pos[i] = rpref_len[i] + 1) /\
|
||||
forall (j in 1..rpref_len[i]) (single_assigned[i,j] <-> single_pos[i] = j) /\
|
||||
forall (j in rpref_len[i]+1..max_rpref_len) (single_assigned[i,j] = false)
|
||||
);
|
||||
|
||||
constraint forall (i in Couples) (
|
||||
coup_pos[i] <= rpref_len[first_in_couple(i)] + 1 /\
|
||||
(coup_unassigned[i] <-> coup_pos[i] = rpref_len[first_in_couple(i)] + 1) /\
|
||||
forall (j in 1..rpref_len[first_in_couple(i)]) (coup_assigned[i,j] <-> coup_pos[i] = j) /\
|
||||
forall (j in rpref_len[first_in_couple(i)]+1..max_rpref_len) (coup_assigned[i,j] = false)
|
||||
);
|
||||
|
||||
% Single-resident assignments match hosp assignments
|
||||
constraint forall (i in Singles) (
|
||||
forall(j in 1..rpref_len[i]) (
|
||||
let {var int: h=rpref[i,j]} in
|
||||
single_assigned[i,j] <-> hosp_assigned[h, hrank[h,i]]
|
||||
)
|
||||
);
|
||||
|
||||
% Couple assignments match hosp assignments
|
||||
constraint forall (i in Hospitals) (
|
||||
forall(j in 1..hpref_len[i] where hpref[i,j] <= ncoup*2) (
|
||||
let {int: res=hpref[i,j], int: coup=(hpref[i,j]+1) div 2} in
|
||||
hosp_assigned[i,j] <-> sum(k in 1..rpref_len[res] where rpref[res,k]=i) (bool2int(coup_assigned[coup,k])) = 1
|
||||
)
|
||||
);
|
||||
|
||||
% A hospital can't have any assigned positions beyond the end of its pref list
|
||||
constraint forall (i in Hospitals) (
|
||||
forall(j in hpref_len[i]+1..max_hpref_len) (hosp_assigned[i,j] = false)
|
||||
);
|
||||
|
||||
% Hospital capacities
|
||||
constraint forall (i in Hospitals) (
|
||||
sum(j in 1..hpref_len[i])(bool2int(hosp_assigned[i,j])) <= hosp_cap[i]
|
||||
);
|
||||
|
||||
% This predicate is true iff hospital h is not full with residents strictly preferred
|
||||
% to its qth-preference resident
|
||||
predicate hosp_would_prefer(int:h, int:q) =
|
||||
if q <= hosp_cap[h] then
|
||||
true
|
||||
else
|
||||
sum(k in 1..q-1)(bool2int(hosp_assigned[h,k])) < hosp_cap[h] \/
|
||||
sum(k in q+1..hpref_len[h])(bool2int(hosp_assigned[h,k])) > 0
|
||||
endif;
|
||||
|
||||
% This predicate is true iff the number of residents assigned to h that h strictly
|
||||
% prefers to its q-th preference resident is less than the hospital's capacity minus 1
|
||||
predicate hosp_would_prefer2(int:h, int:q) =
|
||||
sum(k in 1..q-1)(bool2int(hosp_assigned[h,k])) < hosp_cap[h] - 1 \/
|
||||
sum(k in q+1..hpref_len[h])(bool2int(hosp_assigned[h,k])) > 1;
|
||||
|
||||
% This predicate is used for the type-2 blocking pairs constraints. It is true
|
||||
% iff hospital h1 is not full with residents who are either (a) or (b):
|
||||
% (a) residents strictly preferred to h1's q1-th preference
|
||||
% (b) if hospitals h1 and h2 are the same and q2>q1, then hospital h1's q2-th preference
|
||||
predicate hosp_would_prefer_exc_partner(int:h1, int:h2, int:q1, int:q2) =
|
||||
if h2=h1 /\ q2>q1 then
|
||||
sum(k in 1..q1-1)(bool2int(hosp_assigned[h1,k])) + bool2int(hosp_assigned[h1,q2]) < hosp_cap[h1]
|
||||
else
|
||||
sum(k in 1..q1-1)(bool2int(hosp_assigned[h1,k])) < hosp_cap[h1]
|
||||
endif;
|
||||
|
||||
% Type 1
|
||||
constraint forall(i in Singles) (
|
||||
forall(j in 1..rpref_len[i]) (
|
||||
let {int: h=rpref[i,j], int: q=hrank[h,i]} in
|
||||
single_pos[i] > j /\ hosp_would_prefer(h,q) -> single_bp[i,j]
|
||||
)
|
||||
);
|
||||
|
||||
% Types 2a and 2b
|
||||
constraint forall (i in Couples) (
|
||||
let {int: r1=first_in_couple(i), int: r2=second_in_couple(i)} in
|
||||
forall(j in 1..rpref_len[r1]) (
|
||||
let {int: h1=rpref[r1,j], int: h2=rpref[r2,j], int: q1=hrank[h1,r1], int: q2=hrank[h2,r2]} in
|
||||
coup_pos[i] > j /\
|
||||
((hosp_would_prefer_exc_partner(h1, h2, q1, q2) /\ h2 = rpref[r2,coup_pos[i]]) \/
|
||||
(hosp_would_prefer_exc_partner(h2, h1, q2, q1) /\ h1 = rpref[r1,coup_pos[i]]))
|
||||
-> coup_bp[i,j]
|
||||
)
|
||||
);
|
||||
|
||||
% Type 3a
|
||||
constraint forall (i in Couples) (
|
||||
let {int: r1=first_in_couple(i), int: r2=second_in_couple(i)} in
|
||||
forall(j in 1..rpref_len[r1] where rpref[r1,j] != rpref[r2,j]) (
|
||||
let {int: h1=rpref[r1,j], int: h2=rpref[r2,j], int: q1=hrank[h1,r1], int: q2=hrank[h2,r2]} in
|
||||
hosp_would_prefer(h1,q1) /\
|
||||
hosp_would_prefer(h2,q2) /\
|
||||
coup_pos[i] > j /\
|
||||
h2 != rpref[r2,coup_pos[i]] /\
|
||||
h1 != rpref[r1,coup_pos[i]]
|
||||
-> coup_bp[i,j]
|
||||
)
|
||||
);
|
||||
|
||||
% Type 3bcd
|
||||
constraint forall (i in Couples) (
|
||||
let {int: r1=first_in_couple(i), int: r2=second_in_couple(i)} in
|
||||
forall(j in 1..rpref_len[r1] where rpref[r1,j] = rpref[r2,j]) (
|
||||
let {int: h=rpref[r1,j], int: q1=hrank[h,r1], int: q2=hrank[h,r2]} in
|
||||
if q1 < q2 then
|
||||
hosp_would_prefer2(h,q1) /\ hosp_would_prefer(h,q2)
|
||||
else
|
||||
hosp_would_prefer(h,q1) /\ hosp_would_prefer2(h,q2)
|
||||
endif /\
|
||||
coup_pos[i] > j /\
|
||||
h != rpref[r2,coup_pos[i]] /\
|
||||
h != rpref[r1,coup_pos[i]]
|
||||
-> coup_bp[i,j]
|
||||
)
|
||||
);
|
||||
|
||||
var 0..2*card(Couples)+card(Singles): objective;
|
||||
constraint objective = sum(i in Couples)(2 * bool2int(coup_unassigned[i])) +
|
||||
sum(i in Singles)(bool2int(single_unassigned[i]));
|
||||
|
||||
solve
|
||||
%:: seq_search([
|
||||
% bool_search(array1d(coup_unassigned), input_order, indomain_max, complete),
|
||||
% bool_search(array1d(single_unassigned), input_order, indomain_max, complete),
|
||||
% %int_search(single_pos ++ coup_pos, smallest, indomain_min, complete)
|
||||
%])
|
||||
%:: seq_search([
|
||||
% int_search(coup_pos, smallest, indomain_min, complete),
|
||||
% int_search(single_pos, smallest, indomain_min, complete),
|
||||
%])
|
||||
:: int_search(single_pos ++ coup_pos, first_fail, indomain_min, complete)
|
||||
minimize objective;
|
||||
|
||||
output [
|
||||
"coup_pos = array1d(\(Couples), \(coup_pos));\n",
|
||||
"single_pos = array1d(\(Singles), \(single_pos));\n",
|
||||
"objective = \(objective);\n",
|
||||
];
|
||||
|
||||
%output [show(nres - sum(i in Couples)(2 * bool2int(coup_unassigned[i])) -
|
||||
% sum(i in Singles)(bool2int(single_unassigned[i]))) ++ "\n"]
|
||||
% ;
|
||||
% ++
|
||||
% [show(i) ++ " " ++ show(coup_pos[i]) ++ " " ++ show(rpref[i*2-1,coup_pos[i]]) ++ "-" ++ show(rpref[i*2,coup_pos[i]]) ++ " " | i in Couples]
|
||||
% ++ ["\n"] ++
|
||||
% [show(i) ++ " " ++ show(single_pos[i]) ++ " (" ++ show(rpref[i,single_pos[i]]) ++ ") " | i in Singles] ++ ["\n"] ++
|
||||
% [(if j==1 then "\n" else "" endif) ++ show(if hosp_assigned[i,j] then show(hpref[i,j]) ++ " " else "- " endif)
|
||||
% | i in Hospitals, j in 1..hpref_len[i]];
|
22
data/mznc2019/kidney-exchange/3_20_0.25_2.dzn
Normal file
22
data/mznc2019/kidney-exchange/3_20_0.25_2.dzn
Normal file
@ -0,0 +1,22 @@
|
||||
K = 3;
|
||||
V = 20;
|
||||
edge_weight = [|0, -1, -1, -1, -1, -1, -1, 37, -1, 11, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1|
|
||||
-1, 0, 57, 23, -1, 1, -1, 23, -1, -1, 19, -1, -1, -1, 2, 29, -1, -1, -1, -1|
|
||||
-1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, 0, -1, -1, -1, 58, 39, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, 18, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, 89, -1, 58, -1, 0, -1, -1, -1, -1, -1, -1, -1, 92, -1, 71, 56, -1, -1, 60|
|
||||
-1, -1, 35, -1, -1, -1, 0, 5, -1, -1, -1, 87, 61, 95, 63, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, 0, 57, -1, -1, -1, 67, 91, 70, 100, -1, -1, -1, -1|
|
||||
-1, -1, -1, 62, 94, 21, -1, 63, 0, -1, 45, 72, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
10, -1, -1, -1, -1, -1, 77, 44, 93, 0, 43, 10, -1, -1, -1, -1, -1, -1, -1, 57|
|
||||
-1, -1, 31, -1, 24, -1, -1, -1, -1, -1, 0, -1, -1, 41, 63, -1, -1, -1, 14, -1|
|
||||
13, -1, -1, 56, -1, 100, -1, -1, -1, 44, -1, 0, -1, 79, -1, -1, 23, -1, -1, 46|
|
||||
49, 80, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, 0, -1, -1, 37, -1, -1, 51, -1|
|
||||
-1, -1, -1, -1, -1, 94, -1, 29, -1, 23, -1, -1, 63, 0, -1, 4, -1, -1, -1, -1|
|
||||
-1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 94, 0, 2, -1, -1, 6, 21|
|
||||
-1, -1, -1, -1, -1, 61, -1, -1, 57, -1, -1, -1, -1, -1, -1, 0, -1, 71, -1, -1|
|
||||
21, 13, -1, 84, -1, -1, 34, -1, 97, 35, 3, 97, -1, -1, -1, -1, 0, 84, -1, 100|
|
||||
-1, -1, -1, -1, -1, -1, -1, 19, 16, -1, -1, 40, -1, -1, -1, -1, 61, 0, -1, -1|
|
||||
61, 82, 8, 2, -1, 25, -1, -1, 53, -1, -1, -1, 9, -1, -1, 31, -1, -1, 0, -1|
|
||||
-1, -1, 27, -1, -1, -1, -1, -1, 36, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, 0|];
|
5
data/mznc2019/kidney-exchange/3_20_0.25_2.meta
Normal file
5
data/mznc2019/kidney-exchange/3_20_0.25_2.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=ccmcp.mzn
|
||||
DATA=3_20_0.25_2.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,kidney-exchange
|
||||
TIMELIMIT=1200
|
22
data/mznc2019/kidney-exchange/3_20_0.25_5.dzn
Normal file
22
data/mznc2019/kidney-exchange/3_20_0.25_5.dzn
Normal file
@ -0,0 +1,22 @@
|
||||
K = 3;
|
||||
V = 20;
|
||||
edge_weight = [|0, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, -1, -1, -1, -1, -1, 39|
|
||||
-1, 0, -1, -1, 32, -1, 37, -1, -1, -1, 32, -1, 30, -1, -1, -1, -1, -1, 49, -1|
|
||||
-1, -1, 0, -1, 13, -1, -1, 13, -1, -1, -1, 40, -1, 37, -1, -1, -1, 63, 75, -1|
|
||||
5, 79, 84, 0, -1, -1, 22, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, 26, -1, 79|
|
||||
-1, 53, -1, 59, 0, -1, -1, -1, -1, -1, 78, 35, 9, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, 0, -1, -1, 3, -1, 20, 68, 39, -1, 40, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, 0, 92, 60, -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, 37|
|
||||
-1, 89, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 76, -1, -1, -1, 84, -1, -1, -1|
|
||||
-1, 18, -1, -1, -1, 7, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 91, 44, 85, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, 96, -1, 0, -1, -1, 88, 56, 47, -1, -1, -1, -1|
|
||||
-1, 13, 52, -1, 30, -1, -1, -1, -1, -1, -1, 0, -1, 58, -1, -1, -1, -1, 1, -1|
|
||||
3, 97, -1, -1, -1, -1, 97, 29, -1, -1, 75, 59, 0, -1, -1, -1, -1, -1, 90, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, 60, 0, -1, -1, -1, -1, 93, -1|
|
||||
-1, 91, -1, 36, 90, -1, -1, -1, 30, 60, 3, -1, -1, -1, 0, -1, -1, -1, -1, 17|
|
||||
12, -1, -1, -1, -1, 33, 64, 71, -1, -1, -1, -1, -1, -1, -1, 0, 9, -1, -1, 98|
|
||||
-1, -1, -1, -1, 87, 15, -1, 33, -1, 80, 28, -1, 43, 15, 29, -1, 0, -1, -1, -1|
|
||||
-1, -1, -1, -1, 95, 60, -1, -1, 75, -1, -1, 81, -1, -1, -1, -1, -1, 0, -1, 53|
|
||||
88, 17, 12, -1, -1, -1, 28, -1, 98, 61, -1, 52, -1, -1, -1, 46, -1, -1, 0, -1|
|
||||
-1, -1, -1, -1, -1, 49, -1, -1, -1, -1, 34, -1, 92, -1, -1, -1, 100, -1, -1, 0|];
|
5
data/mznc2019/kidney-exchange/3_20_0.25_5.meta
Normal file
5
data/mznc2019/kidney-exchange/3_20_0.25_5.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=ccmcp.mzn
|
||||
DATA=3_20_0.25_5.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,kidney-exchange
|
||||
TIMELIMIT=1200
|
22
data/mznc2019/kidney-exchange/3_20_0.30_5.dzn
Normal file
22
data/mznc2019/kidney-exchange/3_20_0.30_5.dzn
Normal file
@ -0,0 +1,22 @@
|
||||
K = 3;
|
||||
V = 20;
|
||||
edge_weight = [|0, -1, 82, 81, -1, 56, -1, -1, 23, 17, -1, -1, -1, 92, 88, -1, -1, -1, -1, -1|
|
||||
-1, 0, -1, -1, -1, -1, 20, 76, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, 66|
|
||||
-1, -1, 0, -1, -1, 29, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, 60|
|
||||
-1, -1, -1, 0, -1, 86, -1, -1, 97, 9, 36, -1, 66, 71, -1, -1, -1, 63, -1, -1|
|
||||
-1, -1, -1, -1, 0, 43, 79, -1, -1, -1, -1, 51, -1, 72, -1, 94, -1, 86, -1, -1|
|
||||
-1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 96, -1, -1, -1, -1, 23, -1, -1, -1, -1|
|
||||
-1, -1, -1, 48, -1, -1, 0, 38, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
62, -1, -1, -1, -1, -1, 64, 0, -1, -1, -1, 84, 73, 83, 18, -1, 37, 18, 17, -1|
|
||||
-1, 10, 86, 73, -1, 93, 55, -1, 0, 17, -1, -1, -1, -1, -1, 80, 77, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 49, -1, -1, 96, -1, 59, 44, -1|
|
||||
84, -1, -1, -1, -1, 15, -1, 21, 12, -1, 0, 2, -1, 56, -1, -1, 88, -1, 35, -1|
|
||||
-1, 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 46, 92, -1, -1, -1, -1, 97, -1|
|
||||
-1, 7, -1, 80, 88, -1, 40, -1, 92, -1, -1, -1, 0, 61, -1, -1, 47, 14, -1, -1|
|
||||
67, 24, -1, -1, 32, -1, 62, 69, -1, 78, -1, 22, -1, 0, -1, 9, -1, 73, -1, 51|
|
||||
-1, 64, -1, 27, -1, 26, 82, 89, 10, -1, 23, -1, -1, -1, 0, -1, 88, -1, 87, -1|
|
||||
61, -1, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, 0, -1, -1, 67, 64|
|
||||
-1, 52, -1, -1, -1, -1, 48, -1, 61, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 100|
|
||||
-1, 20, 13, 72, 3, 65, -1, -1, -1, 49, -1, 90, -1, -1, 69, -1, -1, 0, -1, -1|
|
||||
71, -1, 13, 69, -1, 33, -1, -1, -1, -1, 38, -1, -1, -1, 10, -1, 50, -1, 0, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, 100, -1, -1, 44, -1, 48, -1, -1, -1, -1, 0|];
|
5
data/mznc2019/kidney-exchange/3_20_0.30_5.meta
Normal file
5
data/mznc2019/kidney-exchange/3_20_0.30_5.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=ccmcp.mzn
|
||||
DATA=3_20_0.30_5.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,kidney-exchange
|
||||
TIMELIMIT=1200
|
22
data/mznc2019/kidney-exchange/3_20_0.40_3.dzn
Normal file
22
data/mznc2019/kidney-exchange/3_20_0.40_3.dzn
Normal file
@ -0,0 +1,22 @@
|
||||
K = 3;
|
||||
V = 20;
|
||||
edge_weight = [|0, -1, 94, 52, 85, 26, -1, -1, -1, -1, 2, -1, -1, -1, -1, 82, 91, 25, 85, -1|
|
||||
-1, 0, -1, 16, -1, -1, -1, -1, 47, 75, -1, -1, -1, -1, -1, 24, -1, -1, -1, 87|
|
||||
11, 48, 0, -1, 19, 31, 20, 40, -1, -1, -1, 50, 81, 18, -1, -1, -1, -1, 30, -1|
|
||||
45, -1, -1, 0, 6, 54, -1, 92, 64, -1, 37, 95, 32, 19, 64, -1, -1, -1, -1, 72|
|
||||
24, -1, 97, -1, 0, 2, -1, -1, 60, -1, -1, -1, -1, 96, -1, -1, 77, 38, -1, -1|
|
||||
76, 82, 83, 2, -1, 0, 24, 95, 31, -1, 38, 19, 91, -1, -1, 45, -1, 80, -1, -1|
|
||||
-1, -1, -1, -1, 11, 81, 0, 34, 3, -1, 49, -1, -1, -1, 3, -1, -1, -1, 7, -1|
|
||||
-1, 87, -1, -1, 38, -1, -1, 0, -1, -1, -1, 69, -1, 54, -1, -1, -1, -1, 4, 1|
|
||||
-1, -1, -1, 7, -1, -1, -1, -1, 0, -1, 29, 23, -1, 9, -1, -1, -1, 50, -1, 68|
|
||||
-1, 98, 4, 85, -1, 100, -1, -1, 70, 0, 30, 17, 91, 57, -1, 3, -1, -1, -1, -1|
|
||||
99, -1, 69, -1, 66, 74, 83, 69, 63, -1, 0, -1, 26, 13, 67, -1, -1, 68, 21, -1|
|
||||
2, -1, -1, -1, -1, 52, 15, -1, -1, 19, 46, 0, -1, -1, 99, -1, 54, 63, -1, -1|
|
||||
-1, -1, 32, -1, 57, -1, -1, -1, -1, -1, -1, 94, 0, -1, -1, -1, -1, 84, 61, 22|
|
||||
-1, 21, 20, -1, -1, -1, 90, -1, -1, -1, -1, -1, 98, 0, -1, 53, -1, 84, -1, 83|
|
||||
-1, -1, -1, -1, -1, 79, 11, -1, 77, 3, 18, -1, -1, -1, 0, 62, -1, 82, -1, -1|
|
||||
49, 31, 28, -1, 62, -1, -1, 74, 34, 82, 14, -1, -1, -1, -1, 0, 40, 62, 56, 10|
|
||||
71, 93, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, 31, 56, -1, -1, 0, -1, -1, -1|
|
||||
71, 79, 3, 80, 6, 43, -1, -1, -1, -1, -1, 18, 42, 71, 50, -1, 7, 0, -1, -1|
|
||||
-1, -1, -1, -1, 96, 3, -1, -1, 25, -1, -1, -1, -1, -1, 47, -1, -1, -1, 0, 98|
|
||||
37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 87, -1, -1, 78, -1, -1, 2, 0|];
|
5
data/mznc2019/kidney-exchange/3_20_0.40_3.meta
Normal file
5
data/mznc2019/kidney-exchange/3_20_0.40_3.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=ccmcp.mzn
|
||||
DATA=3_20_0.40_3.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,kidney-exchange
|
||||
TIMELIMIT=1200
|
27
data/mznc2019/kidney-exchange/3_25_0.20_3.dzn
Normal file
27
data/mznc2019/kidney-exchange/3_25_0.20_3.dzn
Normal file
@ -0,0 +1,27 @@
|
||||
K = 3;
|
||||
V = 25;
|
||||
edge_weight = [|0, -1, -1, -1, -1, -1, 18, -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, 0, -1, -1, -1, 19, -1, -1, -1, 36, 57, 67, -1, 75, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
42, -1, 0, -1, -1, -1, -1, 39, 63, 74, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, 85, -1, -1, -1, -1|
|
||||
-1, -1, 58, 0, 63, -1, -1, 69, -1, -1, -1, 77, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, 30, -1|
|
||||
-1, -1, -1, -1, 0, -1, 84, -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, 32|
|
||||
-1, 6, -1, -1, -1, 0, -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, 65, -1, -1, 66, -1|
|
||||
-1, -1, -1, -1, -1, 35, 0, -1, -1, 90, -1, -1, 60, -1, -1, 1, -1, -1, -1, 40, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, 0, 13, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, 53, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, 64, -1, -1, 96|
|
||||
-1, 26, -1, -1, 18, -1, -1, -1, -1, 0, -1, -1, -1, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, 59, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, 8, 17|
|
||||
89, 72, -1, -1, -1, -1, 56, 71, 21, 99, -1, 0, 45, -1, -1, -1, -1, -1, -1, -1, 55, 4, -1, -1, -1|
|
||||
-1, 51, 64, -1, -1, -1, 23, 56, -1, -1, -1, -1, 0, -1, 65, 21, -1, -1, -1, -1, -1, -1, -1, -1, 64|
|
||||
-1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, 0, 15, -1, 9, 72, -1, 38, -1, -1, -1, -1, -1|
|
||||
-1, -1, 86, -1, -1, -1, -1, -1, -1, -1, 40, 58, -1, 5, 0, 95, -1, 77, -1, -1, -1, -1, -1, -1, -1|
|
||||
-1, -1, -1, 47, 4, -1, -1, -1, -1, -1, 26, -1, 32, -1, -1, 0, -1, -1, -1, -1, -1, 22, -1, -1, 36|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, 44, -1, -1, 0, -1, -1, -1, -1, -1, 74, -1, -1|
|
||||
-1, 17, -1, -1, -1, -1, -1, -1, 88, 19, -1, -1, -1, -1, -1, -1, 72, 0, 15, 87, -1, 90, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 92, -1, 78, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, 34, -1, -1, 14, -1, 13, -1, 5, -1, -1, 97, -1, -1, -1, 0, -1, 5, -1, -1, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, 37, 0, -1, -1, 36, 81|
|
||||
100, -1, -1, -1, 2, -1, 25, -1, -1, 93, 94, -1, -1, -1, -1, -1, -1, 27, -1, 32, -1, 0, -1, -1, -1|
|
||||
66, -1, -1, 76, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 24, -1|
|
||||
-1, -1, 13, -1, -1, 84, -1, 72, 43, -1, -1, 29, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, 0, -1|
|
||||
-1, -1, -1, -1, -1, -1, -1, 31, -1, -1, 52, -1, -1, 8, -1, -1, -1, -1, -1, 49, -1, -1, 44, -1, 0|];
|
5
data/mznc2019/kidney-exchange/3_25_0.20_3.meta
Normal file
5
data/mznc2019/kidney-exchange/3_25_0.20_3.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=ccmcp.mzn
|
||||
DATA=3_25_0.20_3.dzn
|
||||
METHOD=max
|
||||
TAGS=challenge2019,kidney-exchange
|
||||
TIMELIMIT=1200
|
60
data/mznc2019/kidney-exchange/ccmcp.mzn
Normal file
60
data/mznc2019/kidney-exchange/ccmcp.mzn
Normal file
@ -0,0 +1,60 @@
|
||||
% Cardinality-constrained Multi-cycle Problem (CCMCP)
|
||||
%
|
||||
% This problem appears as one of the main optimization problems modelling
|
||||
% kidney exchange. The problem consists of the prize-collecting assignment
|
||||
% problem and an addition constraint stipulating that each subtour in the graph
|
||||
% has a maximum length K. If K = 2 or K = infinity, the problem is
|
||||
% polynomially-solvable. Otherwise, it is NP-hard.
|
||||
%
|
||||
% Further details on the problem can be found in:
|
||||
% On the kidney exchange problem: cardinality constrained cycle and chain
|
||||
% problems on directed graphs: a survey of integer programming approaches.
|
||||
% Vicky Mak-Hau, J Comb Optim (2017) 33:35–59
|
||||
%
|
||||
% Edward Lam <edward.lam@monash.edu>
|
||||
% Vicky Mak-Hau <vicky.mak@deakin.edu.au>
|
||||
|
||||
include "globals.mzn";
|
||||
|
||||
int: V; % Number of vertices
|
||||
int: K; % Maximum length of each subtour
|
||||
|
||||
set of int: VERTICES = 1..V; % Set of vertices
|
||||
array[VERTICES,VERTICES] of int: edge_weight; % Weight of each edge
|
||||
|
||||
array[VERTICES] of var VERTICES: succ; % Successor variable indicating next vertex in the cycle
|
||||
array[VERTICES] of var VERTICES: cycle; % Index of a cycle
|
||||
|
||||
int: obj_ub = sum(i in VERTICES)(max(j in VERTICES)(edge_weight[i,j]));
|
||||
var 0..obj_ub: objective; % Objective variable
|
||||
|
||||
% Check
|
||||
constraint forall(i in VERTICES)(assert(edge_weight[i,i] == 0, "Loop must have zero cost"));
|
||||
|
||||
% Path in a cycle
|
||||
constraint alldifferent(succ); % Out-degree of two
|
||||
constraint forall(i in VERTICES)(cycle[i] == cycle[succ[i]]); % Connectivity
|
||||
constraint forall(i in VERTICES, j in VERTICES where i != j)(edge_weight[i,j] < 0 -> succ[i] != j); % Disable infeasible edges
|
||||
|
||||
% Maximum cycle length
|
||||
constraint bin_packing(K, cycle, [1 | i in VERTICES]);
|
||||
|
||||
% Objective function
|
||||
constraint objective = sum(i in VERTICES)(edge_weight[i,succ[i]]);
|
||||
|
||||
% Symmetry-breaking
|
||||
constraint symmetry_breaking_constraint(seq_precede_chain(cycle));
|
||||
|
||||
% Search strategy
|
||||
solve
|
||||
:: seq_search([
|
||||
int_search(succ, first_fail, indomain_median, complete)
|
||||
])
|
||||
maximize objective;
|
||||
|
||||
% Output
|
||||
output [
|
||||
"succ = array1d(1..\(V), \(succ));\n",
|
||||
"cycle = array1d(1..\(V), \(cycle));\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
1557
data/mznc2019/liner-sf-repositioning/fm3_0.mzn
Normal file
1557
data/mznc2019/liner-sf-repositioning/fm3_0.mzn
Normal file
File diff suppressed because it is too large
Load Diff
2621
data/mznc2019/liner-sf-repositioning/fm3_3.mzn
Normal file
2621
data/mznc2019/liner-sf-repositioning/fm3_3.mzn
Normal file
File diff suppressed because it is too large
Load Diff
6396
data/mznc2019/liner-sf-repositioning/tp7_12.mzn
Normal file
6396
data/mznc2019/liner-sf-repositioning/tp7_12.mzn
Normal file
File diff suppressed because it is too large
Load Diff
3645
data/mznc2019/liner-sf-repositioning/tp7_2.mzn
Normal file
3645
data/mznc2019/liner-sf-repositioning/tp7_2.mzn
Normal file
File diff suppressed because it is too large
Load Diff
1912
data/mznc2019/liner-sf-repositioning/tp7_4.mzn
Normal file
1912
data/mznc2019/liner-sf-repositioning/tp7_4.mzn
Normal file
File diff suppressed because it is too large
Load Diff
187
data/mznc2019/lot-sizing/lot_sizing_cp.mzn
Normal file
187
data/mznc2019/lot-sizing/lot_sizing_cp.mzn
Normal file
@ -0,0 +1,187 @@
|
||||
% ===============================================================================
|
||||
% Discrete Lot Sizing problem, CP MODEL
|
||||
%
|
||||
% CSPlib Problem 58: http://www.csplib.org/Problems/prob058/
|
||||
% MIT License
|
||||
%
|
||||
% Copyright (c) 2019 Andrea Rendl-Pitrey, Satalia
|
||||
%
|
||||
% Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
% of this software and associated documentation files (the "Software"), to deal
|
||||
% in the Software without restriction, including without limitation the rights
|
||||
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
% copies of the Software, and to permit persons to whom the Software is
|
||||
% furnished to do so, subject to the following conditions:
|
||||
%
|
||||
% The above copyright notice and this permission notice shall be included in all
|
||||
% copies or substantial portions of the Software.
|
||||
%
|
||||
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
% SOFTWARE.
|
||||
%
|
||||
% Andrea Rendl, July 2019
|
||||
% ===============================================================================
|
||||
|
||||
include "global_cardinality.mzn";
|
||||
include "alldifferent.mzn"; % for redundant constraint-1
|
||||
include "at_least.mzn"; % for redundant constraint-2
|
||||
include "at_most.mzn"; % for redundant constraint-2
|
||||
|
||||
int: nb_item_types; % different item types to produce
|
||||
int: nb_orders; % the total number of orders
|
||||
constraint
|
||||
assert(nb_item_types <= nb_orders,
|
||||
"The number of item types must be greater or equal to the number of total orders.", true);
|
||||
int: nb_periods; % time periods available
|
||||
|
||||
% cost for inventory for one period of time
|
||||
int: inventory_cost;
|
||||
|
||||
set of int: Orders = 1..nb_orders;
|
||||
set of int: Orders0 = 0..nb_orders;
|
||||
set of int: Periods = 1..nb_periods;
|
||||
set of int: Items = 1..nb_item_types;
|
||||
set of int: Items0 = 0..nb_item_types;
|
||||
|
||||
% the due date of each order
|
||||
array[Orders] of Periods: due_period;
|
||||
% the cost of changing from item i to item j
|
||||
array[Orders0, Orders0] of int: change_cost;
|
||||
% the number of orders for the item type
|
||||
array[Items] of int: nb_of_orders;
|
||||
% maps each order to its item type
|
||||
array[Orders0] of Items0: item_type;
|
||||
|
||||
% =============== VARIABLES =====================================================
|
||||
|
||||
% The sequence of orders that are produced
|
||||
array[Periods] of var Orders0: production_by_order;
|
||||
% For each order, the time period in which it is produced
|
||||
array[Orders] of var Periods: production_period;
|
||||
% the inventory periods that are required for the production plan
|
||||
% (i.e. the number of periods the order is completed before the due date)
|
||||
array[Orders] of var 0..max(due_period): inventory_periods;
|
||||
% the change cost for changing the machine setup from period p to p+1
|
||||
array[1..nb_periods-1] of var 0..max(change_cost): change_cost_for_period;
|
||||
% the order in which orders are produced
|
||||
array[Periods] of var Orders0: production_order;
|
||||
|
||||
% =============== CONSTRAINTS ===================================================
|
||||
|
||||
% sets the number of times each order has to appear in the production plan
|
||||
% each order has to be produced exactly once.
|
||||
constraint
|
||||
global_cardinality(production_by_order,
|
||||
[ value | value in Orders0],
|
||||
[
|
||||
if order == 0
|
||||
then nb_periods - nb_orders
|
||||
else
|
||||
1
|
||||
endif
|
||||
| order in Orders0]);
|
||||
|
||||
% Don't produce the order AFTER its due date
|
||||
constraint
|
||||
forall (order in Orders) (
|
||||
forall (period in Periods where due_period[order] < period) (
|
||||
production_by_order[period] != order
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
% Linking the production_period variables with the main order variables
|
||||
constraint
|
||||
forall (order in Orders) (
|
||||
production_by_order[production_period[order]] = order
|
||||
);
|
||||
% redundant constraint-1
|
||||
constraint redundant_constraint(alldifferent(production_period));
|
||||
|
||||
|
||||
% sets the number of periods that inventory is necessary for each order
|
||||
constraint
|
||||
forall(order in Orders) (
|
||||
inventory_periods[order] = due_period[order] - production_period[order]
|
||||
);
|
||||
|
||||
|
||||
% set "production_order" to the order in which items are produced. We will use this variables
|
||||
% to impose the change_cost constraints
|
||||
constraint
|
||||
production_order[1] = production_by_order[1];
|
||||
constraint
|
||||
forall (p in 2..nb_periods) (
|
||||
if production_by_order[p] == 0 then
|
||||
production_order[p] = production_order[p-1]
|
||||
else
|
||||
production_order[p] = production_by_order[p]
|
||||
endif
|
||||
)
|
||||
;
|
||||
% redundant constraints-2 (sometimes they improve performance, sometimes not)
|
||||
constraint
|
||||
forall(o in Orders) (
|
||||
redundant_constraint(at_least(1, production_order, o)) /\
|
||||
redundant_constraint(at_most(1 + (nb_periods - nb_orders), production_order, o))
|
||||
);
|
||||
|
||||
|
||||
% the change cost is applied when changing from one item type to another
|
||||
constraint
|
||||
forall (p in 1..nb_periods-1) (
|
||||
change_cost_for_period[p] = change_cost[production_order[p], production_order[p+1]]
|
||||
);
|
||||
|
||||
|
||||
% breaking symmetry: complete orders of same type in a fixed order (the ones first are produced first)
|
||||
constraint
|
||||
forall(item_type in Items) (
|
||||
symmetry_breaking_constraint(
|
||||
if nb_of_orders[item_type] > 1 then
|
||||
forall(k in 1..(nb_of_orders[item_type]-1)) (
|
||||
production_period[order_number(item_type, k)] < production_period[order_number(item_type, k+1)]
|
||||
)
|
||||
else true
|
||||
endif
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
% returns the order number of the k-th order of item_type
|
||||
function int: order_number(Items: item_type, int: k) =
|
||||
if item_type == 1
|
||||
then k
|
||||
else
|
||||
sum( [ nb_of_orders[item] | item in 1..item_type-1 ]) + k
|
||||
endif;
|
||||
|
||||
|
||||
% =============== OBJECTIVE =====================================================
|
||||
|
||||
int: upper_bound = max(change_cost)*nb_orders + inventory_cost*(nb_orders*nb_periods);
|
||||
var 0..upper_bound: objective;
|
||||
|
||||
% the objective is the sum of the total change costs and the total inventory costs
|
||||
constraint
|
||||
objective = sum(p in 1..nb_periods-1) (change_cost_for_period[p])
|
||||
+ sum(o in Orders) (inventory_periods[o]) * inventory_cost;
|
||||
|
||||
solve :: seq_search(
|
||||
[int_search(production_by_order, first_fail, indomain_median, complete),
|
||||
int_search(inventory_periods, first_fail, indomain_min, complete)])
|
||||
minimize objective;
|
||||
|
||||
% Output
|
||||
|
||||
output [
|
||||
"production_by_order = \(production_by_order);\n",
|
||||
"inventory_periods = \(inventory_periods);\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
||||
|
35
data/mznc2019/lot-sizing/pigment15a.psp.dzn
Normal file
35
data/mznc2019/lot-sizing/pigment15a.psp.dzn
Normal file
@ -0,0 +1,35 @@
|
||||
% Automatically generated DZN file for Lot Sizing Problem
|
||||
|
||||
nb_item_types = 5;
|
||||
nb_orders = 14;
|
||||
nb_periods = 15;
|
||||
inventory_cost = 10;
|
||||
|
||||
% item-type-1: order-1, order-2,
|
||||
% item-type-2: order-3, order-4, order-5,
|
||||
% item-type-3: order-6, order-7, order-8,
|
||||
% item-type-4: order-9, order-10, order-11,
|
||||
% item-type-5: order-12, order-13, order-14,
|
||||
|
||||
due_period = [ 8, 14, 5, 12, 15, 7, 12, 14, 8, 11, 15, 9, 12, 15, ];
|
||||
change_cost = array2d(Orders0, Orders0, [
|
||||
% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0
|
||||
0, 0, 0, 105, 105, 105, 154, 154, 154, 130, 130, 130, 100, 100, 100, % o1
|
||||
0, 0, 0, 105, 105, 105, 154, 154, 154, 130, 130, 130, 100, 100, 100, % o2
|
||||
0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o3
|
||||
0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o4
|
||||
0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o5
|
||||
0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o6
|
||||
0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o7
|
||||
0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o8
|
||||
0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o9
|
||||
0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o10
|
||||
0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o11
|
||||
0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o12
|
||||
0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o13
|
||||
0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o14
|
||||
]);
|
||||
|
||||
nb_of_orders = [2, 3, 3, 3, 3, ];
|
||||
item_type = array1d(Orders0, [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, ]);
|
5
data/mznc2019/lot-sizing/pigment15a.psp.meta
Normal file
5
data/mznc2019/lot-sizing/pigment15a.psp.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=lot_sizing_cp.mzn
|
||||
DATA=pigment15a.psp.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,lot-sizing
|
||||
TIMELIMIT=1200
|
38
data/mznc2019/lot-sizing/pigment15d.psp.dzn
Normal file
38
data/mznc2019/lot-sizing/pigment15d.psp.dzn
Normal file
@ -0,0 +1,38 @@
|
||||
% Automatically generated DZN file for Lot Sizing Problem
|
||||
|
||||
nb_item_types = 10;
|
||||
nb_orders = 12;
|
||||
nb_periods = 15;
|
||||
inventory_cost = 10;
|
||||
|
||||
% item-type-1: order-1, order-2,
|
||||
% item-type-2: order-3,
|
||||
% item-type-3: order-4,
|
||||
% item-type-4: order-5, order-6,
|
||||
% item-type-5: order-7,
|
||||
% item-type-6: order-8,
|
||||
% item-type-7: order-9,
|
||||
% item-type-8: order-10,
|
||||
% item-type-9: order-11,
|
||||
% item-type-10: order-12,
|
||||
|
||||
due_period = [ 13, 15, 14, 15, 11, 14, 13, 13, 15, 7, 15, 14, ];
|
||||
change_cost = array2d(Orders0, Orders0, [
|
||||
% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0
|
||||
0, 0, 0, 131, 109, 191, 191, 193, 107, 124, 138, 107, 179, % o1
|
||||
0, 0, 0, 131, 109, 191, 191, 193, 107, 124, 138, 107, 179, % o2
|
||||
0, 193, 193, 0, 175, 110, 110, 187, 169, 120, 153, 162, 119, % o3
|
||||
0, 101, 101, 136, 0, 170, 170, 116, 195, 154, 160, 173, 165, % o4
|
||||
0, 187, 187, 110, 175, 0, 0, 134, 150, 175, 150, 183, 124, % o5
|
||||
0, 187, 187, 110, 175, 0, 0, 134, 150, 175, 150, 183, 124, % o6
|
||||
0, 157, 157, 102, 156, 181, 181, 0, 130, 178, 170, 131, 141, % o7
|
||||
0, 130, 130, 151, 161, 157, 157, 196, 0, 138, 184, 112, 107, % o8
|
||||
0, 170, 170, 110, 174, 154, 154, 114, 196, 0, 165, 192, 175, % o9
|
||||
0, 110, 110, 121, 136, 162, 162, 195, 117, 139, 0, 190, 103, % o10
|
||||
0, 165, 165, 178, 125, 126, 126, 111, 175, 119, 193, 0, 180, % o11
|
||||
0, 144, 144, 192, 168, 172, 172, 184, 184, 191, 150, 113, 0, % o12
|
||||
]);
|
||||
|
||||
nb_of_orders = [2, 1, 1, 2, 1, 1, 1, 1, 1, 1, ];
|
||||
item_type = array1d(Orders0, [0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, ]);
|
5
data/mznc2019/lot-sizing/pigment15d.psp.meta
Normal file
5
data/mznc2019/lot-sizing/pigment15d.psp.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=lot_sizing_cp.mzn
|
||||
DATA=pigment15d.psp.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,lot-sizing
|
||||
TIMELIMIT=1200
|
38
data/mznc2019/lot-sizing/pigment20a.psp.dzn
Normal file
38
data/mznc2019/lot-sizing/pigment20a.psp.dzn
Normal file
@ -0,0 +1,38 @@
|
||||
% Automatically generated DZN file for Lot Sizing Problem
|
||||
|
||||
nb_item_types = 5;
|
||||
nb_orders = 17;
|
||||
nb_periods = 20;
|
||||
inventory_cost = 10;
|
||||
|
||||
% item-type-1: order-1, order-2, order-3,
|
||||
% item-type-2: order-4, order-5,
|
||||
% item-type-3: order-6, order-7, order-8, order-9,
|
||||
% item-type-4: order-10, order-11, order-12, order-13, order-14,
|
||||
% item-type-5: order-15, order-16, order-17,
|
||||
|
||||
due_period = [ 12, 13, 17, 15, 18, 4, 6, 9, 13, 4, 9, 12, 19, 20, 10, 11, 18, ];
|
||||
change_cost = array2d(Orders0, Orders0, [
|
||||
% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0
|
||||
0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o1
|
||||
0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o2
|
||||
0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o3
|
||||
0, 112, 112, 112, 0, 0, 163, 163, 163, 163, 188, 188, 188, 188, 188, 102, 102, 102, % o4
|
||||
0, 112, 112, 112, 0, 0, 163, 163, 163, 163, 188, 188, 188, 188, 188, 102, 102, 102, % o5
|
||||
0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o6
|
||||
0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o7
|
||||
0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o8
|
||||
0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o9
|
||||
0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o10
|
||||
0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o11
|
||||
0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o12
|
||||
0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o13
|
||||
0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o14
|
||||
0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o15
|
||||
0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o16
|
||||
0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o17
|
||||
]);
|
||||
|
||||
nb_of_orders = [3, 2, 4, 5, 3, ];
|
||||
item_type = array1d(Orders0, [0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, ]);
|
5
data/mznc2019/lot-sizing/pigment20a.psp.meta
Normal file
5
data/mznc2019/lot-sizing/pigment20a.psp.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=lot_sizing_cp.mzn
|
||||
DATA=pigment20a.psp.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,lot-sizing
|
||||
TIMELIMIT=1200
|
45
data/mznc2019/lot-sizing/pigment20c.psp.dzn
Normal file
45
data/mznc2019/lot-sizing/pigment20c.psp.dzn
Normal file
@ -0,0 +1,45 @@
|
||||
% Automatically generated DZN file for Lot Sizing Problem
|
||||
|
||||
nb_item_types = 10;
|
||||
nb_orders = 19;
|
||||
nb_periods = 20;
|
||||
inventory_cost = 10;
|
||||
|
||||
% item-type-1: order-1, order-2,
|
||||
% item-type-2: order-3, order-4,
|
||||
% item-type-3: order-5, order-6,
|
||||
% item-type-4: order-7,
|
||||
% item-type-5: order-8, order-9,
|
||||
% item-type-6: order-10, order-11,
|
||||
% item-type-7: order-12, order-13,
|
||||
% item-type-8: order-14, order-15,
|
||||
% item-type-9: order-16, order-17,
|
||||
% item-type-10: order-18, order-19,
|
||||
|
||||
due_period = [ 9, 11, 5, 14, 15, 20, 13, 10, 18, 11, 13, 10, 20, 12, 15, 8, 17, 11, 13, ];
|
||||
change_cost = array2d(Orders0, Orders0, [
|
||||
% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 o18 o19
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0
|
||||
0, 0, 0, 151, 151, 175, 175, 115, 184, 184, 110, 110, 187, 187, 182, 182, 127, 127, 172, 172, % o1
|
||||
0, 0, 0, 151, 151, 175, 175, 115, 184, 184, 110, 110, 187, 187, 182, 182, 127, 127, 172, 172, % o2
|
||||
0, 175, 175, 0, 0, 125, 125, 119, 156, 156, 198, 198, 132, 132, 145, 145, 125, 125, 126, 126, % o3
|
||||
0, 175, 175, 0, 0, 125, 125, 119, 156, 156, 198, 198, 132, 132, 145, 145, 125, 125, 126, 126, % o4
|
||||
0, 192, 192, 101, 101, 0, 0, 102, 130, 130, 163, 163, 137, 137, 161, 161, 193, 193, 108, 108, % o5
|
||||
0, 192, 192, 101, 101, 0, 0, 102, 130, 130, 163, 163, 137, 137, 161, 161, 193, 193, 108, 108, % o6
|
||||
0, 195, 195, 163, 163, 115, 115, 0, 178, 178, 130, 130, 121, 121, 158, 158, 114, 114, 125, 125, % o7
|
||||
0, 131, 131, 151, 151, 150, 150, 184, 0, 0, 145, 145, 143, 143, 140, 140, 140, 140, 131, 131, % o8
|
||||
0, 131, 131, 151, 151, 150, 150, 184, 0, 0, 145, 145, 143, 143, 140, 140, 140, 140, 131, 131, % o9
|
||||
0, 194, 194, 171, 171, 117, 117, 131, 131, 131, 0, 0, 166, 166, 122, 122, 119, 119, 173, 173, % o10
|
||||
0, 194, 194, 171, 171, 117, 117, 131, 131, 131, 0, 0, 166, 166, 122, 122, 119, 119, 173, 173, % o11
|
||||
0, 151, 151, 166, 166, 156, 156, 197, 100, 100, 110, 110, 0, 0, 117, 117, 148, 148, 152, 152, % o12
|
||||
0, 151, 151, 166, 166, 156, 156, 197, 100, 100, 110, 110, 0, 0, 117, 117, 148, 148, 152, 152, % o13
|
||||
0, 112, 112, 109, 109, 186, 186, 172, 167, 167, 128, 128, 102, 102, 0, 0, 114, 114, 189, 189, % o14
|
||||
0, 112, 112, 109, 109, 186, 186, 172, 167, 167, 128, 128, 102, 102, 0, 0, 114, 114, 189, 189, % o15
|
||||
0, 134, 134, 109, 109, 136, 136, 166, 142, 142, 186, 186, 130, 130, 142, 142, 0, 0, 118, 118, % o16
|
||||
0, 134, 134, 109, 109, 136, 136, 166, 142, 142, 186, 186, 130, 130, 142, 142, 0, 0, 118, 118, % o17
|
||||
0, 154, 154, 194, 194, 186, 186, 112, 149, 149, 184, 184, 195, 195, 132, 132, 133, 133, 0, 0, % o18
|
||||
0, 154, 154, 194, 194, 186, 186, 112, 149, 149, 184, 184, 195, 195, 132, 132, 133, 133, 0, 0, % o19
|
||||
]);
|
||||
|
||||
nb_of_orders = [2, 2, 2, 1, 2, 2, 2, 2, 2, 2, ];
|
||||
item_type = array1d(Orders0, [0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, ]);
|
5
data/mznc2019/lot-sizing/pigment20c.psp.meta
Normal file
5
data/mznc2019/lot-sizing/pigment20c.psp.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=lot_sizing_cp.mzn
|
||||
DATA=pigment20c.psp.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,lot-sizing
|
||||
TIMELIMIT=1200
|
37
data/mznc2019/lot-sizing/pigment30b.psp.dzn
Normal file
37
data/mznc2019/lot-sizing/pigment30b.psp.dzn
Normal file
@ -0,0 +1,37 @@
|
||||
% Automatically generated DZN file for Lot Sizing Problem
|
||||
|
||||
nb_item_types = 10;
|
||||
nb_orders = 11;
|
||||
nb_periods = 30;
|
||||
inventory_cost = 10;
|
||||
|
||||
% item-type-1: order-1,
|
||||
% item-type-2: order-2,
|
||||
% item-type-3: order-3,
|
||||
% item-type-4: order-4,
|
||||
% item-type-5:
|
||||
% item-type-6: order-5,
|
||||
% item-type-7: order-6,
|
||||
% item-type-8: order-7, order-8,
|
||||
% item-type-9: order-9,
|
||||
% item-type-10: order-10, order-11,
|
||||
|
||||
due_period = [ 30, 28, 29, 29, 28, 10, 27, 30, 15, 14, 30, ];
|
||||
change_cost = array2d(Orders0, Orders0, [
|
||||
% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0
|
||||
0, 0, 196, 179, 146, 185, 191, 153, 153, 182, 170, 170, % o1
|
||||
0, 182, 0, 121, 135, 163, 118, 140, 140, 198, 155, 155, % o2
|
||||
0, 180, 138, 0, 146, 108, 160, 148, 148, 127, 185, 185, % o3
|
||||
0, 133, 112, 185, 0, 120, 180, 125, 125, 128, 164, 164, % o4
|
||||
0, 168, 184, 169, 181, 0, 193, 160, 160, 162, 154, 154, % o5
|
||||
0, 143, 127, 140, 115, 125, 0, 121, 121, 198, 104, 104, % o6
|
||||
0, 122, 191, 143, 197, 120, 155, 0, 0, 195, 161, 161, % o7
|
||||
0, 122, 191, 143, 197, 120, 155, 0, 0, 195, 161, 161, % o8
|
||||
0, 172, 108, 134, 159, 100, 163, 141, 141, 0, 192, 192, % o9
|
||||
0, 168, 100, 120, 194, 168, 126, 159, 159, 142, 0, 0, % o10
|
||||
0, 168, 100, 120, 194, 168, 126, 159, 159, 142, 0, 0, % o11
|
||||
]);
|
||||
|
||||
nb_of_orders = [1, 1, 1, 1, 0, 1, 1, 2, 1, 2, ];
|
||||
item_type = array1d(Orders0, [0, 1, 2, 3, 4, 6, 7, 8, 8, 9, 10, 10, ]);
|
5
data/mznc2019/lot-sizing/pigment30b.psp.meta
Normal file
5
data/mznc2019/lot-sizing/pigment30b.psp.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=lot_sizing_cp.mzn
|
||||
DATA=pigment30b.psp.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,lot-sizing
|
||||
TIMELIMIT=1200
|
81
data/mznc2019/median-string/median_string_dp.mzn
Normal file
81
data/mznc2019/median-string/median_string_dp.mzn
Normal file
@ -0,0 +1,81 @@
|
||||
%------------------------------------------------------------------------------
|
||||
% Parameters
|
||||
|
||||
int: num_strings;
|
||||
int: max_length_strings;
|
||||
int: max_char;
|
||||
|
||||
int: max_length_median;
|
||||
|
||||
array [1..num_strings, 1..max_length_strings] of int: strings;
|
||||
array [1..num_strings] of int: str_length;
|
||||
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Variables
|
||||
|
||||
array [1..max_length_strings] of var 0..max_char: median;
|
||||
array [1..num_strings] of var 0..2*max_length_strings: distances;
|
||||
|
||||
int: obj_ub = num_strings * 2 * max_length_strings;
|
||||
var 0..obj_ub: objective;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Predicates
|
||||
|
||||
predicate lcs_global(array[int] of var int: S1, array[int] of var int: S2, var int: ED) =
|
||||
|
||||
let { int: l1 = min(index_set(S1)) - 1;
|
||||
int: l2 = min(index_set(S2)) - 1;
|
||||
int: u1 = max(index_set(S1));
|
||||
int: u2 = max(index_set(S2));
|
||||
array[l1..u1,l2..u2] of var 0..u1+u2: T; } in
|
||||
T[l1,l2] = 0 /\
|
||||
T[u1,u2] = ED /\
|
||||
forall(i in l1+1..u1, j in l2+1..u2)
|
||||
(T[i,j] >= 0 /\ T[i,j] <= i+j) /\
|
||||
forall(j in l2+1..u2)(T[l1,j] = j-l2) /\
|
||||
forall(i in l1+1..u1)(T[i,l2] = i-l1) /\
|
||||
forall(i in l1+1..u1, j in l2+1..u2)
|
||||
(T[i,j] = if S1[i] = S2[j] then
|
||||
T[i-1,j-1]
|
||||
else
|
||||
if S1[i] = 0 then
|
||||
T[i-1,j]
|
||||
else
|
||||
if S2[j] = 0 then
|
||||
T[i,j-1]
|
||||
else
|
||||
min([T[i-1,j]+1,T[i,j-1]+1])
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
);
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Constraints
|
||||
|
||||
constraint forall(i in 1..num_strings)(
|
||||
lcs_global([strings[i,j] | j in 1..max_length_strings], median, distances[i])
|
||||
);
|
||||
|
||||
constraint forall(i in max_length_median+1..max_length_strings)(
|
||||
median[i] = 0
|
||||
);
|
||||
|
||||
constraint objective = sum(i in 1..num_strings)(distances[i]);
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Solve item
|
||||
|
||||
solve
|
||||
:: int_search(median, input_order, indomain_min, complete)
|
||||
minimize objective;
|
||||
|
||||
%------------------------------------------------------------------------------
|
||||
% Output
|
||||
|
||||
output [
|
||||
"median = \(median);\n",
|
||||
"objective = \(objective);\n"
|
||||
];
|
6
data/mznc2019/median-string/p1_15_20-1.dzn
Executable file
6
data/mznc2019/median-string/p1_15_20-1.dzn
Executable file
@ -0,0 +1,6 @@
|
||||
num_strings=15;
|
||||
max_length_strings=20;
|
||||
max_length_median=20;
|
||||
max_char=4;
|
||||
strings=[|2,1,2,1,1,1,2,1,2,2,1,1,1,2,1,1,2,2,1,1|2,1,1,1,1,2,1,1,1,2,1,1,2,1,1,2,1,1,2,1|1,1,1,3,1,1,1,1,1,2,1,2,2,2,2,1,1,1,1,1|2,1,2,1,2,1,1,1,2,2,1,2,3,1,1,2,1,1,1,1|1,1,1,1,1,1,1,2,1,1,2,2,1,2,1,1,1,3,2,1|1,1,2,1,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1|1,1,1,2,2,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2|2,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,1|2,1,1,1,1,2,1,1,2,1,1,1,1,1,1,2,2,2,1,1|2,1,2,2,2,1,1,1,1,1,1,1,1,1,1,2,3,1,2,1|1,3,1,2,1,1,3,1,1,1,1,2,1,2,1,1,1,2,1,2|1,1,2,1,3,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1|1,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,2,2,1,3|1,2,1,2,1,1,2,2,3,1,2,1,1,2,1,1,1,1,2,2|2,1,1,2,2,2,1,2,2,1,1,1,2,2,1,1,1,1,2,1|];
|
||||
str_length=[20,20,20,20,20,20,20,20,20,20,20,20,20,20,20];
|
5
data/mznc2019/median-string/p1_15_20-1.meta
Normal file
5
data/mznc2019/median-string/p1_15_20-1.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=median_string_dp.mzn
|
||||
DATA=p1_15_20-1.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,median-string
|
||||
TIMELIMIT=1200
|
6
data/mznc2019/median-string/p2_10_8-0.dzn
Executable file
6
data/mznc2019/median-string/p2_10_8-0.dzn
Executable file
@ -0,0 +1,6 @@
|
||||
num_strings=10;
|
||||
max_length_strings=8;
|
||||
max_length_median=8;
|
||||
max_char=4;
|
||||
strings=[|4,3,4,2,0,0,0,0|2,1,2,4,1,4,0,0|4,0,0,0,0,0,0,0|1,4,3,2,2,3,2,0|3,3,2,3,1,2,0,0|3,0,0,0,0,0,0,0|1,4,3,2,0,0,0,0|1,3,3,3,4,2,3,0|2,1,2,0,0,0,0,0|1,2,3,4,3,0,0,0|];
|
||||
str_length=[4,6,1,7,6,1,4,7,3,5];
|
5
data/mznc2019/median-string/p2_10_8-0.meta
Normal file
5
data/mznc2019/median-string/p2_10_8-0.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=median_string_dp.mzn
|
||||
DATA=p2_10_8-0.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,median-string
|
||||
TIMELIMIT=1200
|
6
data/mznc2019/median-string/p2_10_8-3.dzn
Executable file
6
data/mznc2019/median-string/p2_10_8-3.dzn
Executable file
@ -0,0 +1,6 @@
|
||||
num_strings=10;
|
||||
max_length_strings=8;
|
||||
max_length_median=8;
|
||||
max_char=4;
|
||||
strings=[|3,1,2,3,4,1,1,0|1,4,1,4,1,2,0,0|1,3,1,0,0,0,0,0|3,0,0,0,0,0,0,0|4,3,0,0,0,0,0,0|1,4,4,2,3,0,0,0|4,3,2,2,1,3,1,1|2,0,0,0,0,0,0,0|3,3,2,3,4,3,0,0|2,3,4,1,1,2,2,0|];
|
||||
str_length=[7,6,3,1,2,5,8,1,6,7];
|
5
data/mznc2019/median-string/p2_10_8-3.meta
Normal file
5
data/mznc2019/median-string/p2_10_8-3.meta
Normal file
@ -0,0 +1,5 @@
|
||||
MODEL=median_string_dp.mzn
|
||||
DATA=p2_10_8-3.dzn
|
||||
METHOD=min
|
||||
TAGS=challenge2019,median-string
|
||||
TIMELIMIT=1200
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user