this repo has no description
1/***
2!Test
3expected:
4- !Result
5 solution: !Solution
6 inv_f1: [5, 7, 6, 8]
7 inv_f2: [1, 3, 2, 4]
8- !Result
9 solution: !Solution
10 inv_f1: [5, 7, 8, 6]
11 inv_f2: [1, 4, 2, 3]
12***/
13
14include "inverse.mzn";
15
16%-----------------------------------------------------------------------------%
17% inverse
18%-----------------------------------------------------------------------------%
19array[1..4] of var -100..100: inv_f1 :: add_to_output = [5, 7, _, _];
20array[5..8] of var -100..100: inv_f2 :: add_to_output = array1d(5..8, [1, _, 2, _]);
21
22constraint inverse(inv_f1, inv_f2);
23
24solve satisfy;
25
26output [
27 "inv_f1 = array1d(1..4, ", show(inv_f1), ");\n",
28 "inv_f2 = array1d(5..8, ", show(inv_f2), ");\n"
29];