Files
ortools-clone/examples/flatzinc/debruijn2d_2.fzn

141 lines
17 KiB
MiniZinc

predicate fzn_all_different_int(array [int] of var int: x);
predicate count(array [int] of var int: x, var int: y, var int: c);
predicate fixed_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, int: b);
predicate global_cardinality(array [int] of var int: x, array [int] of int: cover, array [int] of var int: counts);
predicate maximum_int(var int: m, array [int] of var int: x);
predicate minimum_int(var int: m, array [int] of var int: x);
predicate sliding_sum(int: low, int: up, int: seq, array [int] of var int: vs);
predicate sort(array [int] of var int: x, array [int] of var int: y);
predicate table_bool(array [int] of var bool: x, array [int, int] of bool: t);
predicate table_int(array [int] of var int: x, array [int, int] of int: t);
predicate var_fzn_cumulative(array [int] of var int: s, array [int] of int: d, array [int] of int: r, var int: b);
array [1..121] of var 0..8: x :: output_array([0..10, 0..10]);
array [1..81] of var 0..387420488: y :: output_array([0..80]);
constraint fzn_all_different_int(y);
constraint int_eq(x[10], x[1]);
constraint int_eq(x[11], x[2]);
constraint int_eq(x[21], x[12]);
constraint int_eq(x[22], x[13]);
constraint int_eq(x[32], x[23]);
constraint int_eq(x[33], x[24]);
constraint int_eq(x[43], x[34]);
constraint int_eq(x[44], x[35]);
constraint int_eq(x[54], x[45]);
constraint int_eq(x[55], x[46]);
constraint int_eq(x[65], x[56]);
constraint int_eq(x[66], x[57]);
constraint int_eq(x[76], x[67]);
constraint int_eq(x[77], x[68]);
constraint int_eq(x[87], x[78]);
constraint int_eq(x[88], x[79]);
constraint int_eq(x[98], x[89]);
constraint int_eq(x[99], x[90]);
constraint int_eq(x[100], x[1]);
constraint int_eq(x[101], x[2]);
constraint int_eq(x[102], x[3]);
constraint int_eq(x[103], x[4]);
constraint int_eq(x[104], x[5]);
constraint int_eq(x[105], x[6]);
constraint int_eq(x[106], x[7]);
constraint int_eq(x[107], x[8]);
constraint int_eq(x[108], x[9]);
constraint int_eq(x[109], x[10]);
constraint int_eq(x[109], x[100]);
constraint int_eq(x[110], x[11]);
constraint int_eq(x[110], x[101]);
constraint int_eq(x[111], x[12]);
constraint int_eq(x[112], x[13]);
constraint int_eq(x[113], x[14]);
constraint int_eq(x[114], x[15]);
constraint int_eq(x[115], x[16]);
constraint int_eq(x[116], x[17]);
constraint int_eq(x[117], x[18]);
constraint int_eq(x[118], x[19]);
constraint int_eq(x[119], x[20]);
constraint int_eq(x[120], x[21]);
constraint int_eq(x[120], x[111]);
constraint int_eq(x[121], x[22]);
constraint int_eq(x[121], x[112]);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[1], x[2], x[3], x[12], x[13], x[14], x[23], x[24], x[25], y[1]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[2], x[3], x[4], x[13], x[14], x[15], x[24], x[25], x[26], y[2]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[3], x[4], x[5], x[14], x[15], x[16], x[25], x[26], x[27], y[3]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[4], x[5], x[6], x[15], x[16], x[17], x[26], x[27], x[28], y[4]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[5], x[6], x[7], x[16], x[17], x[18], x[27], x[28], x[29], y[5]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[6], x[7], x[8], x[17], x[18], x[19], x[28], x[29], x[30], y[6]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[7], x[8], x[9], x[18], x[19], x[20], x[29], x[30], x[31], y[7]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[8], x[9], x[10], x[19], x[20], x[21], x[30], x[31], x[32], y[8]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[9], x[10], x[11], x[20], x[21], x[22], x[31], x[32], x[33], y[9]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[12], x[13], x[14], x[23], x[24], x[25], x[34], x[35], x[36], y[10]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[13], x[14], x[15], x[24], x[25], x[26], x[35], x[36], x[37], y[11]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[14], x[15], x[16], x[25], x[26], x[27], x[36], x[37], x[38], y[12]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[15], x[16], x[17], x[26], x[27], x[28], x[37], x[38], x[39], y[13]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[16], x[17], x[18], x[27], x[28], x[29], x[38], x[39], x[40], y[14]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[17], x[18], x[19], x[28], x[29], x[30], x[39], x[40], x[41], y[15]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[18], x[19], x[20], x[29], x[30], x[31], x[40], x[41], x[42], y[16]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[19], x[20], x[21], x[30], x[31], x[32], x[41], x[42], x[43], y[17]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[20], x[21], x[22], x[31], x[32], x[33], x[42], x[43], x[44], y[18]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[23], x[24], x[25], x[34], x[35], x[36], x[45], x[46], x[47], y[19]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[24], x[25], x[26], x[35], x[36], x[37], x[46], x[47], x[48], y[20]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[25], x[26], x[27], x[36], x[37], x[38], x[47], x[48], x[49], y[21]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[26], x[27], x[28], x[37], x[38], x[39], x[48], x[49], x[50], y[22]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[27], x[28], x[29], x[38], x[39], x[40], x[49], x[50], x[51], y[23]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[28], x[29], x[30], x[39], x[40], x[41], x[50], x[51], x[52], y[24]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[29], x[30], x[31], x[40], x[41], x[42], x[51], x[52], x[53], y[25]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[30], x[31], x[32], x[41], x[42], x[43], x[52], x[53], x[54], y[26]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[31], x[32], x[33], x[42], x[43], x[44], x[53], x[54], x[55], y[27]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[34], x[35], x[36], x[45], x[46], x[47], x[56], x[57], x[58], y[28]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[35], x[36], x[37], x[46], x[47], x[48], x[57], x[58], x[59], y[29]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[36], x[37], x[38], x[47], x[48], x[49], x[58], x[59], x[60], y[30]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[37], x[38], x[39], x[48], x[49], x[50], x[59], x[60], x[61], y[31]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[38], x[39], x[40], x[49], x[50], x[51], x[60], x[61], x[62], y[32]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[39], x[40], x[41], x[50], x[51], x[52], x[61], x[62], x[63], y[33]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[40], x[41], x[42], x[51], x[52], x[53], x[62], x[63], x[64], y[34]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[41], x[42], x[43], x[52], x[53], x[54], x[63], x[64], x[65], y[35]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[42], x[43], x[44], x[53], x[54], x[55], x[64], x[65], x[66], y[36]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[45], x[46], x[47], x[56], x[57], x[58], x[67], x[68], x[69], y[37]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[46], x[47], x[48], x[57], x[58], x[59], x[68], x[69], x[70], y[38]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[47], x[48], x[49], x[58], x[59], x[60], x[69], x[70], x[71], y[39]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[48], x[49], x[50], x[59], x[60], x[61], x[70], x[71], x[72], y[40]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[49], x[50], x[51], x[60], x[61], x[62], x[71], x[72], x[73], y[41]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[50], x[51], x[52], x[61], x[62], x[63], x[72], x[73], x[74], y[42]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[51], x[52], x[53], x[62], x[63], x[64], x[73], x[74], x[75], y[43]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[52], x[53], x[54], x[63], x[64], x[65], x[74], x[75], x[76], y[44]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[53], x[54], x[55], x[64], x[65], x[66], x[75], x[76], x[77], y[45]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[56], x[57], x[58], x[67], x[68], x[69], x[78], x[79], x[80], y[46]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[57], x[58], x[59], x[68], x[69], x[70], x[79], x[80], x[81], y[47]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[58], x[59], x[60], x[69], x[70], x[71], x[80], x[81], x[82], y[48]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[59], x[60], x[61], x[70], x[71], x[72], x[81], x[82], x[83], y[49]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[60], x[61], x[62], x[71], x[72], x[73], x[82], x[83], x[84], y[50]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[61], x[62], x[63], x[72], x[73], x[74], x[83], x[84], x[85], y[51]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[62], x[63], x[64], x[73], x[74], x[75], x[84], x[85], x[86], y[52]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[63], x[64], x[65], x[74], x[75], x[76], x[85], x[86], x[87], y[53]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[64], x[65], x[66], x[75], x[76], x[77], x[86], x[87], x[88], y[54]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[67], x[68], x[69], x[78], x[79], x[80], x[89], x[90], x[91], y[55]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[68], x[69], x[70], x[79], x[80], x[81], x[90], x[91], x[92], y[56]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[69], x[70], x[71], x[80], x[81], x[82], x[91], x[92], x[93], y[57]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[70], x[71], x[72], x[81], x[82], x[83], x[92], x[93], x[94], y[58]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[71], x[72], x[73], x[82], x[83], x[84], x[93], x[94], x[95], y[59]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[72], x[73], x[74], x[83], x[84], x[85], x[94], x[95], x[96], y[60]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[73], x[74], x[75], x[84], x[85], x[86], x[95], x[96], x[97], y[61]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[74], x[75], x[76], x[85], x[86], x[87], x[96], x[97], x[98], y[62]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[75], x[76], x[77], x[86], x[87], x[88], x[97], x[98], x[99], y[63]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[78], x[79], x[80], x[89], x[90], x[91], x[100], x[101], x[102], y[64]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[79], x[80], x[81], x[90], x[91], x[92], x[101], x[102], x[103], y[65]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[80], x[81], x[82], x[91], x[92], x[93], x[102], x[103], x[104], y[66]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[81], x[82], x[83], x[92], x[93], x[94], x[103], x[104], x[105], y[67]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[82], x[83], x[84], x[93], x[94], x[95], x[104], x[105], x[106], y[68]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[83], x[84], x[85], x[94], x[95], x[96], x[105], x[106], x[107], y[69]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[84], x[85], x[86], x[95], x[96], x[97], x[106], x[107], x[108], y[70]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[85], x[86], x[87], x[96], x[97], x[98], x[107], x[108], x[109], y[71]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[86], x[87], x[88], x[97], x[98], x[99], x[108], x[109], x[110], y[72]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[89], x[90], x[91], x[100], x[101], x[102], x[111], x[112], x[113], y[73]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[90], x[91], x[92], x[101], x[102], x[103], x[112], x[113], x[114], y[74]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[91], x[92], x[93], x[102], x[103], x[104], x[113], x[114], x[115], y[75]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[92], x[93], x[94], x[103], x[104], x[105], x[114], x[115], x[116], y[76]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[93], x[94], x[95], x[104], x[105], x[106], x[115], x[116], x[117], y[77]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[94], x[95], x[96], x[105], x[106], x[107], x[116], x[117], x[118], y[78]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[95], x[96], x[97], x[106], x[107], x[108], x[117], x[118], x[119], y[79]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[96], x[97], x[98], x[107], x[108], x[109], x[118], x[119], x[120], y[80]], 0);
constraint int_lin_eq([-43046721, -4782969, -531441, -59049, -6561, -729, -81, -9, -1, 1], [x[97], x[98], x[99], x[108], x[109], x[110], x[119], x[120], x[121], y[81]], 0);
solve :: int_search([x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21], x[23], x[24], x[25], x[26], x[27], x[28], x[29], x[30], x[31], x[32], x[34], x[35], x[36], x[37], x[38], x[39], x[40], x[41], x[42], x[43], x[45], x[46], x[47], x[48], x[49], x[50], x[51], x[52], x[53], x[54], x[56], x[57], x[58], x[59], x[60], x[61], x[62], x[63], x[64], x[65], x[67], x[68], x[69], x[70], x[71], x[72], x[73], x[74], x[75], x[76], x[78], x[79], x[80], x[81], x[82], x[83], x[84], x[85], x[86], x[87], x[89], x[90], x[91], x[92], x[93], x[94], x[95], x[96], x[97], x[98], x[100], x[101], x[102], x[103], x[104], x[105], x[106], x[107], x[108], x[109], y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9], y[10], y[11], y[12], y[13], y[14], y[15], y[16], y[17], y[18], y[19], y[20], y[21], y[22], y[23], y[24], y[25], y[26], y[27], y[28], y[29], y[30], y[31], y[32], y[33], y[34], y[35], y[36], y[37], y[38], y[39], y[40], y[41], y[42], y[43], y[44], y[45], y[46], y[47], y[48], y[49], y[50], y[51], y[52], y[53], y[54], y[55], y[56], y[57], y[58], y[59], y[60], y[61], y[62], y[63], y[64], y[65], y[66], y[67], y[68], y[69], y[70], y[71], y[72], y[73], y[74], y[75], y[76], y[77], y[78], y[79], y[80], y[81]], first_fail, indomain_min, complete) satisfy;