this repo has no description

Complete incremental benchmarks

+168
gbac.py
··· 1 + #!/usr/bin/env python3 2 + import os 3 + import sys 4 + import time 5 + import csv 6 + 7 + MZNR_HOME = os.getcwd() + "/software/install/minizinc/bin" 8 + os.environ["PATH"] = MZNR_HOME + ":" + os.environ["PATH"] 9 + os.environ["MZN_SOLVER_PATH"] = ( 10 + os.getcwd() + "/software/install/gecode/share/minizinc/solvers" 11 + ) 12 + import minizinc 13 + 14 + MZA_HOME = os.getcwd() + "/software/mza" 15 + sys.path.append(MZA_HOME) 16 + 17 + mza_lib = os.getcwd() + "/software/install/mza/lib" 18 + if sys.platform == "linux" or sys.platform == "linux2": 19 + rerun = True 20 + if not "LD_LIBRARY_PATH" in os.environ: 21 + os.environ["LD_LIBRARY_PATH"] = mza_lib 22 + elif not mza_lib in os.environ.get("LD_LIBRARY_PATH"): 23 + os.environ["LD_LIBRARY_PATH"] += ":" + mza_lib 24 + else: 25 + rerun = False 26 + if rerun: 27 + os.execve(os.path.realpath(__file__), sys.argv, os.environ) 28 + 29 + import mza 30 + from mza import Instance 31 + 32 + mza.DEBUG = False 33 + 34 + SOLVER = "gecode_presolver" 35 + PROTO_MODEL = "gbac/proto.uzn" 36 + RESTART_MODEL = "gbac/on_restart.mzn" 37 + DATA = [ 38 + "gbac/reduced_UD4-gbac.dzn", 39 + "gbac/UD2-gbac.dzn", 40 + "gbac/UD4-gbac.dzn", 41 + "gbac/UD5-gbac.dzn", 42 + "gbac/UD8-gbac.dzn", 43 + ] 44 + FN_ID = "f_lex_obj_i" 45 + N_NBH = 2 46 + ROUNDS = 1000 47 + RUNS = 1 48 + 49 + 50 + def gbac_restart(data_file): 51 + os.environ["MZN_STDLIB_DIR"] = ( 52 + os.getcwd() + "/software/install/minizinc/share/minizinc" 53 + ) 54 + gecode = minizinc.Solver.lookup("gecode") 55 + inst = minizinc.Instance(gecode, minizinc.Model(RESTART_MODEL)) 56 + inst.add_file(data_file) 57 + 58 + args = { 59 + "--restart": "constant", 60 + "--restart-scale": 500, 61 + "--restart-limit": ROUNDS, 62 + } 63 + res = inst.solve(**args) 64 + 65 + return ( 66 + res.statistics["flatTime"].total_seconds(), 67 + (res.statistics["initTime"] + res.statistics["solveTime"]).total_seconds(), 68 + ) 69 + 70 + 71 + def gbac_incr(data_file): 72 + os.environ["MZN_STDLIB_DIR"] = os.getcwd() + "/software/mza/share/minizinc" 73 + compile_time = 0.0 74 + solve_time = 0.0 75 + 76 + incumbent = None 77 + start = time.perf_counter() 78 + mza.set_rnd_seed(0) 79 + inst = Instance(PROTO_MODEL, data_file, "gecode_presolver") 80 + compile_time += time.perf_counter() - start 81 + 82 + start = time.perf_counter() 83 + status, sol = inst.solve() 84 + solve_time += time.perf_counter() - start 85 + # print(f"{status}: {sol}") 86 + assert status in ["SAT", "OPT"] 87 + incumbent = sol 88 + for i in range(1, ROUNDS): 89 + mza.set_rnd_seed(i) 90 + inst.set_limit(500) 91 + with inst.branch() as child: 92 + start = time.perf_counter() 93 + child.add_call("f_LNS_i", i % 2) 94 + compile_time += time.perf_counter() - start 95 + 96 + start = time.perf_counter() 97 + status, sol = child.solve() 98 + solve_time += time.perf_counter() - start 99 + # print(f"{status}: {sol}") 100 + if status == "SAT" or status == "OPT": 101 + incumbent = sol 102 + assert status != "ERROR" 103 + return compile_time, solve_time 104 + 105 + 106 + def gbac_redo(data_file): 107 + os.environ["MZN_STDLIB_DIR"] = os.getcwd() + "/software/mza/share/minizinc" 108 + compile_time = 0.0 109 + solve_time = 0.0 110 + 111 + incumbent = None 112 + for i in range(ROUNDS): 113 + start = time.perf_counter() 114 + mza.set_rnd_seed(i) 115 + inst = Instance(PROTO_MODEL, data_file, "gecode_presolver") 116 + inst.output_dict(True) 117 + limit = 0 118 + if i > 0: 119 + inst.set_limit(500) 120 + assert incumbent is not None 121 + limit = 500 122 + inst.set_incumbent(incumbent) 123 + inst.add_call("f_LNS_i", i % 2) 124 + compile_time += time.perf_counter() - start 125 + 126 + start = time.perf_counter() 127 + status, sol = inst.solve() 128 + solve_time += time.perf_counter() - start 129 + # print( 130 + # f"{i} {status}: [{ ', '.join([str(v) for k, v in sol.items()]) if isinstance(sol, dict) else sol}]" 131 + # ) 132 + if status == "SAT" or status == "OPT": 133 + incumbent = sol 134 + elif status == "ERROR": 135 + print("ERROR!!!!") 136 + exit(0) 137 + return compile_time, solve_time 138 + 139 + 140 + if __name__ == "__main__": 141 + fieldnames = ["Configuration", "Data", "Compile Time (s)", "Solve Time (s)"] 142 + writer = csv.writer(sys.stdout) 143 + writer.writerow(fieldnames) 144 + 145 + # --- Run Restart based strategy 146 + for d in DATA: 147 + t1, t2 = 0, 0 148 + for i in range(RUNS): 149 + ct, st = gbac_restart(d) 150 + t1 += ct 151 + t2 += st 152 + writer.writerow(["RBS", d, t1 / RUNS, t2 / RUNS]) 153 + # --- Run incremental rewriting 154 + for d in DATA: 155 + t1, t2 = 0, 0 156 + for i in range(RUNS): 157 + ct, st = gbac_incr(d) 158 + t1 += ct 159 + t2 += st 160 + writer.writerow(["Incr.", d, t1 / RUNS, t2 / RUNS]) 161 + # --- Run baseline 162 + for d in DATA: 163 + t1, t2 = 0, 0 164 + for i in range(RUNS): 165 + ct, st = gbac_redo(d) 166 + t1 += ct * 10 167 + t2 += st * 10 168 + writer.writerow(["Base", d, t1 / RUNS, t2 / RUNS])
+2 -2
gbac/UD2-gbac.dzn
··· 15 15 w2 = 1; 16 16 course_load = [6, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 16, 5, 6, 6, 6, 5, 5, 5, 6, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 7, 7, 5, 5, 7, 7, 7, 5, 5, 5, 6, 6, 6, 5, 7, 7, 5, 5, 7, 7, 6, 6, 7, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 7, 7, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 6, 5, 5, 5, 6, 6, 5, 15, 17, 5, 5, 7, 7, 5, 6, 5, 6, 5, 5, 6, 6, 16, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 5, 5, 5, 6, 5, 5, 6, 6, 2, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 16, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 15, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5] ; 17 17 courses_of = [{267, 268, 35, 39, 40, 45, 46, 47, 48, 49, 53, 189, 61, 62, 67, 103, 104, 105, 107, 108, 110, 115, 123}, {267, 268, 35, 38, 39, 40, 45, 46, 47, 48, 49, 53, 58, 62, 64, 67, 103, 104, 105, 107, 108, 109, 115}, {268, 16, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 190, 191, 79, 98, 99, 103, 106, 115, 117}, {136, 268, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 190, 191, 100, 101, 102, 103, 115, 117}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 147, 19, 22, 23, 24, 25, 31, 160, 186, 213, 215, 238, 111, 112, 239, 240, 241}, {2, 7, 8, 9, 10, 11, 13, 14, 16, 17, 147, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 160, 186, 187, 214, 216, 238, 111, 239, 240, 241, 116}, {41, 49, 50, 51, 52, 53, 54, 55, 56, 185, 57, 58, 59, 60, 184, 201, 210, 113, 120, 121, 122, 123, 124}, {49, 50, 52, 53, 54, 55, 56, 185, 57, 184, 60, 61, 62, 63, 64, 201, 202, 209, 210, 211, 108, 113, 121, 122, 123}, {41, 49, 50, 51, 53, 54, 55, 56, 185, 57, 184, 60, 65, 66, 67, 68, 69, 202, 210, 82, 113, 121, 123}, {188, 192, 193, 194, 195, 196, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 96, 97, 114, 118, 119}, {16, 17, 192, 193, 194, 195, 196, 70, 71, 72, 73, 74, 203, 78, 79, 80, 83, 85, 86, 87, 88, 89, 96, 97, 114, 118, 119}, {188, 192, 193, 194, 195, 196, 70, 71, 72, 73, 74, 77, 78, 79, 80, 90, 91, 92, 93, 94, 95, 96, 97, 114, 118, 119}, {128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 267, 139, 140, 141, 142, 155, 156, 158, 159, 197, 198, 199, 200, 85, 89, 243, 244, 249, 250, 251, 252}, {128, 2, 267, 140, 142, 143, 144, 145, 146, 147, 14, 148, 149, 150, 151, 153, 152, 154, 155, 27, 157, 159, 160, 242, 243, 244, 245, 246, 247, 248, 125, 127}, {128, 2, 131, 258, 5, 267, 140, 142, 143, 144, 14, 148, 149, 151, 152, 153, 154, 27, 155, 157, 159, 160, 33, 242, 243, 244, 245, 246, 247, 248, 125, 126}, {259, 260, 261, 262, 263, 264, 265, 266, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 177, 182, 183, 205, 207, 212, 253, 254, 255}, {259, 260, 261, 262, 263, 264, 265, 266, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 175, 176, 182, 183, 205, 207, 212, 253, 254, 255}, {259, 260, 261, 262, 263, 264, 265, 266, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 178, 179, 183, 204, 205, 206, 207, 212, 253, 254, 255}, {259, 260, 261, 262, 263, 264, 265, 266, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 175, 180, 181, 183, 204, 207, 208, 212, 253, 254, 255}, {256, 257, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237}] ; 18 - precedes = array2d(precedences,1..2, [213, 15, 7, 33, 7, 215, 7, 216, 10, 11, 16, 17, 20, 33, 20, 215, 20, 216, 24, 33, 24, 215, 24, 216, 25, 33, 25, 215, 25, 216, 26, 33, 26, 215, 26, 216, 28, 33, 28, 215, 28, 216, 31, 147, 35, 48, 35, 64, 36, 48, 36, 64, 16, 48, 16, 64, 43, 48, 43, 64, 49, 58, 49, 59, 49, 64, 49, 65, 49, 122, 49, 41, 50, 58, 50, 59, 50, 64, 50, 65, 50, 122, 50, 41, 51, 58, 51, 59, 51, 64, 51, 65, 51, 122, 51, 41, 52, 58, 52, 59, 52, 64, 52, 108, 52, 65, 52, 122, 52, 41, 53, 58, 61, 58, 61, 59, 61, 63, 61, 64, 61, 65, 61, 122, 61, 41, 66, 69, 97, 70, 104, 105, 104, 191, 107, 48, 107, 64, 108, 48, 108, 64, 49, 48, 109, 48, 109, 64, 117, 48, 117, 108, 117, 64, 121, 59, 125, 5, 127, 150, 129, 125, 129, 85, 129, 142, 129, 5, 129, 154, 131, 126, 134, 133, 135, 125, 135, 85, 135, 142, 135, 5, 135, 154, 143, 144, 147, 125, 147, 85, 147, 142, 147, 5, 147, 154, 160, 125, 160, 85, 160, 142, 160, 2, 160, 5, 160, 154, 14, 125, 14, 85, 14, 142, 14, 5, 14, 154, 148, 125, 148, 85, 148, 142, 148, 5, 148, 154, 149, 152, 151, 153, 154, 258, 155, 125, 155, 85, 155, 142, 155, 5, 155, 154, 160, 33, 160, 215, 160, 216, 166, 212, 184, 185, 190, 105, 190, 191, 197, 125, 197, 85, 197, 142, 197, 5, 197, 154, 199, 125, 199, 85, 199, 142, 199, 5, 199, 154, 213, 33, 213, 215, 213, 216, 222, 227, 222, 229, 222, 236, 223, 227, 223, 229, 223, 236, 225, 227, 225, 229, 225, 236, 239, 24, 242, 125, 242, 85, 242, 142, 242, 5, 242, 154, 246, 125, 246, 85, 246, 142, 246, 5, 246, 154, 249, 125, 249, 85, 249, 142, 249, 5, 249, 154, 252, 125, 252, 85, 252, 142, 252, 5, 252, 154, 268, 48, 268, 64] ); 19 - undesirable = array2d(undesirables,1..2, [226, 2, 226, 5, 210, 3, 210, 6, 245, 1, 245, 4, 90, 3, 90, 6, 75, 2, 75, 5, 128, 2, 128, 5, 98, 2, 98, 5, 256, 3, 256, 6, 171, 3, 171, 6, 38, 2, 38, 5, 5, 1, 5, 4, 37, 3, 37, 6, 42, 2, 42, 5, 35, 1, 35, 4, 268, 1, 268, 4, 138, 3, 138, 6, 165, 1, 165, 4, 171, 2, 171, 5, 133, 3, 133, 6, 79, 3, 79, 6, 142, 3, 142, 6, 108, 3, 108, 6, 76, 2, 76, 5, 217, 3, 217, 6, 19, 3, 19, 6, 141, 1, 141, 4, 52, 2, 52, 5, 239, 2, 239, 5, 18, 1, 18, 4, 123, 1, 123, 4, 64, 3, 64, 6, 242, 3, 242, 6, 72, 2, 72, 5, 101, 3, 101, 6, 143, 1, 143, 4, 118, 3, 118, 6, 250, 3, 250, 6, 77, 3, 77, 6, 172, 2, 172, 5, 185, 1, 185, 4, 223, 1, 223, 4, 62, 3, 62, 6, 94, 3, 94, 6, 257, 2, 257, 5, 177, 3, 177, 6, 107, 3, 107, 6, 184, 3, 184, 6, 130, 1, 130, 4, 255, 3, 255, 6, 40, 3, 40, 6, 167, 1, 167, 4, 211, 1, 211, 4, 120, 1, 120, 4, 51, 1, 51, 4, 150, 2, 150, 5, 46, 3, 46, 6, 28, 1, 28, 4, 264, 3, 264, 6, 184, 2, 184, 5, 201, 2, 201, 5, 79, 1, 79, 4, 157, 1, 157, 4, 41, 3, 41, 6, 34, 3, 34, 6, 44, 3, 44, 6, 20, 3, 20, 6, 15, 2, 15, 5, 48, 1, 48, 4, 214, 3, 214, 6, 176, 3, 176, 6, 172, 3, 172, 6, 26, 1, 26, 4, 140, 1, 140, 4, 19, 1, 19, 4, 124, 3, 124, 6, 154, 3, 154, 6, 14, 1, 14, 4, 239, 1, 239, 4, 234, 1, 234, 4] ); 18 + precedes = array2d(1..n_precedences,1..2, [213, 15, 7, 33, 7, 215, 7, 216, 10, 11, 16, 17, 20, 33, 20, 215, 20, 216, 24, 33, 24, 215, 24, 216, 25, 33, 25, 215, 25, 216, 26, 33, 26, 215, 26, 216, 28, 33, 28, 215, 28, 216, 31, 147, 35, 48, 35, 64, 36, 48, 36, 64, 16, 48, 16, 64, 43, 48, 43, 64, 49, 58, 49, 59, 49, 64, 49, 65, 49, 122, 49, 41, 50, 58, 50, 59, 50, 64, 50, 65, 50, 122, 50, 41, 51, 58, 51, 59, 51, 64, 51, 65, 51, 122, 51, 41, 52, 58, 52, 59, 52, 64, 52, 108, 52, 65, 52, 122, 52, 41, 53, 58, 61, 58, 61, 59, 61, 63, 61, 64, 61, 65, 61, 122, 61, 41, 66, 69, 97, 70, 104, 105, 104, 191, 107, 48, 107, 64, 108, 48, 108, 64, 49, 48, 109, 48, 109, 64, 117, 48, 117, 108, 117, 64, 121, 59, 125, 5, 127, 150, 129, 125, 129, 85, 129, 142, 129, 5, 129, 154, 131, 126, 134, 133, 135, 125, 135, 85, 135, 142, 135, 5, 135, 154, 143, 144, 147, 125, 147, 85, 147, 142, 147, 5, 147, 154, 160, 125, 160, 85, 160, 142, 160, 2, 160, 5, 160, 154, 14, 125, 14, 85, 14, 142, 14, 5, 14, 154, 148, 125, 148, 85, 148, 142, 148, 5, 148, 154, 149, 152, 151, 153, 154, 258, 155, 125, 155, 85, 155, 142, 155, 5, 155, 154, 160, 33, 160, 215, 160, 216, 166, 212, 184, 185, 190, 105, 190, 191, 197, 125, 197, 85, 197, 142, 197, 5, 197, 154, 199, 125, 199, 85, 199, 142, 199, 5, 199, 154, 213, 33, 213, 215, 213, 216, 222, 227, 222, 229, 222, 236, 223, 227, 223, 229, 223, 236, 225, 227, 225, 229, 225, 236, 239, 24, 242, 125, 242, 85, 242, 142, 242, 5, 242, 154, 246, 125, 246, 85, 246, 142, 246, 5, 246, 154, 249, 125, 249, 85, 249, 142, 249, 5, 249, 154, 252, 125, 252, 85, 252, 142, 252, 5, 252, 154, 268, 48, 268, 64] ); 19 + undesirable = array2d(1..n_undesirables,1..2, [226, 2, 226, 5, 210, 3, 210, 6, 245, 1, 245, 4, 90, 3, 90, 6, 75, 2, 75, 5, 128, 2, 128, 5, 98, 2, 98, 5, 256, 3, 256, 6, 171, 3, 171, 6, 38, 2, 38, 5, 5, 1, 5, 4, 37, 3, 37, 6, 42, 2, 42, 5, 35, 1, 35, 4, 268, 1, 268, 4, 138, 3, 138, 6, 165, 1, 165, 4, 171, 2, 171, 5, 133, 3, 133, 6, 79, 3, 79, 6, 142, 3, 142, 6, 108, 3, 108, 6, 76, 2, 76, 5, 217, 3, 217, 6, 19, 3, 19, 6, 141, 1, 141, 4, 52, 2, 52, 5, 239, 2, 239, 5, 18, 1, 18, 4, 123, 1, 123, 4, 64, 3, 64, 6, 242, 3, 242, 6, 72, 2, 72, 5, 101, 3, 101, 6, 143, 1, 143, 4, 118, 3, 118, 6, 250, 3, 250, 6, 77, 3, 77, 6, 172, 2, 172, 5, 185, 1, 185, 4, 223, 1, 223, 4, 62, 3, 62, 6, 94, 3, 94, 6, 257, 2, 257, 5, 177, 3, 177, 6, 107, 3, 107, 6, 184, 3, 184, 6, 130, 1, 130, 4, 255, 3, 255, 6, 40, 3, 40, 6, 167, 1, 167, 4, 211, 1, 211, 4, 120, 1, 120, 4, 51, 1, 51, 4, 150, 2, 150, 5, 46, 3, 46, 6, 28, 1, 28, 4, 264, 3, 264, 6, 184, 2, 184, 5, 201, 2, 201, 5, 79, 1, 79, 4, 157, 1, 157, 4, 41, 3, 41, 6, 34, 3, 34, 6, 44, 3, 44, 6, 20, 3, 20, 6, 15, 2, 15, 5, 48, 1, 48, 4, 214, 3, 214, 6, 176, 3, 176, 6, 172, 3, 172, 6, 26, 1, 26, 4, 140, 1, 140, 4, 19, 1, 19, 4, 124, 3, 124, 6, 154, 3, 154, 6, 14, 1, 14, 4, 239, 1, 239, 4, 234, 1, 234, 4] ); 20 20 % {'c1079': 214, 'c412': 3, 'c1101': 223, 'c816': 147, 'c478': 53, 'c537': 93, 'c1146': 256, 'c676': 113, 'c489': 58, 'c527': 85, 'c420': 8, 'c526': 84, 'c446': 32, 'c431': 18, 'c922': 185, 'c1178': 265, 'c415': 4, 'c856': 173, 'c514': 75, 'c821': 149, 'c495': 61, 'c831': 156, 'c476': 51, 'c498': 64, 'c513': 74, 'c833': 157, 'c839': 161, 'c428': 15, 'c479': 54, 'c504': 68, 'c1072': 212, 'c1003': 194, 'c1105': 227, 'c455': 39, 'c828': 154, 'c865': 178, 'c532': 88, 'c1131': 245, 'c533': 89, 'c1137': 251, 'c1106': 228, 'c803': 136, 'c1065': 207, 'c1123': 238, 'c546': 100, 'c1179': 266, 'c519': 78, 'c474': 49, 'c718': 116, 'c598': 106, 'c1004': 195, 'c606': 109, 'c501': 65, 'c539': 95, 'c647': 111, 'c536': 92, 'c1062': 204, 'c812': 143, 'c848': 168, 'c1135': 249, 'c862': 177, 'c491': 59, 'c835': 159, 'c1096': 218, 'c798': 134, 'c1134': 248, 'c860': 175, 'c814': 145, 'c440': 26, 'c447': 33, 'c1185': 268, 'c871': 182, 'c419': 7, 'c1067': 209, 'c1097': 219, 'c806': 138, 'c1021': 197, 'c435': 21, 'c872': 183, 'c1127': 242, 'c1120': 236, 'c724': 118, 'c737': 121, 'c1063': 205, 'c502': 66, 'c1081': 215, 'c452': 36, 'c841': 163, 'c861': 176, 'c520': 79, 'c425': 12, 'c566': 105, 'c840': 162, 'c460': 43, 'c830': 155, 'c437': 23, 'c1132': 246, 'c1005': 196, 'c815': 146, 'c800': 135, 'c453': 37, 'c523': 81, 'c444': 30, 'c747': 124, 'c515': 76, 'c1122': 237, 'c852': 171, 'c738': 122, 'c510': 71, 'c1053': 201, 'c1099': 221, 'c426': 13, 'c795': 131, 'c721': 117, 'c409': 1, 'c487': 57, 'c1107': 229, 'c788': 125, 'c670': 112, 'c813': 144, 'c1102': 224, 'c599': 107, 'c461': 44, 'c1126': 241, 'c857': 174, 'c1125': 240, 'c869': 181, 'c450': 35, 'c429': 16, 'c1055': 202, 'c1147': 257, 'c506': 69, 'c1110': 231, 'c464': 47, 'c477': 52, 'c462': 45, 'c423': 11, 'c540': 96, 'c496': 62, 'c1142': 255, 'c1095': 217, 'c730': 120, 'c1047': 200, 'c422': 10, 'c1103': 225, 'c427': 14, 'c436': 22, 'c1071': 211, 'c1068': 210, 'c791': 128, 'c507': 70, 'c416': 5, 'c600': 108, 'c561': 103, 'c1001': 192, 'c449': 34, 'c1174': 261, 'c441': 27, 'c866': 179, 'c725': 119, 'c845': 165, 'c538': 94, 'c1184': 267, 'c1111': 232, 'c521': 80, 'c1064': 206, 'c853': 172, 'c432': 19, 'c933': 187, 'c524': 82, 'c454': 38, 'c475': 50, 'c810': 141, 'c849': 169, 'c1119': 235, 'c445': 31, 'c793': 129, 'c745': 123, 'c1066': 208, 'c1002': 193, 'c551': 101, 'c1138': 252, 'c834': 158, 'c804': 137, 'c531': 87, 'c921': 184, 'c534': 90, 'c1166': 259, 'c1140': 253, 'c1124': 239, 'c457': 41, 'c794': 130, 'c456': 40, 'c789': 126, 'c807': 139, 'c417': 6, 'c790': 127, 'c535': 91, 'c820': 148, 'c811': 142, 'c486': 56, 'c433': 20, 'c439': 25, 'c836': 160, 'c1057': 203, 'c868': 180, 'c421': 9, 'c997': 191, 'c1074': 213, 'c1104': 226, 'c544': 99, 'c541': 97, 'c463': 46, 'c1136': 250, 'c824': 152, 'c511': 72, 'c826': 153, 'c1022': 198, 'c458': 42, 'c1118': 234, 'c850': 170, 'c465': 48, 'c932': 186, 'c438': 24, 'c564': 104, 'c1129': 244, 'c494': 60, 'c822': 150, 'c516': 77, 'c1176': 263, 'c530': 86, 'c847': 167, 'c430': 17, 'c525': 83, 'c996': 190, 'c797': 133, 'c1128': 243, 'c1177': 264, 'c1175': 262, 'c1167': 260, 'c846': 166, 'c993': 189, 'c823': 151, 'c796': 132, 'c1133': 247, 'c808': 140, 'c1141': 254, 'c716': 115, 'c1046': 199, 'c607': 110, 'c543': 98, 'c443': 29, 'c1100': 222, 'c936': 188, 'c442': 28, 'c484': 55, 'c512': 73, 'c1109': 230, 'c1112': 233, 'c1148': 258, 'c411': 2, 'c844': 164, 'c678': 114, 'c497': 63, 'c503': 67, 'c1082': 216, 'c1098': 220, 'c554': 102}
+2 -2
gbac/UD4-gbac.dzn
··· 15 15 w2 = 1; 16 16 course_load = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 12, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 6, 12, 6, 12, 12, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 12, 12, 6, 6, 6, 6, 12, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] ; 17 17 courses_of = [{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 131, 12, 13, 14, 135, 16, 136, 137, 132, 29, 30, 31, 32, 33, 34, 133, 36, 105, 107, 112, 113, 115, 116, 117, 118, 119}, {1, 2, 3, 4, 5, 6, 7, 131, 132, 10, 11, 133, 134, 135, 15, 136, 17, 18, 19, 20, 21, 29, 32, 35, 36, 137, 105, 107, 112, 113, 114, 115, 116, 117, 118, 119}, {1, 2, 3, 4, 5, 6, 7, 131, 132, 133, 135, 136, 13, 137, 16, 22, 23, 24, 25, 29, 34, 36, 105, 106, 107, 112, 113, 115, 116, 117, 118, 119}, {1, 2, 3, 4, 5, 6, 7, 131, 132, 133, 135, 136, 137, 19, 22, 24, 25, 26, 27, 28, 29, 35, 36, 105, 106, 107, 112, 113, 115, 116, 117, 118, 119}, {128, 130, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 111, 53, 54, 55, 58, 60, 61, 62}, {128, 129, 130, 37, 38, 39, 40, 41, 42, 43, 47, 48, 49, 50, 51, 53, 54, 55, 57, 58, 59, 62}, {128, 37, 38, 39, 40, 41, 42, 43, 44, 46, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62}, {138, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 76, 84, 86, 87, 88, 90, 94, 108, 109, 120, 121, 122, 126, 127}, {138, 63, 64, 65, 66, 67, 68, 69, 70, 73, 77, 78, 79, 82, 84, 86, 87, 88, 90, 94, 108, 109, 111, 120, 121, 122, 126, 127}, {138, 19, 35, 63, 64, 65, 66, 67, 68, 69, 70, 80, 84, 86, 87, 88, 90, 94, 98, 104, 108, 109, 111, 120, 121, 122, 126, 127}, {138, 63, 64, 65, 66, 67, 68, 69, 70, 81, 84, 86, 87, 88, 89, 90, 94, 108, 109, 111, 120, 121, 122, 126, 127}, {138, 47, 63, 64, 65, 66, 67, 68, 69, 70, 74, 75, 83, 84, 85, 86, 87, 88, 94, 108, 109, 111, 120, 121, 122, 126, 127}, {64, 96, 97, 99, 102, 103, 123, 139, 111, 124, 125, 120, 89, 90, 91, 92, 93, 94, 95}, {64, 96, 100, 101, 102, 73, 123, 139, 110, 124, 125, 120, 89, 90, 91, 92, 93, 94, 95}, {64, 96, 98, 35, 102, 104, 123, 139, 124, 81, 19, 125, 120, 89, 90, 91, 92, 93, 94, 95}, {64, 96, 102, 73, 123, 139, 77, 78, 124, 125, 120, 89, 90, 91, 92, 93, 94, 95}] ; 18 - precedes = array2d(precedences,1..2, [1, 5, 1, 18, 1, 20, 1, 27, 1, 28, 1, 36, 1, 114, 1, 117, 1, 118, 1, 134, 2, 5, 2, 18, 2, 20, 2, 27, 2, 28, 2, 36, 2, 114, 2, 117, 2, 118, 2, 134, 8, 5, 8, 18, 8, 20, 8, 27, 8, 28, 8, 36, 8, 114, 8, 117, 8, 118, 8, 134, 9, 5, 9, 18, 9, 20, 9, 27, 9, 28, 9, 36, 9, 114, 9, 117, 9, 118, 9, 134, 11, 5, 11, 18, 11, 20, 11, 27, 11, 28, 11, 36, 11, 114, 11, 117, 11, 118, 11, 134, 37, 111, 37, 49, 37, 60, 37, 61, 37, 62, 38, 111, 38, 49, 38, 60, 38, 61, 38, 62, 39, 111, 39, 49, 39, 60, 39, 61, 39, 62, 63, 66, 63, 69, 63, 70, 63, 76, 63, 77, 63, 78, 63, 81, 63, 87, 63, 127, 63, 138, 65, 66, 65, 69, 65, 70, 65, 76, 65, 77, 65, 78, 65, 81, 65, 87, 65, 127, 65, 138, 90, 66, 90, 69, 90, 70, 90, 76, 90, 77, 90, 78, 90, 81, 90, 87, 90, 127, 90, 138, 71, 66, 71, 69, 71, 70, 71, 76, 71, 77, 71, 78, 71, 81, 71, 87, 71, 127, 71, 138, 74, 66, 74, 69, 74, 70, 74, 76, 74, 77, 74, 78, 74, 81, 74, 87, 74, 127, 74, 138, 90, 111, 90, 99, 90, 100, 90, 101, 90, 110, 90, 139, 91, 111, 91, 99, 91, 100, 91, 101, 91, 81, 91, 77, 91, 78, 91, 110, 91, 139, 92, 111, 92, 99, 92, 100, 92, 101, 92, 81, 92, 77, 92, 78, 92, 110, 92, 139, 105, 5, 105, 18, 105, 20, 105, 27, 105, 28, 105, 36, 105, 114, 105, 117, 105, 118, 105, 134, 108, 66, 108, 69, 108, 70, 108, 76, 108, 77, 108, 78, 108, 81, 108, 87, 108, 127, 108, 138, 124, 111, 124, 99, 124, 100, 124, 101, 124, 81, 124, 77, 124, 78, 124, 110, 124, 139, 126, 66, 126, 69, 126, 70, 126, 76, 126, 77, 126, 78, 126, 81, 126, 87, 126, 127, 126, 138, 131, 5, 131, 18, 131, 20, 131, 27, 131, 28, 131, 36, 131, 114, 131, 117, 131, 118, 131, 134] ); 19 - undesirable = array2d(undesirables,1..2, [117, 2, 117, 5, 109, 3, 109, 6, 127, 1, 127, 4, 47, 3, 47, 6, 39, 2, 39, 5, 67, 2, 67, 5, 51, 2, 51, 5, 133, 3, 133, 6, 89, 3, 89, 6, 20, 2, 20, 5, 3, 1, 3, 4, 20, 3, 20, 6, 22, 2, 22, 5, 19, 1, 19, 4, 139, 1, 139, 4, 72, 3, 72, 6, 86, 1, 86, 4, 89, 2, 89, 5, 69, 3, 69, 6, 41, 3, 41, 6, 74, 3, 74, 6, 56, 3, 56, 6, 40, 2, 40, 5, 113, 3, 113, 6, 10, 3, 10, 6, 74, 1, 74, 4, 27, 2, 27, 5, 124, 2, 124, 5, 9, 1, 9, 4, 64, 1, 64, 4, 34, 3, 34, 6, 126, 3, 126, 6, 38, 2, 38, 5, 53, 3, 53, 6, 61, 3, 61, 6, 130, 3, 130, 6, 40, 3, 40, 6, 96, 1, 96, 4, 62, 3, 62, 6, 116, 1, 116, 4] ); 18 + precedes = array2d(1..n_precedences,1..2, [1, 5, 1, 18, 1, 20, 1, 27, 1, 28, 1, 36, 1, 114, 1, 117, 1, 118, 1, 134, 2, 5, 2, 18, 2, 20, 2, 27, 2, 28, 2, 36, 2, 114, 2, 117, 2, 118, 2, 134, 8, 5, 8, 18, 8, 20, 8, 27, 8, 28, 8, 36, 8, 114, 8, 117, 8, 118, 8, 134, 9, 5, 9, 18, 9, 20, 9, 27, 9, 28, 9, 36, 9, 114, 9, 117, 9, 118, 9, 134, 11, 5, 11, 18, 11, 20, 11, 27, 11, 28, 11, 36, 11, 114, 11, 117, 11, 118, 11, 134, 37, 111, 37, 49, 37, 60, 37, 61, 37, 62, 38, 111, 38, 49, 38, 60, 38, 61, 38, 62, 39, 111, 39, 49, 39, 60, 39, 61, 39, 62, 63, 66, 63, 69, 63, 70, 63, 76, 63, 77, 63, 78, 63, 81, 63, 87, 63, 127, 63, 138, 65, 66, 65, 69, 65, 70, 65, 76, 65, 77, 65, 78, 65, 81, 65, 87, 65, 127, 65, 138, 90, 66, 90, 69, 90, 70, 90, 76, 90, 77, 90, 78, 90, 81, 90, 87, 90, 127, 90, 138, 71, 66, 71, 69, 71, 70, 71, 76, 71, 77, 71, 78, 71, 81, 71, 87, 71, 127, 71, 138, 74, 66, 74, 69, 74, 70, 74, 76, 74, 77, 74, 78, 74, 81, 74, 87, 74, 127, 74, 138, 90, 111, 90, 99, 90, 100, 90, 101, 90, 110, 90, 139, 91, 111, 91, 99, 91, 100, 91, 101, 91, 81, 91, 77, 91, 78, 91, 110, 91, 139, 92, 111, 92, 99, 92, 100, 92, 101, 92, 81, 92, 77, 92, 78, 92, 110, 92, 139, 105, 5, 105, 18, 105, 20, 105, 27, 105, 28, 105, 36, 105, 114, 105, 117, 105, 118, 105, 134, 108, 66, 108, 69, 108, 70, 108, 76, 108, 77, 108, 78, 108, 81, 108, 87, 108, 127, 108, 138, 124, 111, 124, 99, 124, 100, 124, 101, 124, 81, 124, 77, 124, 78, 124, 110, 124, 139, 126, 66, 126, 69, 126, 70, 126, 76, 126, 77, 126, 78, 126, 81, 126, 87, 126, 127, 126, 138, 131, 5, 131, 18, 131, 20, 131, 27, 131, 28, 131, 36, 131, 114, 131, 117, 131, 118, 131, 134] ); 19 + undesirable = array2d(1..n_undesirables,1..2, [117, 2, 117, 5, 109, 3, 109, 6, 127, 1, 127, 4, 47, 3, 47, 6, 39, 2, 39, 5, 67, 2, 67, 5, 51, 2, 51, 5, 133, 3, 133, 6, 89, 3, 89, 6, 20, 2, 20, 5, 3, 1, 3, 4, 20, 3, 20, 6, 22, 2, 22, 5, 19, 1, 19, 4, 139, 1, 139, 4, 72, 3, 72, 6, 86, 1, 86, 4, 89, 2, 89, 5, 69, 3, 69, 6, 41, 3, 41, 6, 74, 3, 74, 6, 56, 3, 56, 6, 40, 2, 40, 5, 113, 3, 113, 6, 10, 3, 10, 6, 74, 1, 74, 4, 27, 2, 27, 5, 124, 2, 124, 5, 9, 1, 9, 4, 64, 1, 64, 4, 34, 3, 34, 6, 126, 3, 126, 6, 38, 2, 38, 5, 53, 3, 53, 6, 61, 3, 61, 6, 130, 3, 130, 6, 40, 3, 40, 6, 96, 1, 96, 4, 62, 3, 62, 6, 116, 1, 116, 4] ); 20 20 % {'c365': 78, 'c346': 64, 'c635': 117, 'c652': 128, 'c313': 32, 'c640': 121, 'c664': 139, 'c356': 72, 'c655': 130, 'c401': 103, 'c353': 70, 'c312': 31, 'c651': 127, 'c384': 92, 'c305': 24, 'c309': 28, 'c388': 96, 'c345': 63, 'c393': 99, 'c310': 29, 'c625': 111, 'c289': 8, 'c649': 125, 'c379': 88, 'c292': 11, 'c332': 50, 'c285': 4, 'c333': 51, 'c300': 19, 'c294': 13, 'c339': 57, 'c297': 16, 'c632': 114, 'c661': 136, 'c284': 3, 'c378': 87, 'c319': 38, 'c656': 131, 'c283': 2, 'c286': 5, 'c299': 18, 'c657': 132, 'c347': 65, 'c395': 101, 'c624': 110, 'c322': 41, 'c368': 80, 'c348': 66, 'c307': 26, 'c287': 6, 'c317': 36, 'c373': 84, 'c374': 85, 'c338': 56, 'c370': 82, 'c662': 137, 'c663': 138, 'c296': 15, 'c636': 118, 'c336': 54, 'c351': 68, 'c381': 89, 'c637': 119, 'c337': 55, 'c634': 116, 'c386': 94, 'c316': 35, 'c659': 134, 'c369': 81, 'c350': 67, 'c302': 21, 'c619': 107, 'c617': 105, 'c306': 25, 'c355': 71, 'c642': 123, 'c638': 120, 'c391': 98, 'c376': 86, 'c323': 42, 'c331': 49, 'c330': 48, 'c334': 52, 'c363': 76, 'c311': 30, 'c372': 83, 'c308': 27, 'c290': 9, 'c648': 124, 'c315': 34, 'c318': 37, 'c291': 10, 'c658': 133, 'c653': 129, 'c326': 45, 'c382': 90, 'c618': 106, 'c282': 1, 'c633': 115, 'c361': 74, 'c358': 73, 'c303': 22, 'c402': 104, 'c387': 95, 'c288': 7, 'c400': 102, 'c298': 17, 'c364': 77, 'c325': 44, 'c366': 79, 'c324': 43, 'c620': 108, 'c295': 14, 'c389': 97, 'c328': 47, 'c321': 40, 'c335': 53, 'c630': 112, 'c320': 39, 'c385': 93, 'c623': 109, 'c301': 20, 'c342': 60, 'c344': 62, 'c327': 46, 'c293': 12, 'c352': 69, 'c641': 122, 'c631': 113, 'c383': 91, 'c660': 135, 'c650': 126, 'c394': 100, 'c314': 33, 'c362': 75, 'c341': 59, 'c340': 58, 'c304': 23, 'c343': 61}
+2 -2
gbac/UD5-gbac.dzn
··· 15 15 w2 = 1; 16 16 course_load = [5, 5, 6, 5, 5, 6, 5, 6, 6, 5, 6, 5, 5, 5, 3, 6, 1, 1, 12, 6, 6, 6, 5, 6, 5, 5, 6, 5, 5, 6, 5, 6, 5, 6, 6, 6, 1, 1, 5, 5, 5, 3, 10, 6, 5, 5, 5, 5, 6, 6, 5, 5, 5, 6, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 3, 6, 1, 1, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 1, 1, 5, 6, 6, 5, 6, 5, 5, 6, 6, 5, 5, 5, 5, 5, 3, 6, 1, 1, 6, 6, 6, 5, 5, 5, 5, 6, 6, 6, 5, 6, 6, 6, 5, 5, 6, 3, 6, 12, 5, 5, 6, 5, 5, 5, 12, 6, 5, 5, 6, 5, 5, 5, 6, 6, 5, 6, 5, 5, 5, 5, 5, 6, 1, 1, 3, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 31, 5, 5, 5, 5, 5, 5, 5, 5, 11, 4, 1, 5, 5, 5, 5, 5, 6, 5, 3, 5, 20, 2, 6, 1, 1, 1, 5, 1, 10, 5, 1, 4, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 12, 12, 9, 6, 6, 6, 3, 12, 12, 9, 6, 3, 6, 6, 3, 6, 12, 12, 9, 3, 6, 6, 6, 6, 3, 6, 9, 9, 9, 9, 9, 3, 9, 30, 6, 5, 5, 6, 5, 6, 7, 3, 6, 12, 1, 1, 5, 5, 5, 12, 5, 5, 12, 6, 9, 6, 3, 3, 3, 2, 6, 6, 6, 6, 30] ; 17 17 courses_of = [{178, 273, 152, 184, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 233, 234, 235, 236, 237, 252}, {178, 273, 152, 184, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 202, 233, 234, 235, 236, 237, 252}, {178, 273, 152, 184, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 202, 233, 234, 235, 236, 237, 252}, {178, 273, 152, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 184, 66, 67, 68, 69, 70, 71, 72, 233, 234, 235, 236, 237, 252}, {178, 273, 152, 153, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 184, 67, 68, 69, 70, 71, 72, 233, 234, 235, 236, 237, 252}, {178, 273, 152, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 184, 67, 68, 69, 70, 71, 72, 202, 233, 234, 235, 236, 237, 252}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 188, 191, 225, 226, 227, 230, 231, 232, 105, 106, 108, 115, 118}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 188, 191, 225, 226, 227, 230, 231, 232, 105, 106, 108, 115, 118}, {128, 4, 9, 11, 15, 16, 17, 18, 19, 22, 44, 45, 46, 47, 48, 225, 226, 227, 230, 231, 232, 105, 106, 108, 109, 110, 112, 113, 114, 115, 118, 119}, {128, 4, 6, 9, 11, 15, 16, 17, 18, 22, 44, 45, 46, 47, 48, 49, 225, 226, 227, 230, 231, 232, 105, 106, 108, 109, 110, 112, 113, 114, 115, 118, 119}, {2, 3, 5, 6, 7, 11, 15, 16, 17, 21, 161, 163, 164, 165, 166, 167, 168, 169, 170, 175, 192, 193, 225, 226, 227, 230, 231, 232, 105, 106, 108, 115, 118}, {256, 158, 31, 23, 24, 25, 26, 27, 28, 157, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 159, 176, 186, 187, 196, 197, 199, 216, 217, 218, 219, 220, 221, 222, 223, 224}, {128, 11, 276, 277, 282, 160, 161, 162, 163, 164, 45, 46, 177, 194, 195, 225, 226, 227, 228, 229, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127}, {128, 11, 275, 276, 160, 161, 162, 163, 164, 45, 46, 177, 194, 195, 225, 226, 227, 228, 229, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127}, {128, 11, 275, 276, 277, 160, 161, 162, 163, 164, 45, 46, 177, 194, 195, 225, 226, 227, 228, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127}, {257, 258, 261, 270, 271, 272, 273, 278, 56, 215, 60, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 253, 255}, {257, 258, 129, 131, 261, 8, 270, 271, 272, 273, 278, 56, 60, 87, 88, 89, 90, 91, 92, 93, 96, 97, 98, 99, 101, 102, 103, 104, 253, 255}, {257, 258, 130, 131, 261, 270, 271, 272, 273, 278, 56, 57, 60, 87, 88, 89, 90, 91, 92, 93, 96, 97, 98, 99, 101, 102, 103, 104, 253, 255}, {171, 172, 173, 174, 189, 190, 200, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 207, 208, 209, 210, 211, 212, 213, 214, 247, 243, 201, 244, 245, 246, 248, 249, 250}, {171, 174, 182, 183, 189, 190, 200, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 207, 208, 209, 210, 211, 212, 213, 214, 247, 243, 201, 244, 245, 246, 248, 249, 250}, {161, 163, 174, 175, 181, 200, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 207, 208, 213, 214, 247, 243, 201, 244, 245, 246, 248, 249, 250, 251}, {171, 174, 181, 189, 190, 200, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 207, 208, 209, 210, 211, 212, 213, 214, 247, 243, 201, 244, 245, 246, 248, 249, 250}, {256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 278, 23, 24, 26, 27, 157, 31, 32, 33, 159, 39, 176, 88, 89, 99, 100, 253, 254, 255}, {256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 278, 23, 24, 26, 27, 157, 31, 32, 33, 159, 39, 176, 88, 89, 99, 100, 253, 254, 255}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 274, 279, 154, 155, 156, 280, 281, 179, 180, 185, 205, 206, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 274, 147, 148, 149, 150, 151, 279, 280, 154, 155, 156, 281, 179, 180, 185, 204, 205, 206, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 274, 147, 148, 149, 150, 151, 279, 280, 154, 155, 156, 281, 179, 180, 185, 203, 205, 206, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 146, 147, 148, 149, 150, 151, 274, 279, 154, 155, 156, 280, 281, 185, 198, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 274, 147, 148, 149, 150, 151, 279, 280, 154, 155, 156, 281, 185, 198, 204, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 274, 147, 148, 149, 150, 151, 279, 280, 154, 155, 156, 281, 185, 198, 203, 238, 239, 240, 241, 242}, {132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 148, 149, 150, 151, 155, 179, 180, 185, 198, 205, 206, 238, 239, 240, 241, 242}] ; 18 - precedes = array2d(precedences,1..2, [105, 3, 105, 6, 105, 7, 105, 8, 105, 9, 105, 10, 105, 12, 105, 13, 105, 14, 105, 20, 105, 21, 105, 22, 105, 44, 105, 119, 105, 46, 105, 47, 105, 128, 105, 48, 105, 49, 105, 112, 105, 113, 105, 188, 29, 199, 30, 25, 30, 34, 30, 35, 30, 36, 30, 39, 30, 40, 30, 41, 30, 157, 30, 158, 30, 176, 30, 256, 30, 187, 30, 196, 30, 197, 32, 25, 32, 34, 32, 35, 32, 36, 32, 39, 32, 40, 32, 41, 32, 157, 32, 158, 32, 176, 32, 256, 32, 196, 58, 52, 58, 56, 58, 57, 58, 63, 58, 64, 58, 65, 58, 66, 58, 178, 58, 184, 257, 88, 257, 89, 257, 255, 257, 56, 257, 90, 257, 94, 257, 95, 257, 99, 257, 100, 257, 8, 257, 129, 257, 130, 257, 57, 257, 215, 105, 116, 105, 117, 105, 120, 105, 121, 105, 125, 105, 126, 105, 127, 105, 160, 105, 45, 105, 177, 139, 133, 139, 137, 139, 138, 139, 143, 139, 144, 139, 145, 139, 146, 139, 185, 139, 203, 140, 133, 140, 137, 140, 138, 140, 143, 140, 144, 140, 145, 140, 146, 140, 185, 140, 203, 159, 199, 187, 199, 230, 3, 230, 6, 230, 7, 230, 8, 230, 9, 230, 10, 230, 12, 230, 13, 230, 14, 230, 20, 230, 21, 230, 22, 230, 44, 230, 119, 230, 46, 230, 47, 230, 128, 230, 48, 230, 49, 230, 112, 230, 113, 230, 188, 233, 52, 233, 56, 233, 57, 233, 63, 233, 64, 233, 65, 233, 66, 233, 178, 233, 184, 238, 133, 238, 137, 238, 138, 238, 143, 238, 144, 238, 145, 238, 146, 238, 185, 238, 203, 252, 52, 252, 56, 252, 57, 252, 63, 252, 64, 252, 65, 252, 66, 252, 178, 252, 184, 257, 256, 257, 39, 257, 157, 257, 176, 257, 264, 257, 265, 257, 266, 257, 268, 257, 269, 261, 88, 261, 89, 261, 255, 261, 99, 261, 256, 261, 39, 261, 157, 261, 176, 261, 100, 261, 264, 261, 265, 261, 266, 261, 268, 261, 269, 261, 56, 261, 90, 261, 94, 261, 95, 261, 8, 261, 129, 261, 130, 261, 57, 261, 215, 271, 273, 271, 253, 271, 87, 271, 88, 271, 89, 271, 255, 271, 56, 271, 90, 271, 91, 271, 92, 271, 60, 271, 93, 271, 258, 271, 94, 271, 95, 271, 96, 271, 97, 271, 98, 271, 99, 271, 100, 271, 8, 271, 129, 271, 130, 271, 57, 271, 215, 16, 2, 16, 4, 16, 5, 16, 6, 16, 9, 16, 118, 16, 12, 16, 19, 16, 20, 16, 21, 16, 114, 16, 109, 16, 110, 16, 45, 16, 46, 16, 47, 16, 128, 16, 49, 16, 164, 16, 175, 16, 167, 16, 169, 16, 192, 24, 33, 26, 27, 36, 41, 114, 119, 109, 110, 46, 47, 56, 63, 69, 51, 69, 54, 69, 55, 69, 57, 69, 61, 69, 63, 69, 64, 69, 65, 69, 66, 69, 152, 69, 153, 69, 202, 70, 57, 70, 63, 70, 64, 70, 65, 70, 66, 70, 153, 70, 202, 84, 75, 84, 78, 84, 79, 84, 80, 84, 81, 84, 82, 84, 173, 84, 175, 84, 181, 84, 182, 84, 190, 84, 200, 84, 211, 84, 212, 84, 213, 84, 214, 84, 251, 85, 75, 85, 78, 85, 79, 85, 80, 85, 81, 85, 82, 85, 173, 85, 175, 85, 181, 85, 182, 85, 190, 85, 200, 85, 211, 85, 212, 85, 213, 85, 214, 85, 251, 86, 75, 86, 78, 86, 79, 86, 80, 86, 81, 86, 82, 86, 173, 86, 175, 86, 181, 86, 182, 86, 190, 86, 200, 86, 211, 86, 212, 86, 213, 86, 214, 86, 251, 94, 95, 102, 253, 102, 90, 102, 92, 102, 93, 102, 94, 102, 95, 102, 96, 102, 97, 102, 98, 102, 100, 102, 129, 102, 57, 112, 113, 123, 109, 123, 110, 123, 111, 123, 114, 123, 117, 123, 118, 123, 120, 123, 121, 123, 46, 123, 124, 123, 126, 123, 127, 123, 128, 123, 45, 123, 164, 123, 282, 137, 143, 148, 135, 148, 136, 148, 138, 148, 143, 148, 144, 148, 145, 148, 146, 148, 154, 148, 156, 148, 179, 148, 180, 148, 203, 148, 204, 149, 138, 149, 143, 149, 144, 149, 145, 149, 146, 149, 203, 149, 204, 165, 166, 186, 24, 186, 25, 186, 26, 186, 27, 186, 29, 186, 33, 186, 35, 186, 39, 186, 40, 186, 41, 186, 43, 186, 157, 186, 159, 186, 176, 186, 256, 186, 199, 193, 9, 193, 12, 193, 19, 193, 20, 193, 21, 193, 46, 193, 47, 193, 128, 193, 49, 193, 175, 193, 167, 193, 169, 193, 118, 193, 6, 205, 206, 218, 220, 225, 227, 234, 236, 250, 74, 157, 176, 270, 272] ); 19 - undesirable = array2d(undesirables,1..2, [5, 1, 5, 3, 5, 5, 19, 1, 19, 3, 19, 5, 20, 2, 20, 4, 20, 6, 37, 1, 37, 3, 37, 5, 39, 2, 39, 4, 39, 6, 40, 2, 40, 4, 40, 6, 42, 2, 42, 4, 42, 6, 45, 1, 45, 3, 45, 5, 48, 2, 48, 4, 48, 6, 53, 1, 53, 3, 53, 5, 55, 2, 55, 4, 55, 6, 65, 2, 65, 4, 65, 6, 68, 2, 68, 4, 68, 6, 76, 2, 76, 4, 76, 6, 79, 2, 79, 4, 79, 6, 80, 1, 80, 3, 80, 5, 81, 2, 81, 4, 81, 6, 83, 2, 83, 4, 83, 6, 95, 2, 95, 4, 95, 6, 99, 2, 99, 4, 99, 6, 103, 2, 103, 4, 103, 6, 106, 2, 106, 4, 106, 6, 113, 2, 113, 4, 113, 6, 124, 2, 124, 4, 124, 6, 125, 2, 125, 4, 125, 6, 127, 1, 127, 3, 127, 5, 130, 1, 130, 3, 130, 5, 135, 2, 135, 4, 135, 6, 137, 1, 137, 3, 137, 5, 140, 2, 140, 4, 140, 6, 145, 2, 145, 4, 145, 6, 149, 2, 149, 4, 149, 6, 150, 1, 150, 3, 150, 5, 157, 1, 157, 3, 157, 5, 173, 1, 173, 3, 173, 5, 175, 1, 175, 3, 175, 5, 180, 2, 180, 4, 180, 6, 181, 1, 181, 3, 181, 5, 186, 2, 186, 4, 186, 6, 193, 2, 193, 4, 193, 6, 194, 1, 194, 3, 194, 5, 221, 2, 221, 4, 221, 6, 222, 1, 222, 3, 222, 5, 228, 2, 228, 4, 228, 6, 234, 1, 234, 3, 234, 5, 237, 1, 237, 3, 237, 5, 252, 1, 252, 3, 252, 5, 255, 2, 255, 4, 255, 6, 258, 1, 258, 3, 258, 5, 263, 2, 263, 4, 263, 6, 268, 2, 268, 4, 268, 6, 269, 2, 269, 4, 269, 6, 270, 2, 270, 4, 270, 6, 282, 1, 282, 3, 282, 5] ); 18 + precedes = array2d(1..n_precedences,1..2, [105, 3, 105, 6, 105, 7, 105, 8, 105, 9, 105, 10, 105, 12, 105, 13, 105, 14, 105, 20, 105, 21, 105, 22, 105, 44, 105, 119, 105, 46, 105, 47, 105, 128, 105, 48, 105, 49, 105, 112, 105, 113, 105, 188, 29, 199, 30, 25, 30, 34, 30, 35, 30, 36, 30, 39, 30, 40, 30, 41, 30, 157, 30, 158, 30, 176, 30, 256, 30, 187, 30, 196, 30, 197, 32, 25, 32, 34, 32, 35, 32, 36, 32, 39, 32, 40, 32, 41, 32, 157, 32, 158, 32, 176, 32, 256, 32, 196, 58, 52, 58, 56, 58, 57, 58, 63, 58, 64, 58, 65, 58, 66, 58, 178, 58, 184, 257, 88, 257, 89, 257, 255, 257, 56, 257, 90, 257, 94, 257, 95, 257, 99, 257, 100, 257, 8, 257, 129, 257, 130, 257, 57, 257, 215, 105, 116, 105, 117, 105, 120, 105, 121, 105, 125, 105, 126, 105, 127, 105, 160, 105, 45, 105, 177, 139, 133, 139, 137, 139, 138, 139, 143, 139, 144, 139, 145, 139, 146, 139, 185, 139, 203, 140, 133, 140, 137, 140, 138, 140, 143, 140, 144, 140, 145, 140, 146, 140, 185, 140, 203, 159, 199, 187, 199, 230, 3, 230, 6, 230, 7, 230, 8, 230, 9, 230, 10, 230, 12, 230, 13, 230, 14, 230, 20, 230, 21, 230, 22, 230, 44, 230, 119, 230, 46, 230, 47, 230, 128, 230, 48, 230, 49, 230, 112, 230, 113, 230, 188, 233, 52, 233, 56, 233, 57, 233, 63, 233, 64, 233, 65, 233, 66, 233, 178, 233, 184, 238, 133, 238, 137, 238, 138, 238, 143, 238, 144, 238, 145, 238, 146, 238, 185, 238, 203, 252, 52, 252, 56, 252, 57, 252, 63, 252, 64, 252, 65, 252, 66, 252, 178, 252, 184, 257, 256, 257, 39, 257, 157, 257, 176, 257, 264, 257, 265, 257, 266, 257, 268, 257, 269, 261, 88, 261, 89, 261, 255, 261, 99, 261, 256, 261, 39, 261, 157, 261, 176, 261, 100, 261, 264, 261, 265, 261, 266, 261, 268, 261, 269, 261, 56, 261, 90, 261, 94, 261, 95, 261, 8, 261, 129, 261, 130, 261, 57, 261, 215, 271, 273, 271, 253, 271, 87, 271, 88, 271, 89, 271, 255, 271, 56, 271, 90, 271, 91, 271, 92, 271, 60, 271, 93, 271, 258, 271, 94, 271, 95, 271, 96, 271, 97, 271, 98, 271, 99, 271, 100, 271, 8, 271, 129, 271, 130, 271, 57, 271, 215, 16, 2, 16, 4, 16, 5, 16, 6, 16, 9, 16, 118, 16, 12, 16, 19, 16, 20, 16, 21, 16, 114, 16, 109, 16, 110, 16, 45, 16, 46, 16, 47, 16, 128, 16, 49, 16, 164, 16, 175, 16, 167, 16, 169, 16, 192, 24, 33, 26, 27, 36, 41, 114, 119, 109, 110, 46, 47, 56, 63, 69, 51, 69, 54, 69, 55, 69, 57, 69, 61, 69, 63, 69, 64, 69, 65, 69, 66, 69, 152, 69, 153, 69, 202, 70, 57, 70, 63, 70, 64, 70, 65, 70, 66, 70, 153, 70, 202, 84, 75, 84, 78, 84, 79, 84, 80, 84, 81, 84, 82, 84, 173, 84, 175, 84, 181, 84, 182, 84, 190, 84, 200, 84, 211, 84, 212, 84, 213, 84, 214, 84, 251, 85, 75, 85, 78, 85, 79, 85, 80, 85, 81, 85, 82, 85, 173, 85, 175, 85, 181, 85, 182, 85, 190, 85, 200, 85, 211, 85, 212, 85, 213, 85, 214, 85, 251, 86, 75, 86, 78, 86, 79, 86, 80, 86, 81, 86, 82, 86, 173, 86, 175, 86, 181, 86, 182, 86, 190, 86, 200, 86, 211, 86, 212, 86, 213, 86, 214, 86, 251, 94, 95, 102, 253, 102, 90, 102, 92, 102, 93, 102, 94, 102, 95, 102, 96, 102, 97, 102, 98, 102, 100, 102, 129, 102, 57, 112, 113, 123, 109, 123, 110, 123, 111, 123, 114, 123, 117, 123, 118, 123, 120, 123, 121, 123, 46, 123, 124, 123, 126, 123, 127, 123, 128, 123, 45, 123, 164, 123, 282, 137, 143, 148, 135, 148, 136, 148, 138, 148, 143, 148, 144, 148, 145, 148, 146, 148, 154, 148, 156, 148, 179, 148, 180, 148, 203, 148, 204, 149, 138, 149, 143, 149, 144, 149, 145, 149, 146, 149, 203, 149, 204, 165, 166, 186, 24, 186, 25, 186, 26, 186, 27, 186, 29, 186, 33, 186, 35, 186, 39, 186, 40, 186, 41, 186, 43, 186, 157, 186, 159, 186, 176, 186, 256, 186, 199, 193, 9, 193, 12, 193, 19, 193, 20, 193, 21, 193, 46, 193, 47, 193, 128, 193, 49, 193, 175, 193, 167, 193, 169, 193, 118, 193, 6, 205, 206, 218, 220, 225, 227, 234, 236, 250, 74, 157, 176, 270, 272] ); 19 + undesirable = array2d(1..n_undesirables,1..2, [5, 1, 5, 3, 5, 5, 19, 1, 19, 3, 19, 5, 20, 2, 20, 4, 20, 6, 37, 1, 37, 3, 37, 5, 39, 2, 39, 4, 39, 6, 40, 2, 40, 4, 40, 6, 42, 2, 42, 4, 42, 6, 45, 1, 45, 3, 45, 5, 48, 2, 48, 4, 48, 6, 53, 1, 53, 3, 53, 5, 55, 2, 55, 4, 55, 6, 65, 2, 65, 4, 65, 6, 68, 2, 68, 4, 68, 6, 76, 2, 76, 4, 76, 6, 79, 2, 79, 4, 79, 6, 80, 1, 80, 3, 80, 5, 81, 2, 81, 4, 81, 6, 83, 2, 83, 4, 83, 6, 95, 2, 95, 4, 95, 6, 99, 2, 99, 4, 99, 6, 103, 2, 103, 4, 103, 6, 106, 2, 106, 4, 106, 6, 113, 2, 113, 4, 113, 6, 124, 2, 124, 4, 124, 6, 125, 2, 125, 4, 125, 6, 127, 1, 127, 3, 127, 5, 130, 1, 130, 3, 130, 5, 135, 2, 135, 4, 135, 6, 137, 1, 137, 3, 137, 5, 140, 2, 140, 4, 140, 6, 145, 2, 145, 4, 145, 6, 149, 2, 149, 4, 149, 6, 150, 1, 150, 3, 150, 5, 157, 1, 157, 3, 157, 5, 173, 1, 173, 3, 173, 5, 175, 1, 175, 3, 175, 5, 180, 2, 180, 4, 180, 6, 181, 1, 181, 3, 181, 5, 186, 2, 186, 4, 186, 6, 193, 2, 193, 4, 193, 6, 194, 1, 194, 3, 194, 5, 221, 2, 221, 4, 221, 6, 222, 1, 222, 3, 222, 5, 228, 2, 228, 4, 228, 6, 234, 1, 234, 3, 234, 5, 237, 1, 237, 3, 237, 5, 252, 1, 252, 3, 252, 5, 255, 2, 255, 4, 255, 6, 258, 1, 258, 3, 258, 5, 263, 2, 263, 4, 263, 6, 268, 2, 268, 4, 268, 6, 269, 2, 269, 4, 269, 6, 270, 2, 270, 4, 270, 6, 282, 1, 282, 3, 282, 5] ); 20 20 % {'c685': 133, 'c64': 36, 'c232': 120, 'c473': 131, 'c1239': 233, 'c188': 90, 'c217': 109, 'c58': 31, 'c61': 34, 'c118': 66, 'c73': 40, 'c980': 183, 'c695': 141, 'c253': 128, 'c104': 55, 'c1155': 207, 'c687': 134, 'c1298': 264, 'c770': 162, 'c1309': 273, 'c199': 97, 'c1278': 255, 'c1049': 192, 'c1249': 241, 'c207': 103, 'c162': 82, 'c935': 178, 'c1331': 278, 'c77': 42, 'c24': 12, 'c113': 61, 'c1077': 202, 'c1219': 221, 'c1274': 253, 'c33': 18, 'c1296': 262, 'c9': 2, 'c13': 5, 'c1233': 230, 'c219': 111, 'c88': 46, 'c216': 108, 'c89': 47, 'c150': 80, 'c223': 114, 'c1293': 259, 'c689': 135, 'c53': 28, 'c218': 110, 'c98': 51, 'c690': 136, 'c1059': 197, 'c208': 104, 'c1162': 212, 'c122': 68, 'c698': 143, 'c1328': 277, 'c1156': 208, 'c700': 145, 'c884': 174, 'c200': 98, 'c1264': 250, 'c468': 130, 'c52': 27, 'c198': 96, 'c1051': 194, 'c249': 127, 'c237': 123, 'c875': 170, 'c85': 45, 'c56': 30, 'c117': 65, 'c1291': 258, 'c1076': 201, 'c1226': 227, 'c1326': 275, 'c184': 88, 'c1157': 209, 'c1308': 272, 'c780': 167, 'c105': 56, 'c778': 166, 'c694': 140, 'c693': 139, 'c205': 102, 'c1220': 222, 'c189': 91, 'c51': 26, 'c704': 148, 'c247': 126, 'c1286': 257, 'c26': 13, 'c1307': 271, 'c691': 137, 'c946': 180, 'c125': 71, 'c910': 176, 'c945': 179, 'c1020': 188, 'c1246': 239, 'c1341': 282, 'c772': 163, 'c20': 10, 'c1230': 229, 'c1263': 249, 'c203': 100, 'c133': 75, 'c706': 150, 'c149': 79, 'c101': 53, 'c710': 151, 'c230': 118, 'c37': 22, 'c1266': 252, 'c72': 39, 'c696': 142, 'c1180': 215, 'c969': 182, 'c35': 20, 'c1237': 232, 'c124': 70, 'c59': 32, 'c1050': 193, 'c30': 16, 'c7': 1, 'c1224': 225, 'c143': 77, 'c110': 60, 'c1052': 195, 'c1241': 235, 'c1229': 228, 'c171': 84, 'c1301': 267, 'c123': 69, 'c71': 38, 'c1327': 276, 'c62': 35, 'c204': 101, 'c838': 169, 'c103': 54, 'c211': 105, 'c221': 113, 'c1305': 269, 'c137': 76, 'c14': 6, 'c99': 52, 'c163': 83, 'c734': 156, 'c767': 160, 'c60': 33, 'c742': 158, 'c732': 154, 'c705': 149, 'c49': 25, 'c19': 9, 'c1333': 280, 'c881': 171, 'c236': 122, 'c1043': 190, 'c108': 58, 'c193': 93, 'c1297': 263, 'c174': 86, 'c1257': 245, 'c23': 11, 'c1240': 234, 'c898': 175, 'c15': 7, 'c1306': 270, 'c233': 121, 'c148': 78, 'c29': 15, 'c1255': 243, 'c1078': 203, 'c97': 50, 'c106': 57, 'c1265': 251, 'c931': 177, 'c173': 85, 'c70': 37, 'c1260': 248, 'c115': 63, 'c1294': 260, 'c1325': 274, 'c683': 132, 'c153': 81, 'c1248': 240, 'c191': 92, 'c1299': 265, 'c220': 112, 'c1008': 186, 'c34': 19, 'c1223': 224, 'c201': 99, 'c231': 119, 'c1258': 246, 'c1144': 205, 'c883': 173, 'c225': 116, 'c999': 185, 'c769': 161, 'c197': 95, 'c183': 87, 'c185': 89, 'c55': 29, 'c1161': 211, 'c47': 24, 'c1282': 256, 'c1164': 214, 'c467': 129, 'c1235': 231, 'c27': 14, 'c1334': 281, 'c1250': 242, 'c116': 64, 'c746': 159, 'c701': 146, 'c114': 62, 'c91': 48, 'c722': 152, 'c1145': 206, 'c32': 17, 'c1217': 219, 'c1069': 199, 'c1256': 244, 'c196': 94, 'c1221': 223, 'c1300': 266, 'c126': 72, 'c1042': 189, 'c1225': 226, 'c781': 168, 'c227': 117, 'c80': 44, 'c1192': 217, 'c1295': 261, 'c1084': 204, 'c1061': 198, 'c109': 59, 'c243': 125, 'c773': 164, 'c1191': 216, 'c741': 157, 'c36': 21, 'c1275': 254, 'c1013': 187, 'c1075': 200, 'c777': 165, 'c1058': 196, 'c11': 3, 'c1244': 237, 'c74': 41, 'c1303': 268, 'c723': 153, 'c703': 147, 'c998': 184, 'c1163': 213, 'c733': 155, 'c92': 49, 'c1259': 247, 'c1332': 279, 'c12': 4, 'c1245': 238, 'c963': 181, 'c128': 73, 'c224': 115, 'c699': 144, 'c46': 23, 'c18': 8, 'c1218': 220, 'c212': 106, 'c1045': 191, 'c241': 124, 'c882': 172, 'c78': 43, 'c1216': 218, 'c132': 74, 'c1158': 210, 'c121': 67, 'c215': 107, 'c1242': 236, 'c692': 138}
+2 -2
gbac/UD8-gbac.dzn
··· 15 15 w2 = 1; 16 16 course_load = [6, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 16, 5, 6, 6, 6, 5, 5, 5, 6, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 7, 7, 5, 5, 7, 7, 7, 5, 5, 5, 6, 6, 6, 5, 7, 7, 5, 5, 7, 7, 6, 6, 7, 5, 5, 15, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 7, 7, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 6, 5, 6, 5, 5, 6, 6, 5, 15, 17, 5, 5, 7, 7, 5, 6, 5, 6, 5, 5, 6, 6, 16, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 6, 2, 1, 1, 1, 1, 5, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 16, 6, 7, 5] ; 17 17 courses_of = [{35, 39, 40, 45, 46, 47, 48, 49, 53, 181, 61, 62, 67, 102, 103, 104, 105, 107, 108, 109, 111, 116, 124}, {35, 38, 39, 40, 45, 46, 47, 48, 49, 53, 58, 62, 64, 67, 102, 103, 104, 105, 107, 108, 109, 110, 116}, {16, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 182, 183, 78, 97, 98, 102, 103, 106, 116, 118}, {138, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 182, 183, 99, 100, 101, 102, 103, 116, 118}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 149, 23, 25, 163, 178, 204, 206, 112, 113}, {2, 8, 9, 10, 11, 14, 16, 17, 19, 20, 149, 21, 22, 23, 24, 26, 27, 28, 29, 30, 25, 31, 32, 33, 34, 163, 179, 205, 207, 112, 117}, {41, 176, 177, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 189, 60, 194, 201, 114, 121, 122, 123, 124, 125}, {176, 177, 49, 50, 52, 53, 54, 55, 56, 57, 60, 189, 61, 62, 64, 63, 194, 195, 200, 201, 202, 108, 114, 122, 123, 124}, {41, 176, 177, 49, 50, 51, 53, 54, 55, 56, 57, 60, 189, 65, 66, 67, 68, 195, 201, 208, 81, 114, 122, 124}, {180, 184, 185, 186, 187, 188, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 95, 96, 115, 119, 120}, {16, 17, 184, 185, 186, 187, 188, 196, 69, 70, 71, 72, 73, 77, 78, 79, 82, 84, 85, 86, 87, 88, 95, 96, 115, 119, 120}, {180, 184, 185, 186, 187, 188, 69, 70, 71, 72, 73, 76, 77, 78, 79, 89, 90, 91, 92, 93, 94, 95, 96, 115, 119, 120}, {129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 158, 159, 161, 162, 190, 191, 192, 193, 84, 88, 109}, {128, 129, 2, 142, 14, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 27, 156, 157, 158, 160, 162, 163, 109, 126}, {129, 2, 132, 5, 142, 14, 144, 145, 146, 150, 151, 153, 154, 27, 155, 156, 158, 157, 160, 33, 162, 163, 109, 126, 127}, {164, 165, 166, 167, 168, 169, 170, 171, 172, 198, 203, 175}, {164, 165, 166, 167, 168, 169, 170, 171, 172, 198, 203, 175}, {164, 165, 166, 167, 168, 169, 170, 171, 197, 173, 198, 203}, {164, 165, 166, 167, 168, 169, 170, 171, 197, 199, 174, 203}] ; 18 - precedes = array2d(precedences,1..2, [6, 33, 6, 206, 6, 207, 7, 33, 7, 206, 7, 207, 10, 11, 16, 17, 20, 33, 20, 206, 20, 207, 24, 33, 24, 206, 24, 207, 25, 33, 25, 206, 25, 207, 26, 33, 26, 206, 26, 207, 28, 33, 28, 206, 28, 207, 31, 149, 35, 48, 35, 64, 36, 48, 36, 64, 16, 48, 16, 64, 43, 48, 43, 64, 49, 59, 49, 64, 49, 65, 49, 123, 49, 41, 50, 59, 50, 64, 50, 65, 50, 123, 50, 41, 51, 59, 51, 64, 51, 65, 51, 123, 51, 41, 52, 59, 52, 64, 52, 108, 52, 65, 52, 123, 52, 41, 53, 58, 61, 59, 61, 63, 61, 64, 61, 65, 61, 123, 61, 41, 66, 68, 96, 69, 102, 48, 102, 64, 104, 105, 104, 183, 107, 48, 107, 64, 108, 48, 108, 64, 49, 48, 110, 48, 110, 64, 118, 48, 118, 108, 118, 64, 122, 59, 126, 5, 128, 152, 130, 126, 130, 84, 130, 144, 130, 5, 130, 157, 132, 127, 135, 134, 136, 126, 136, 84, 136, 144, 136, 5, 136, 157, 137, 126, 137, 84, 137, 144, 137, 5, 137, 157, 145, 146, 149, 126, 149, 84, 149, 144, 149, 5, 149, 157, 163, 126, 163, 84, 163, 144, 163, 2, 163, 5, 163, 157, 14, 126, 14, 84, 14, 144, 14, 5, 14, 157, 150, 126, 150, 84, 150, 144, 150, 5, 150, 157, 151, 154, 153, 156, 157, 155, 158, 126, 158, 84, 158, 144, 158, 5, 158, 157, 163, 33, 163, 206, 163, 207, 166, 203, 176, 177, 182, 105, 182, 183, 189, 59, 189, 64, 189, 65, 189, 123, 189, 41, 190, 126, 190, 84, 190, 144, 190, 5, 190, 157, 192, 126, 192, 84, 192, 144, 192, 5, 192, 157, 204, 15] ); 19 - undesirable = array2d(undesirables,1..2, [4, 1, 4, 4, 14, 1, 14, 4, 15, 3, 15, 6, 22, 1, 22, 4, 27, 1, 27, 4, 29, 3, 29, 6, 30, 2, 30, 5, 31, 3, 31, 6, 33, 2, 33, 5, 36, 3, 36, 6, 40, 1, 40, 4, 40, 2, 40, 5, 48, 3, 48, 6, 50, 3, 50, 6, 56, 2, 56, 5, 58, 2, 58, 5, 59, 2, 59, 5, 60, 3, 60, 6, 61, 3, 61, 6, 70, 3, 70, 6, 73, 3, 73, 6, 76, 2, 76, 5, 79, 3, 79, 6, 83, 3, 83, 6, 84, 3, 84, 6, 92, 3, 92, 6, 93, 1, 93, 4, 96, 1, 96, 4, 100, 2, 100, 5, 101, 1, 101, 4, 103, 3, 103, 6, 104, 3, 104, 6, 107, 3, 107, 6, 110, 1, 110, 4, 110, 3, 110, 6, 111, 1, 111, 4, 116, 2, 116, 5, 128, 1, 128, 4, 129, 1, 129, 4, 133, 2, 133, 5, 133, 3, 133, 6, 134, 2, 134, 5, 137, 3, 137, 6, 143, 2, 143, 5, 143, 3, 143, 6, 144, 1, 144, 4, 163, 3, 163, 6, 164, 1, 164, 4, 169, 3, 169, 6, 173, 1, 173, 4, 175, 2, 175, 5, 186, 2, 186, 5, 188, 3, 188, 6, 190, 1, 190, 4, 194, 3, 194, 6, 198, 3, 198, 6, 199, 2, 199, 5, 199, 3, 199, 6, 205, 3, 205, 6, 208, 1, 208, 4] ); 18 + precedes = array2d(1..n_precedences,1..2, [6, 33, 6, 206, 6, 207, 7, 33, 7, 206, 7, 207, 10, 11, 16, 17, 20, 33, 20, 206, 20, 207, 24, 33, 24, 206, 24, 207, 25, 33, 25, 206, 25, 207, 26, 33, 26, 206, 26, 207, 28, 33, 28, 206, 28, 207, 31, 149, 35, 48, 35, 64, 36, 48, 36, 64, 16, 48, 16, 64, 43, 48, 43, 64, 49, 59, 49, 64, 49, 65, 49, 123, 49, 41, 50, 59, 50, 64, 50, 65, 50, 123, 50, 41, 51, 59, 51, 64, 51, 65, 51, 123, 51, 41, 52, 59, 52, 64, 52, 108, 52, 65, 52, 123, 52, 41, 53, 58, 61, 59, 61, 63, 61, 64, 61, 65, 61, 123, 61, 41, 66, 68, 96, 69, 102, 48, 102, 64, 104, 105, 104, 183, 107, 48, 107, 64, 108, 48, 108, 64, 49, 48, 110, 48, 110, 64, 118, 48, 118, 108, 118, 64, 122, 59, 126, 5, 128, 152, 130, 126, 130, 84, 130, 144, 130, 5, 130, 157, 132, 127, 135, 134, 136, 126, 136, 84, 136, 144, 136, 5, 136, 157, 137, 126, 137, 84, 137, 144, 137, 5, 137, 157, 145, 146, 149, 126, 149, 84, 149, 144, 149, 5, 149, 157, 163, 126, 163, 84, 163, 144, 163, 2, 163, 5, 163, 157, 14, 126, 14, 84, 14, 144, 14, 5, 14, 157, 150, 126, 150, 84, 150, 144, 150, 5, 150, 157, 151, 154, 153, 156, 157, 155, 158, 126, 158, 84, 158, 144, 158, 5, 158, 157, 163, 33, 163, 206, 163, 207, 166, 203, 176, 177, 182, 105, 182, 183, 189, 59, 189, 64, 189, 65, 189, 123, 189, 41, 190, 126, 190, 84, 190, 144, 190, 5, 190, 157, 192, 126, 192, 84, 192, 144, 192, 5, 192, 157, 204, 15] ); 19 + undesirable = array2d(1..n_undesirables,1..2, [4, 1, 4, 4, 14, 1, 14, 4, 15, 3, 15, 6, 22, 1, 22, 4, 27, 1, 27, 4, 29, 3, 29, 6, 30, 2, 30, 5, 31, 3, 31, 6, 33, 2, 33, 5, 36, 3, 36, 6, 40, 1, 40, 4, 40, 2, 40, 5, 48, 3, 48, 6, 50, 3, 50, 6, 56, 2, 56, 5, 58, 2, 58, 5, 59, 2, 59, 5, 60, 3, 60, 6, 61, 3, 61, 6, 70, 3, 70, 6, 73, 3, 73, 6, 76, 2, 76, 5, 79, 3, 79, 6, 83, 3, 83, 6, 84, 3, 84, 6, 92, 3, 92, 6, 93, 1, 93, 4, 96, 1, 96, 4, 100, 2, 100, 5, 101, 1, 101, 4, 103, 3, 103, 6, 104, 3, 104, 6, 107, 3, 107, 6, 110, 1, 110, 4, 110, 3, 110, 6, 111, 1, 111, 4, 116, 2, 116, 5, 128, 1, 128, 4, 129, 1, 129, 4, 133, 2, 133, 5, 133, 3, 133, 6, 134, 2, 134, 5, 137, 3, 137, 6, 143, 2, 143, 5, 143, 3, 143, 6, 144, 1, 144, 4, 163, 3, 163, 6, 164, 1, 164, 4, 169, 3, 169, 6, 173, 1, 173, 4, 175, 2, 175, 5, 186, 2, 186, 5, 188, 3, 188, 6, 190, 1, 190, 4, 194, 3, 194, 6, 198, 3, 198, 6, 199, 2, 199, 5, 199, 3, 199, 6, 205, 3, 205, 6, 208, 1, 208, 4] ); 20 20 % {'c824': 154, 'c543': 97, 'c825': 155, 'c433': 20, 'c417': 6, 'c527': 84, 'c546': 99, 'c415': 4, 'c993': 181, 'c501': 65, 'c1063': 198, 'c1002': 185, 'c478': 53, 'c833': 160, 'c794': 131, 'c456': 40, 'c1068': 201, 'c427': 14, 'c834': 161, 'c462': 45, 'c1057': 196, 'c454': 38, 'c512': 72, 'c820': 150, 'c1055': 195, 'c422': 10, 'c1046': 192, 'c441': 27, 'c1021': 190, 'c457': 41, 'c429': 16, 'c852': 169, 'c738': 123, 'c516': 76, 'c513': 73, 'c847': 167, 'c502': 66, 'c426': 13, 'c830': 158, 'c534': 89, 'c450': 35, 'c538': 93, 'c745': 124, 'c871': 175, 'c461': 44, 'c442': 28, 'c853': 170, 'c458': 42, 'c474': 49, 'c476': 51, 'c855': 171, 'c525': 82, 'c541': 96, 'c1047': 193, 'c793': 130, 'c411': 2, 'c465': 48, 'c533': 88, 'c599': 107, 'c475': 50, 'c484': 55, 'c437': 23, 'c1079': 205, 'c932': 178, 'c495': 61, 'c816': 149, 'c856': 172, 'c846': 166, 'c561': 103, 'c730': 121, 'c449': 34, 'c607': 111, 'c430': 17, 'c566': 105, 'c438': 24, 'c790': 128, 'c507': 69, 'c455': 39, 'c718': 117, 'c789': 127, 'c536': 91, 'c443': 29, 'c835': 162, 'c845': 165, 'c445': 31, 'c1001': 184, 'c747': 125, 'c724': 119, 'c600': 108, 'c869': 174, 'c598': 106, 'c826': 156, 'c489': 58, 'c812': 145, 'c412': 3, 'c670': 113, 'c796': 133, 'c866': 173, 'c540': 95, 'c463': 46, 'c814': 147, 'c440': 26, 'c409': 1, 'c464': 47, 'c800': 136, 'c423': 11, 'c850': 168, 'c806': 140, 'c804': 139, 'c997': 183, 'c840': 164, 'c996': 182, 'c431': 18, 'c1074': 204, 'c460': 43, 'c1067': 200, 'c531': 86, 'c797': 134, 'c606': 110, 'c788': 126, 'c421': 9, 'c487': 57, 'c498': 64, 'c564': 104, 'c922': 177, 'c444': 30, 'c416': 5, 'c1014': 189, 'c503': 67, 'c1094': 208, 'c801': 137, 'c535': 90, 'c808': 142, 'c676': 114, 'c725': 120, 'c1053': 194, 'c530': 85, 'c491': 59, 'c479': 54, 'c537': 92, 'c1003': 186, 'c1082': 207, 'c836': 163, 'c477': 52, 'c795': 132, 'c496': 62, 'c936': 180, 'c544': 98, 'c737': 122, 'c1071': 202, 'c828': 157, 'c494': 60, 'c716': 116, 'c506': 68, 'c446': 32, 'c511': 71, 'c1066': 199, 'c524': 81, 'c497': 63, 'c1005': 188, 'c532': 87, 'c523': 80, 'c791': 129, 'c831': 159, 'c419': 7, 'c554': 101, 'c425': 12, 'c807': 141, 'c435': 21, 'c436': 22, 'c447': 33, 'c1062': 197, 'c823': 153, 'c1022': 191, 'c602': 109, 'c678': 115, 'c822': 152, 'c798': 135, 'c1072': 203, 'c813': 146, 'c515': 75, 'c428': 15, 'c811': 144, 'c510': 70, 'c721': 118, 'c486': 56, 'c432': 19, 'c1081': 206, 'c539': 94, 'c452': 36, 'c520': 78, 'c439': 25, 'c933': 179, 'c1004': 187, 'c921': 176, 'c526': 83, 'c514': 74, 'c560': 102, 'c519': 77, 'c803': 138, 'c453': 37, 'c647': 112, 'c521': 79, 'c810': 143, 'c551': 100, 'c420': 8, 'c815': 148, 'c821': 151}
+3 -2
gbac/gbac.mzn
··· 22 22 % 23 23 %------------------------------------------------------------------------------% 24 24 % Includes 25 - include "globals.mzn"; 25 + include "global_cardinality_low_up_closed.mzn"; 26 + include "bin_packing_load.mzn"; 26 27 27 28 %------------------------------------------------------------------------------% 28 29 % Parameters ··· 119 120 constraint trace("% init_area = \(ub(objective));\n", true); 120 121 output 121 122 ["objective = ", show(objective)] ++[";\n"] ++ 122 - ["period_of = ", show(period_of)] ++ [";\n"]; 123 + ["period_of = ", show(period_of)] ++ [";\n"];
+35
gbac/proto.mzn
··· 1 + include "gbac.mzn"; 2 + %-----------------------------------------------------------------------------% 3 + % Objective 4 + %-----------------------------------------------------------------------------% 5 + 6 + function int: uniform_set(set of int: S) = 7 + if card(S) == max(S) - min(S) + 1 then 8 + uniform(min(S),max(S)) 9 + else 10 + [ i | i in S ][uniform(1,card(S))] 11 + endif; 12 + 13 + 14 + predicate random_allocation() = 15 + forall(i in courses) ( 16 + (uniform(1,100) < 80) -> (period_of[i] == sol(period_of[i])) 17 + ); 18 + 19 + predicate free_period() = 20 + let { 21 + int: period = uniform_set(periods); 22 + } in forall(i in courses) ( 23 + (sol(period_of[i]) != period) -> (period_of[i] == sol(period_of[i])) 24 + ); 25 + 26 + predicate LNS(int: choice) ::export = 27 + objective < sol(objective) /\ 28 + if choice == 0 then 29 + free_period() 30 + else 31 + random_allocation() 32 + endif; 33 + 34 + constraint output_this([objective] ++ period_of); 35 + solve :: int_search(period_of,first_fail,indomain_min,complete) satisfy;
+1397
gbac/proto.uzn
··· 1 + int: w1:: global_register(11); 2 + array [int] of set of int: courses_of:: global_register(3); 3 + int: n_precedences:: global_register(4); 4 + int: max_courses:: global_register(7); 5 + int: w2:: global_register(12); 6 + array [int,int] of int: undesirable:: global_register(10); 7 + int: n_curricula:: global_register(2); 8 + array [int,int] of int: precedes:: global_register(5); 9 + array [int] of int: course_load:: global_register(8); 10 + int: n_undesirables:: global_register(9); 11 + int: n_periods:: global_register(1); 12 + int: min_courses:: global_register(6); 13 + int: n_courses:: global_register(0); 14 + predicate solve_this(int: mode,var int: objective,array [int] of var int: x,int: varsel,int: valsel); 15 + predicate int_plus(var int: a,var int: b,var int: c); 16 + predicate int_max(var int: a,var int: b,var int: c); 17 + predicate int_minus(var int: x,var int: y,var int: z); 18 + predicate gecode_bin_packing_load(array [int] of var int: l,array [int] of var int: bin,array [int] of int: w,int: minIndex); 19 + predicate array_int_minimum(var int: m,array [int] of var int: x); 20 + predicate int_min(var int: a,var int: b,var int: c); 21 + predicate int_lin_le(array [int] of int: as,array [int] of var int: bs,int: c); 22 + predicate fzn_global_cardinality_low_up_closed(array [int] of var int: x,array [int] of int: cover,array [int] of int: lbound,array [int] of int: ubound); 23 + predicate output_this(array [int] of var int: arr); 24 + predicate int_lin_eq_reif(array [int] of int: as,array [int] of var int: bs,int: c,var bool: r); 25 + predicate array_int_maximum(var int: m,array [int] of var int: x); 26 + predicate int_times(var int: a,var int: b,var int: c); 27 + predicate int_sum(array [int] of var int: xs,var int: x); 28 + predicate int_lin_eq(array [int] of int: as,array [int] of var int: bs,int: c); 29 + predicate clause(array [$T] of var bool: x,array [$T] of var bool: y); 30 + predicate clause(array [$T] of bool: x,array [$T] of bool: y); 31 + predicate bool_clause(array [int] of var bool: as,array [int] of var bool: bs); 32 + predicate bool_not(var bool: a,var bool: b); 33 + @@@@@@@@@@ 34 + :mk_intvar: 1 35 + :absent: 1 36 + :infinity: 1 37 + :boolean_domain: 0 38 + :infinite_domain: 0 39 + :uniform: 2 40 + :sol: 1 41 + :sort_by: 2 42 + :floor: 1 43 + :ceil: 1 44 + :slice_Xd: 3 45 + :array_Xd: 2 46 + :index_set: 2 47 + :internal_sort: 1 48 + :f_op_not_b:FUN 1 49 + NOT R0 R1 50 + PUSH R1 51 + RET 52 + :f_op_not_vb:FUN 1 53 + OPEN_AGGREGATION OTHER 54 + BUILTIN boolean_domain 55 + POP R1 56 + CALL ROOT mk_intvar 0 R1 57 + POP R2 58 + CALL ROOT bool_not 1 R0 R2 59 + PUSH R2 60 + CLEAR R1 R2 61 + CLOSE_AGGREGATION 62 + POP R1 63 + PUSH R1 64 + RET 65 + :d_op_not_b:FUN 1 66 + ISPAR R0 R1 67 + JMPIF R1 l0 68 + JMP l1 69 + l0: TCALL FUN f_op_not_b 0 70 + l1: TCALL FUN f_op_not_vb 1 71 + :bool_clause:ROOT 2 72 + :bool_clause_reif:ROOT 3 73 + CALL FUN d_op_not_b 0 R2 74 + POP R3 75 + OPEN_AGGREGATION VEC 76 + PUSH R3 77 + CLOSE_AGGREGATION 78 + POP R4 79 + OPEN_AGGREGATION VEC 80 + ITER_ARRAY R1 l217 81 + l216: ITER_NEXT R6 82 + PUSH R6 83 + JMP l216 84 + l217: ITER_ARRAY R4 l219 85 + l218: ITER_NEXT R7 86 + PUSH R7 87 + JMP l218 88 + l219: CLEAR R6 R7 89 + CLOSE_AGGREGATION 90 + POP R5 91 + IMMI 1 R6 92 + BUILTIN index_set R0 R6 93 + POP R7 94 + ITER_ARRAY R7 l221 95 + l220: ITER_NEXT R8 96 + ITER_NEXT R9 97 + ITER_RANGE R8 R9 l223 98 + l222: ITER_NEXT R10 99 + GET_ARRAY 1 R0 R10 R11 R12 100 + OPEN_AGGREGATION OR 101 + IMMI 0 R14 102 + JMPIFNOT R12 l224 103 + MOV R11 R14 104 + l224: PUSH R14 105 + PUSH R3 106 + CLEAR R14 R14 107 + CLOSE_AGGREGATION 108 + POP R13 109 + POST R13 110 + JMP l222 111 + l223: JMP l220 112 + l221: IMMI 1 R14 113 + BUILTIN index_set R1 R14 114 + POP R15 115 + ITER_ARRAY R15 l226 116 + l225: ITER_NEXT R16 117 + ITER_NEXT R17 118 + ITER_RANGE R16 R17 l228 119 + l227: ITER_NEXT R18 120 + GET_ARRAY 1 R1 R18 R19 R20 121 + IMMI 1 R21 122 + NOT R20 R22 123 + JMPIF R22 l229 124 + OPEN_AGGREGATION OR 125 + CALL FUN d_op_not_b 0 R19 126 + POP R23 127 + PUSH R23 128 + PUSH R3 129 + CLEAR R23 R23 130 + CLOSE_AGGREGATION 131 + POP R21 132 + l229: POST R21 133 + JMP l227 134 + l228: JMP l225 135 + l226: CALL ROOT d_clause_d1b_d1b 1 R0 R5 136 + RET 137 + :int_lin_eq:ROOT 3 138 + :int_lin_eq:FUN 3 139 + OPEN_AGGREGATION OTHER 140 + BUILTIN boolean_domain 141 + POP R3 142 + CALL ROOT mk_intvar 0 R3 143 + POP R4 144 + CALL ROOT int_lin_eq_reif 1 R0 R1 R2 R4 145 + PUSH R4 146 + CLEAR R3 R4 147 + CLOSE_AGGREGATION 148 + POP R3 149 + PUSH R3 150 + RET 151 + :f_pre_int_lin_eq_d1i_d1vi_i:ROOT 3 152 + LENGTH R0 R4 153 + IMMI 0 R5 154 + EQI R4 R5 R6 155 + JMPIFNOT R6 l148 156 + EQI R2 R5 R7 157 + MOV R7 R3 158 + JMP l147 159 + l148: CALL ROOT int_lin_eq 1 R0 R1 R2 160 + IMMI 1 R8 161 + MOV R8 R3 162 + l147: POST R3 163 + RET 164 + :f_pre_int_lin_eq_d1i_d1vi_i:FUN 3 165 + LENGTH R0 R4 166 + IMMI 0 R5 167 + EQI R4 R5 R6 168 + JMPIFNOT R6 l215 169 + EQI R2 R5 R7 170 + MOV R7 R3 171 + JMP l214 172 + l215: CALL FUN int_lin_eq 1 R0 R1 R2 173 + POP R8 174 + MOV R8 R3 175 + l214: PUSH R3 176 + RET 177 + :f_pre_int_lin_eq_d1i_d1vi_i:IMP 3 178 + LENGTH R0 R4 179 + IMMI 0 R5 180 + EQI R4 R5 R6 181 + JMPIFNOT R6 l183 182 + EQI R2 R5 R7 183 + MOV R7 R3 184 + JMP l182 185 + l183: CALL FUN int_lin_eq 1 R0 R1 R2 186 + POP R8 187 + MOV R8 R3 188 + l182: PUSH R3 189 + RET 190 + :f_sum_cc_dTvi:FUN 1 191 + OPEN_AGGREGATION OTHER 192 + IMMI 0 R2 193 + BUILTIN array_Xd R0 R2 194 + POP R1 195 + BUILTIN infinite_domain 196 + POP R3 197 + CALL ROOT mk_intvar 0 R3 198 + POP R4 199 + CALL ROOT int_sum 1 R1 R4 200 + PUSH R4 201 + CLEAR R1 R4 202 + CLOSE_AGGREGATION 203 + POP R1 204 + PUSH R1 205 + RET 206 + :f_op_times_i_i:FUN 2 207 + MULI R0 R1 R2 208 + PUSH R2 209 + RET 210 + :f_op_times_i_vi:FUN 2 211 + IMMI 1 R2 212 + IMMI 1 R4 213 + EQI R0 R2 R5 214 + JMPIFNOT R5 l213 215 + IMMI 0 R4 216 + MOV R1 R3 217 + JMP l212 218 + l213: OPEN_AGGREGATION OTHER 219 + BUILTIN infinite_domain 220 + POP R6 221 + CALL ROOT mk_intvar 0 R6 222 + POP R7 223 + CALL ROOT int_times 1 R0 R1 R7 224 + PUSH R7 225 + CLEAR R6 R7 226 + CLOSE_AGGREGATION 227 + POP R6 228 + IMMI 0 R4 229 + MOV R6 R3 230 + l212: PUSH R3 231 + RET 232 + :f_op_times_vi_i:FUN 2 233 + CALL FUN d_op_times_i_i 0 R1 R0 234 + POP R2 235 + PUSH R2 236 + RET 237 + :f_op_times_vi_vi:FUN 2 238 + OPEN_AGGREGATION OTHER 239 + BUILTIN infinite_domain 240 + POP R2 241 + CALL ROOT mk_intvar 0 R2 242 + POP R3 243 + CALL ROOT int_times 1 R0 R1 R3 244 + PUSH R3 245 + CLEAR R2 R3 246 + CLOSE_AGGREGATION 247 + POP R2 248 + PUSH R2 249 + RET 250 + :d_op_times_i_i:FUN 2 251 + ISPAR R0 R2 252 + JMPIF R2 l69 253 + JMP l70 254 + l69: ISPAR R1 R2 255 + JMPIF R2 l71 256 + JMP l72 257 + l70: ISPAR R1 R2 258 + JMPIF R2 l73 259 + JMP l74 260 + l71: TCALL FUN f_op_times_i_i 0 261 + l72: TCALL FUN f_op_times_i_vi 1 262 + l73: TCALL FUN f_op_times_vi_i 1 263 + l74: TCALL FUN f_op_times_vi_vi 1 264 + :f_LNS_i:ROOT 1 265 + LOAD_GLOBAL 16 R1 266 + BUILTIN sol R1 267 + POP R2 268 + LB R1 R3 269 + UB R2 R4 270 + LTI R3 R4 R3 271 + SIMPLIFY_LIN R1 R2 1 R5 R6 R7 272 + IMMI 0 R9 273 + EQI R0 R9 R10 274 + JMPIFNOT R10 l176 275 + CALL ROOT f_free_period 1 276 + IMMI 1 R11 277 + MOV R11 R8 278 + JMP l175 279 + l176: CALL ROOT f_random_allocation 1 280 + IMMI 1 R12 281 + MOV R12 R8 282 + l175: POST R3 283 + CALL ROOT f_pre_int_lin_le_d1i_d1vi_i 1 R5 R6 R7 284 + POST R8 285 + RET 286 + :output_this:ROOT 1 287 + :f_global_cardinality_low_up_closed_d1vi_d1i_d1i_d1i:ROOT 4 288 + CALL ROOT fzn_global_cardinality_low_up_closed 1 R0 R1 R2 R3 289 + RET 290 + :f_pre_int_lin_le_d1i_d1vi_i:ROOT 3 291 + LENGTH R0 R4 292 + IMMI 0 R5 293 + EQI R4 R5 R6 294 + JMPIFNOT R6 l174 295 + LEI R5 R2 R7 296 + MOV R7 R3 297 + JMP l173 298 + l174: CALL ROOT int_lin_le 1 R0 R1 R2 299 + IMMI 1 R8 300 + MOV R8 R3 301 + l173: POST R3 302 + RET 303 + :f_bin_packing_load_d1vi_d1vi_d1i:ROOT 3 304 + CALL ROOT f_fzn_bin_packing_load_d1vi_d1vi_d1i 1 R0 R1 R2 305 + RET 306 + :f_op_minus_i_i:FUN 2 307 + SUBI R0 R1 R2 308 + PUSH R2 309 + RET 310 + :f_op_minus_vi_i:FUN 2 311 + IMMI 1 R2 312 + IMMI 1 R4 313 + IMMI 0 R5 314 + EQI R1 R5 R6 315 + JMPIFNOT R6 l152 316 + IMMI 0 R4 317 + MOV R0 R3 318 + JMP l151 319 + l152: OPEN_AGGREGATION OTHER 320 + BUILTIN infinite_domain 321 + POP R7 322 + CALL ROOT mk_intvar 0 R7 323 + POP R8 324 + CALL ROOT int_minus 1 R0 R1 R8 325 + PUSH R8 326 + CLEAR R7 R8 327 + CLOSE_AGGREGATION 328 + POP R7 329 + IMMI 0 R4 330 + MOV R7 R3 331 + l151: PUSH R3 332 + RET 333 + :f_op_minus_vi_vi:FUN 2 334 + OPEN_AGGREGATION OTHER 335 + BUILTIN infinite_domain 336 + POP R2 337 + CALL ROOT mk_intvar 0 R2 338 + POP R3 339 + CALL ROOT int_minus 1 R0 R1 R3 340 + PUSH R3 341 + CLEAR R2 R3 342 + CLOSE_AGGREGATION 343 + POP R2 344 + PUSH R2 345 + RET 346 + :d_op_minus_i_i:FUN 2 347 + ISPAR R0 R2 348 + JMPIF R2 l130 349 + JMP l131 350 + l130: ISPAR R1 R2 351 + JMPIF R2 l132 352 + JMP l133 353 + l131: ISPAR R1 R2 354 + JMPIF R2 l134 355 + JMP l133 356 + l132: TCALL FUN f_op_minus_i_i 0 357 + l133: TCALL FUN f_op_minus_vi_vi 1 358 + l134: TCALL FUN f_op_minus_vi_i 1 359 + :f_max_t_t:FUN 2 360 + IMMI 1 R2 361 + IMMI 1 R4 362 + LTI R1 R0 R5 363 + JMPIFNOT R5 l150 364 + IMMI 0 R4 365 + MOV R0 R3 366 + JMP l149 367 + l150: IMMI 0 R4 368 + MOV R1 R3 369 + l149: PUSH R3 370 + RET 371 + :f_max_vi_vi:FUN 2 372 + OPEN_AGGREGATION OTHER 373 + LB R0 R2 374 + LB R1 R3 375 + CALL FUN d_max_i_i 0 R2 R3 376 + POP R4 377 + UB R0 R5 378 + UB R1 R6 379 + CALL FUN d_max_i_i 0 R5 R6 380 + POP R7 381 + OPEN_AGGREGATION VEC 382 + PUSH R4 383 + PUSH R7 384 + CLOSE_AGGREGATION 385 + POP R8 386 + CALL ROOT mk_intvar 0 R8 387 + POP R9 388 + CALL ROOT int_max 1 R0 R1 R9 389 + PUSH R9 390 + CLEAR R2 R9 391 + CLOSE_AGGREGATION 392 + POP R2 393 + PUSH R2 394 + RET 395 + :d_max_i_i:FUN 2 396 + ISPAR R0 R2 397 + JMPIF R2 l135 398 + JMP l136 399 + l135: ISPAR R1 R2 400 + JMPIF R2 l137 401 + JMP l138 402 + l136: JMP l138 403 + l137: TCALL FUN f_max_t_t 0 404 + l138: TCALL FUN f_max_vi_vi 1 405 + :f_op_plus_i_i:FUN 2 406 + ADDI R0 R1 R2 407 + PUSH R2 408 + RET 409 + :f_op_plus_i_vi:FUN 2 410 + IMMI 1 R2 411 + IMMI 1 R4 412 + IMMI 0 R5 413 + EQI R0 R5 R6 414 + JMPIFNOT R6 l146 415 + IMMI 0 R4 416 + MOV R1 R3 417 + JMP l145 418 + l146: OPEN_AGGREGATION OTHER 419 + BUILTIN infinite_domain 420 + POP R7 421 + CALL ROOT mk_intvar 0 R7 422 + POP R8 423 + CALL ROOT int_plus 1 R0 R1 R8 424 + PUSH R8 425 + CLEAR R7 R8 426 + CLOSE_AGGREGATION 427 + POP R7 428 + IMMI 0 R4 429 + MOV R7 R3 430 + l145: PUSH R3 431 + RET 432 + :f_op_plus_vi_i:FUN 2 433 + CALL FUN d_op_plus_i_i 0 R1 R0 434 + POP R2 435 + PUSH R2 436 + RET 437 + :f_op_plus_vi_vi:FUN 2 438 + OPEN_AGGREGATION OTHER 439 + BUILTIN infinite_domain 440 + POP R2 441 + CALL ROOT mk_intvar 0 R2 442 + POP R3 443 + CALL ROOT int_plus 1 R0 R1 R3 444 + PUSH R3 445 + CLEAR R2 R3 446 + CLOSE_AGGREGATION 447 + POP R2 448 + PUSH R2 449 + RET 450 + :d_op_plus_i_i:FUN 2 451 + ISPAR R0 R2 452 + JMPIF R2 l139 453 + JMP l140 454 + l139: ISPAR R1 R2 455 + JMPIF R2 l141 456 + JMP l142 457 + l140: ISPAR R1 R2 458 + JMPIF R2 l143 459 + JMP l144 460 + l141: TCALL FUN f_op_plus_i_i 0 461 + l142: TCALL FUN f_op_plus_i_vi 1 462 + l143: TCALL FUN f_op_plus_vi_i 1 463 + l144: TCALL FUN f_op_plus_vi_vi 1 464 + :solve_this:ROOT 5 465 + :int_plus:ROOT 3 466 + :int_max:ROOT 3 467 + :int_minus:ROOT 3 468 + :f_fzn_bin_packing_load_d1vi_d1vi_d1i:ROOT 3 469 + IMMI 1 R3 470 + BUILTIN index_set R0 R3 471 + POP R4 472 + CALL FUN d_min_si 0 R4 473 + POP R5 474 + CALL ROOT gecode_bin_packing_load 1 R0 R1 R2 R5 475 + RET 476 + :f_min_si:FUN 1 477 + LENGTH R0 R2 478 + IMMI 1 R3 479 + LEI R3 R2 R1 480 + JMPIF R1 l172 481 + ABORT 482 + l172: GET_VEC R0 R3 R1 483 + PUSH R1 484 + RET 485 + :f_min_dTvi:FUN 1 486 + IMMI 0 R2 487 + BUILTIN array_Xd R0 R2 488 + POP R1 489 + LENGTH R0 R3 490 + IMMI 1 R4 491 + LEI R4 R3 R5 492 + CALL FUN f_min_t_d1vi 1 R1 493 + POP R6 494 + PUSH R6 495 + RET 496 + :d_min_si:FUN 1 497 + ISPAR R0 R1 498 + JMPIF R1 l153 499 + JMP l154 500 + l153: TCALL FUN f_min_si 0 501 + l154: TCALL FUN f_min_dTvi 1 502 + :gecode_bin_packing_load:ROOT 4 503 + :f_min_t_d1vi:FUN 1 504 + IMMI 1 R1 505 + IMMI 1 R3 506 + LENGTH R0 R4 507 + IMMI 0 R5 508 + EQI R4 R5 R6 509 + JMPIFNOT R6 l156 510 + IMMI 0 R3 511 + MOV R5 R2 512 + JMP l155 513 + l156: EQI R4 R1 R7 514 + JMPIFNOT R7 l157 515 + GET_ARRAY 1 R0 R1 R8 R9 516 + MOV R9 R3 517 + MOV R8 R2 518 + JMP l155 519 + l157: IMMI 2 R10 520 + EQI R4 R10 R11 521 + JMPIFNOT R11 l158 522 + GET_ARRAY 1 R0 R1 R12 R13 523 + GET_ARRAY 1 R0 R10 R14 R15 524 + CALL FUN d_min_i_i 1 R12 R14 525 + POP R16 526 + IMMI 0 R17 527 + JMPIFNOT R13 l163 528 + MOV R15 R17 529 + l163: MOV R17 R3 530 + MOV R16 R2 531 + JMP l155 532 + l158: OPEN_AGGREGATION OTHER 533 + BUILTIN infinity R1 534 + POP R18 535 + ITER_ARRAY R0 l166 536 + l165: ITER_NEXT R21 537 + LB R21 R19 538 + LTI R19 R18 R20 539 + JMPIFNOT R20 l164 540 + MOV R19 R18 541 + l164: JMP l165 542 + l166: BUILTIN infinity R5 543 + POP R22 544 + ITER_ARRAY R0 l169 545 + l168: ITER_NEXT R25 546 + UB R25 R23 547 + LTI R22 R23 R24 548 + JMPIFNOT R24 l167 549 + MOV R23 R22 550 + l167: JMP l168 551 + l169: OPEN_AGGREGATION VEC 552 + PUSH R18 553 + PUSH R22 554 + CLOSE_AGGREGATION 555 + POP R26 556 + CALL ROOT mk_intvar 0 R26 557 + POP R27 558 + CALL ROOT array_int_minimum 1 R27 R0 559 + PUSH R27 560 + CLEAR R18 R27 561 + CLOSE_AGGREGATION 562 + POP R18 563 + IMMI 0 R3 564 + MOV R18 R2 565 + l155: PUSH R2 566 + RET 567 + :f_min_t_t:FUN 2 568 + IMMI 1 R2 569 + IMMI 1 R4 570 + LTI R0 R1 R5 571 + JMPIFNOT R5 l171 572 + IMMI 0 R4 573 + MOV R0 R3 574 + JMP l170 575 + l171: IMMI 0 R4 576 + MOV R1 R3 577 + l170: PUSH R3 578 + RET 579 + :f_min_vi_vi:FUN 2 580 + OPEN_AGGREGATION OTHER 581 + LB R0 R2 582 + LB R1 R3 583 + CALL FUN d_min_i_i 0 R2 R3 584 + POP R4 585 + UB R0 R5 586 + UB R1 R6 587 + CALL FUN d_min_i_i 0 R5 R6 588 + POP R7 589 + OPEN_AGGREGATION VEC 590 + PUSH R4 591 + PUSH R7 592 + CLOSE_AGGREGATION 593 + POP R8 594 + CALL ROOT mk_intvar 0 R8 595 + POP R9 596 + CALL ROOT int_min 1 R0 R1 R9 597 + PUSH R9 598 + CLEAR R2 R9 599 + CLOSE_AGGREGATION 600 + POP R2 601 + PUSH R2 602 + RET 603 + :d_min_i_i:FUN 2 604 + ISPAR R0 R2 605 + JMPIF R2 l159 606 + JMP l160 607 + l159: ISPAR R1 R2 608 + JMPIF R2 l161 609 + JMP l162 610 + l160: JMP l162 611 + l161: TCALL FUN f_min_t_t 0 612 + l162: TCALL FUN f_min_vi_vi 1 613 + :array_int_minimum:ROOT 2 614 + :int_min:ROOT 3 615 + :int_lin_le:ROOT 3 616 + :fzn_global_cardinality_low_up_closed:ROOT 4 617 + :f_free_period:ROOT 0 618 + LOAD_GLOBAL 14 R0 619 + CALL FUN f_uniform_set_si 0 R0 620 + POP R1 621 + LOAD_GLOBAL 13 R2 622 + ITER_ARRAY R2 l185 623 + l184: ITER_NEXT R3 624 + ITER_NEXT R4 625 + ITER_RANGE R3 R4 l187 626 + l186: ITER_NEXT R5 627 + LOAD_GLOBAL 15 R7 628 + GET_ARRAY 1 R7 R5 R8 R9 629 + BUILTIN sol R8 630 + POP R6 631 + EQI R6 R1 R10 632 + NOT R10 R10 633 + IMMI 0 R11 634 + JMPIFNOT R9 l188 635 + MOV R10 R11 636 + l188: DOM R8 R12 637 + DOM R6 R13 638 + INTERSECTION R12 R13 R12 639 + ISEMPTY R12 R13 640 + NOT R13 R13 641 + SIMPLIFY_LIN R8 R6 0 R15 R16 R14 642 + IMMI 1 R17 643 + JMPIF R11 l189 644 + NOT R9 R18 645 + JMPIF R18 l189 646 + NOT R13 R19 647 + JMPIF R19 l189 648 + CALL IMP f_pre_int_lin_eq_d1i_d1vi_i 1 R15 R16 R14 649 + POP R20 650 + MOV R20 R17 651 + l189: POST R17 652 + JMP l186 653 + l187: JMP l184 654 + l185: RET 655 + :f_random_allocation:ROOT 0 656 + LOAD_GLOBAL 13 R0 657 + ITER_ARRAY R0 l178 658 + l177: ITER_NEXT R1 659 + ITER_NEXT R2 660 + ITER_RANGE R1 R2 l180 661 + l179: ITER_NEXT R3 662 + IMMI 1 R5 663 + IMMI 100 R6 664 + BUILTIN uniform R5 R6 665 + POP R4 666 + IMMI 80 R7 667 + LTI R4 R7 R8 668 + LOAD_GLOBAL 15 R9 669 + GET_ARRAY 1 R9 R3 R10 R11 670 + BUILTIN sol R10 671 + POP R12 672 + DOM R10 R13 673 + DOM R12 R14 674 + INTERSECTION R13 R14 R13 675 + ISEMPTY R13 R14 676 + NOT R14 R14 677 + SIMPLIFY_LIN R10 R12 0 R16 R17 R15 678 + IMMI 1 R18 679 + JMPIF R8 l181 680 + NOT R11 R19 681 + JMPIF R19 l181 682 + NOT R14 R20 683 + JMPIF R20 l181 684 + CALL IMP f_pre_int_lin_eq_d1i_d1vi_i 1 R16 R17 R15 685 + POP R21 686 + MOV R21 R18 687 + l181: POST R18 688 + JMP l179 689 + l180: JMP l177 690 + l178: RET 691 + :int_lin_eq_reif:ROOT 4 692 + :f_uniform_set_si:FUN 1 693 + IMMI 1 R1 694 + IMMI 1 R3 695 + IMMI 0 R4 696 + IMMI 1 R5 697 + LENGTH R0 R6 698 + LTI R5 R6 R7 699 + JMPIFNOT R7 l192 700 + l191: INCI R4 701 + GET_VEC R0 R5 R7 702 + SUBI R4 R7 R4 703 + INCI R5 704 + GET_VEC R0 R5 R7 705 + INCI R5 706 + ADDI R4 R7 R4 707 + LTI R5 R6 R7 708 + JMPIF R7 l191 709 + l192: CALL FUN d_max_si 0 R0 710 + POP R8 711 + CALL FUN d_min_si 0 R0 712 + POP R9 713 + SUBI R8 R9 R10 714 + ADDI R10 R1 R11 715 + EQI R4 R11 R12 716 + JMPIFNOT R12 l195 717 + BUILTIN uniform R9 R8 718 + POP R13 719 + IMMI 0 R3 720 + MOV R13 R2 721 + JMP l190 722 + l195: BUILTIN uniform R1 R4 723 + POP R14 724 + OPEN_AGGREGATION VEC 725 + ITER_ARRAY R0 l197 726 + l196: ITER_NEXT R15 727 + ITER_NEXT R16 728 + ITER_RANGE R15 R16 l199 729 + l198: ITER_NEXT R17 730 + PUSH R17 731 + JMP l198 732 + l199: JMP l196 733 + l197: CLEAR R15 R17 734 + CLOSE_AGGREGATION 735 + POP R15 736 + GET_ARRAY 1 R15 R14 R16 R17 737 + MOV R17 R3 738 + MOV R16 R2 739 + l190: PUSH R2 740 + RET 741 + :f_max_si:FUN 1 742 + LENGTH R0 R2 743 + IMMI 0 R3 744 + LEI R3 R2 R1 745 + JMPIF R1 l211 746 + ABORT 747 + l211: GET_VEC R0 R2 R1 748 + PUSH R1 749 + RET 750 + :f_max_dTvi:FUN 1 751 + IMMI 0 R2 752 + BUILTIN array_Xd R0 R2 753 + POP R1 754 + LENGTH R0 R3 755 + IMMI 1 R4 756 + LEI R4 R3 R5 757 + CALL FUN f_max_t_d1vi 1 R1 758 + POP R6 759 + PUSH R6 760 + RET 761 + :d_max_si:FUN 1 762 + ISPAR R0 R1 763 + JMPIF R1 l193 764 + JMP l194 765 + l193: TCALL FUN f_max_si 0 766 + l194: TCALL FUN f_max_dTvi 1 767 + :f_max_t_d1vi:FUN 1 768 + IMMI 1 R1 769 + IMMI 1 R3 770 + LENGTH R0 R4 771 + IMMI 0 R5 772 + EQI R4 R5 R6 773 + JMPIFNOT R6 l201 774 + IMMI 0 R3 775 + MOV R5 R2 776 + JMP l200 777 + l201: EQI R4 R1 R7 778 + JMPIFNOT R7 l202 779 + BUILTIN index_set R0 R1 780 + POP R8 781 + CALL FUN d_min_si 0 R8 782 + POP R9 783 + GET_ARRAY 1 R0 R9 R10 R11 784 + MOV R11 R3 785 + MOV R10 R2 786 + JMP l200 787 + l202: IMMI 2 R12 788 + EQI R4 R12 R13 789 + JMPIFNOT R13 l203 790 + GET_ARRAY 1 R0 R1 R14 R15 791 + GET_ARRAY 1 R0 R12 R16 R17 792 + CALL FUN d_max_i_i 0 R14 R16 793 + POP R18 794 + IMMI 0 R19 795 + JMPIFNOT R15 l204 796 + MOV R17 R19 797 + l204: MOV R19 R3 798 + MOV R18 R2 799 + JMP l200 800 + l203: OPEN_AGGREGATION OTHER 801 + BUILTIN infinity R1 802 + POP R20 803 + ITER_ARRAY R0 l207 804 + l206: ITER_NEXT R23 805 + LB R23 R21 806 + LTI R21 R20 R22 807 + JMPIFNOT R22 l205 808 + MOV R21 R20 809 + l205: JMP l206 810 + l207: BUILTIN infinity R5 811 + POP R24 812 + ITER_ARRAY R0 l210 813 + l209: ITER_NEXT R27 814 + UB R27 R25 815 + LTI R24 R25 R26 816 + JMPIFNOT R26 l208 817 + MOV R25 R24 818 + l208: JMP l209 819 + l210: OPEN_AGGREGATION VEC 820 + PUSH R20 821 + PUSH R24 822 + CLOSE_AGGREGATION 823 + POP R28 824 + CALL ROOT mk_intvar 0 R28 825 + POP R29 826 + CALL ROOT array_int_maximum 1 R29 R0 827 + PUSH R29 828 + CLEAR R20 R29 829 + CLOSE_AGGREGATION 830 + POP R20 831 + IMMI 0 R3 832 + MOV R20 R2 833 + l200: PUSH R2 834 + RET 835 + :array_int_maximum:ROOT 2 836 + :int_times:ROOT 3 837 + :int_sum:ROOT 2 838 + :clause:ROOT 2 839 + :clause:ROOT 2 840 + :d_clause_d1b_d1b:ROOT 2 841 + ISPAR R0 R2 842 + JMPIF R2 l230 843 + JMP l231 844 + l230: ISPAR R1 R2 845 + JMPIF R2 l232 846 + JMP l233 847 + l231: JMP l233 848 + l232: TCALL ROOT clause 1 849 + l233: TCALL ROOT clause 1 850 + :bool_not:ROOT 2 851 + :main:ROOT 0 852 + OPEN_AGGREGATION OTHER 853 + IMMI 1 R0 854 + LOAD_GLOBAL 0 R1 855 + OPEN_AGGREGATION VEC 856 + PUSH R0 857 + PUSH R1 858 + CLOSE_AGGREGATION 859 + POP R2 860 + STORE_GLOBAL R2 13 861 + LOAD_GLOBAL 1 R3 862 + OPEN_AGGREGATION VEC 863 + PUSH R0 864 + PUSH R3 865 + CLOSE_AGGREGATION 866 + POP R4 867 + STORE_GLOBAL R4 14 868 + OPEN_AGGREGATION VEC 869 + ITER_ARRAY R2 l3 870 + l2: ITER_NEXT R7 871 + ITER_NEXT R8 872 + ITER_RANGE R7 R8 l5 873 + l4: ITER_NEXT R9 874 + CALL ROOT mk_intvar 0 R4 875 + JMP l4 876 + l5: JMP l2 877 + l3: CLEAR R7 R9 878 + CLOSE_AGGREGATION 879 + POP R5 880 + OPEN_AGGREGATION VEC 881 + GET_VEC R2 R0 R6 882 + PUSH R6 883 + IMMI 2 R7 884 + GET_VEC R2 R7 R6 885 + PUSH R6 886 + CLEAR R7 R7 887 + CLOSE_AGGREGATION 888 + POP R6 889 + BUILTIN array_Xd R5 R6 890 + POP R5 891 + STORE_GLOBAL R5 15 892 + BUILTIN infinite_domain 893 + POP R7 894 + CALL ROOT mk_intvar 0 R7 895 + POP R8 896 + STORE_GLOBAL R8 16 897 + LOAD_GLOBAL 2 R9 898 + OPEN_AGGREGATION VEC 899 + PUSH R0 900 + PUSH R9 901 + CLOSE_AGGREGATION 902 + POP R10 903 + STORE_GLOBAL R10 17 904 + LOAD_GLOBAL 4 R11 905 + OPEN_AGGREGATION VEC 906 + PUSH R0 907 + PUSH R11 908 + CLOSE_AGGREGATION 909 + POP R12 910 + STORE_GLOBAL R12 18 911 + OPEN_AGGREGATION VEC 912 + ITER_ARRAY R2 l7 913 + l6: ITER_NEXT R13 914 + ITER_NEXT R14 915 + ITER_RANGE R13 R14 l9 916 + l8: ITER_NEXT R15 917 + LOAD_GLOBAL 8 R16 918 + GET_ARRAY 1 R16 R15 R17 R18 919 + PUSH R17 920 + JMP l8 921 + l9: JMP l6 922 + l7: CLEAR R13 R18 923 + CLOSE_AGGREGATION 924 + POP R13 925 + IMMI 0 R14 926 + ITER_ARRAY R13 l11 927 + l10: ITER_NEXT R15 928 + ADDI R14 R15 R14 929 + JMP l10 930 + l11: STORE_GLOBAL R14 19 931 + OPEN_AGGREGATION VEC 932 + ITER_ARRAY R10 l13 933 + l12: ITER_NEXT R16 934 + ITER_NEXT R17 935 + ITER_RANGE R16 R17 l15 936 + l14: ITER_NEXT R18 937 + LOAD_GLOBAL 3 R19 938 + GET_ARRAY 1 R19 R18 R20 R21 939 + OPEN_AGGREGATION VEC 940 + ITER_ARRAY R20 l17 941 + l16: ITER_NEXT R22 942 + ITER_NEXT R23 943 + ITER_RANGE R22 R23 l19 944 + l18: ITER_NEXT R24 945 + LOAD_GLOBAL 8 R25 946 + GET_ARRAY 1 R25 R24 R26 R27 947 + PUSH R26 948 + JMP l18 949 + l19: JMP l16 950 + l17: CLEAR R22 R27 951 + CLOSE_AGGREGATION 952 + POP R22 953 + IMMI 0 R23 954 + ITER_ARRAY R22 l21 955 + l20: ITER_NEXT R24 956 + ADDI R23 R24 R23 957 + JMP l20 958 + l21: PUSH R23 959 + JMP l14 960 + l15: JMP l12 961 + l13: CLEAR R16 R24 962 + CLOSE_AGGREGATION 963 + POP R16 964 + STORE_GLOBAL R16 20 965 + OPEN_AGGREGATION VEC 966 + ITER_ARRAY R10 l23 967 + l22: ITER_NEXT R17 968 + ITER_NEXT R18 969 + ITER_RANGE R17 R18 l25 970 + l24: ITER_NEXT R19 971 + GET_ARRAY 1 R16 R19 R20 R21 972 + IMMI 0 R23 973 + EQI R3 R23 R22 974 + NOT R22 R22 975 + JMPIFNOT R22 l26 976 + DIVI R20 R3 R24 977 + MOV R24 R23 978 + l26: PUSH R23 979 + JMP l24 980 + l25: JMP l22 981 + l23: CLEAR R17 R24 982 + CLOSE_AGGREGATION 983 + POP R17 984 + STORE_GLOBAL R17 21 985 + OPEN_AGGREGATION VEC 986 + ITER_ARRAY R10 l28 987 + l27: ITER_NEXT R18 988 + ITER_NEXT R19 989 + ITER_RANGE R18 R19 l30 990 + l29: ITER_NEXT R20 991 + GET_ARRAY 1 R16 R20 R21 R22 992 + IMMI 0 R24 993 + EQI R3 R24 R23 994 + NOT R23 R23 995 + JMPIFNOT R23 l31 996 + DIVI R21 R3 R25 997 + MOV R25 R24 998 + l31: IMMI 1 R27 999 + IMMI 0 R29 1000 + EQI R3 R29 R28 1001 + NOT R28 R28 1002 + JMPIFNOT R28 l33 1003 + MODI R21 R3 R30 1004 + MOV R30 R29 1005 + l33: IMMI 0 R31 1006 + IMMI 0 R32 1007 + JMPIFNOT R22 l34 1008 + MOV R28 R32 1009 + l34: EQI R29 R31 R33 1010 + IMMI 0 R34 1011 + JMPIFNOT R32 l35 1012 + MOV R33 R34 1013 + l35: JMPIFNOT R34 l36 1014 + IMMI 0 R27 1015 + MOV R31 R26 1016 + JMP l32 1017 + l36: IMMI 0 R27 1018 + MOV R0 R26 1019 + l32: ADDI R24 R26 R35 1020 + PUSH R35 1021 + JMP l29 1022 + l30: JMP l27 1023 + l28: CLEAR R18 R35 1024 + CLOSE_AGGREGATION 1025 + POP R18 1026 + STORE_GLOBAL R18 22 1027 + LOAD_GLOBAL 9 R19 1028 + OPEN_AGGREGATION VEC 1029 + PUSH R0 1030 + PUSH R19 1031 + CLOSE_AGGREGATION 1032 + POP R20 1033 + STORE_GLOBAL R20 23 1034 + IMMI 0 R21 1035 + OPEN_AGGREGATION VEC 1036 + PUSH R21 1037 + PUSH R14 1038 + CLOSE_AGGREGATION 1039 + POP R22 1040 + OPEN_AGGREGATION VEC 1041 + ITER_ARRAY R10 l38 1042 + l37: ITER_NEXT R25 1043 + ITER_NEXT R26 1044 + ITER_RANGE R25 R26 l40 1045 + l39: ITER_NEXT R27 1046 + ITER_ARRAY R4 l42 1047 + l41: ITER_NEXT R28 1048 + ITER_NEXT R29 1049 + ITER_RANGE R28 R29 l44 1050 + l43: ITER_NEXT R30 1051 + CALL ROOT mk_intvar 0 R22 1052 + JMP l43 1053 + l44: JMP l41 1054 + l42: JMP l39 1055 + l40: JMP l37 1056 + l38: CLEAR R25 R30 1057 + CLOSE_AGGREGATION 1058 + POP R23 1059 + OPEN_AGGREGATION VEC 1060 + GET_VEC R10 R0 R24 1061 + PUSH R24 1062 + IMMI 2 R25 1063 + GET_VEC R10 R25 R24 1064 + PUSH R24 1065 + GET_VEC R4 R0 R24 1066 + PUSH R24 1067 + GET_VEC R4 R25 R24 1068 + PUSH R24 1069 + CLEAR R25 R25 1070 + CLOSE_AGGREGATION 1071 + POP R24 1072 + BUILTIN array_Xd R23 R24 1073 + POP R23 1074 + STORE_GLOBAL R23 24 1075 + OPEN_AGGREGATION VEC 1076 + ITER_ARRAY R20 l46 1077 + l45: ITER_NEXT R25 1078 + ITER_NEXT R26 1079 + ITER_RANGE R25 R26 l48 1080 + l47: ITER_NEXT R27 1081 + LOAD_GLOBAL 10 R28 1082 + GET_ARRAY 2 R28 R27 R0 R29 R30 1083 + GET_ARRAY 1 R5 R29 R31 R32 1084 + IMMI 2 R33 1085 + GET_ARRAY 2 R28 R27 R33 R34 R35 1086 + DOM R31 R36 1087 + DOM R34 R37 1088 + INTERSECTION R36 R37 R36 1089 + ISEMPTY R36 R37 1090 + NOT R37 R37 1091 + SIMPLIFY_LIN R31 R34 0 R39 R40 R38 1092 + IMMI 0 R41 1093 + JMPIFNOT R30 l49 1094 + JMPIFNOT R32 l49 1095 + JMPIFNOT R35 l49 1096 + JMPIFNOT R37 l49 1097 + CALL FUN f_pre_int_lin_eq_d1i_d1vi_i 1 R39 R40 R38 1098 + POP R42 1099 + MOV R42 R41 1100 + l49: PUSH R41 1101 + JMP l47 1102 + l48: JMP l45 1103 + l46: CLEAR R25 R42 1104 + CLOSE_AGGREGATION 1105 + POP R25 1106 + LENGTH R25 R26 1107 + JMPIFNOT R26 l50 1108 + EQI R0 R26 R27 1109 + JMPIF R27 l51 1110 + CALL FUN f_sum_cc_dTvi 1 R25 1111 + POP R27 1112 + JMP l52 1113 + l50: IMMI 0 R27 1114 + JMP l52 1115 + l51: GET_VEC R25 R0 R27 1116 + l52: OPEN_AGGREGATION VEC 1117 + PUSH R21 1118 + PUSH R19 1119 + CLOSE_AGGREGATION 1120 + POP R28 1121 + INTERSECT_DOMAIN R27 R28 R29 1122 + STORE_GLOBAL R27 25 1123 + OPEN_AGGREGATION VEC 1124 + ITER_ARRAY R10 l54 1125 + l53: ITER_NEXT R32 1126 + ITER_NEXT R33 1127 + ITER_RANGE R32 R33 l56 1128 + l55: ITER_NEXT R34 1129 + ITER_ARRAY R4 l58 1130 + l57: ITER_NEXT R35 1131 + ITER_NEXT R36 1132 + ITER_RANGE R35 R36 l60 1133 + l59: ITER_NEXT R37 1134 + CALL ROOT mk_intvar 0 R22 1135 + JMP l59 1136 + l60: JMP l57 1137 + l58: JMP l55 1138 + l56: JMP l53 1139 + l54: CLEAR R32 R37 1140 + CLOSE_AGGREGATION 1141 + POP R30 1142 + OPEN_AGGREGATION VEC 1143 + GET_VEC R10 R0 R31 1144 + PUSH R31 1145 + IMMI 2 R32 1146 + GET_VEC R10 R32 R31 1147 + PUSH R31 1148 + GET_VEC R4 R0 R31 1149 + PUSH R31 1150 + GET_VEC R4 R32 R31 1151 + PUSH R31 1152 + CLEAR R32 R32 1153 + CLOSE_AGGREGATION 1154 + POP R31 1155 + BUILTIN array_Xd R30 R31 1156 + POP R30 1157 + STORE_GLOBAL R30 26 1158 + OPEN_AGGREGATION VEC 1159 + ITER_ARRAY R10 l62 1160 + l61: ITER_NEXT R32 1161 + ITER_NEXT R33 1162 + ITER_RANGE R32 R33 l64 1163 + l63: ITER_NEXT R34 1164 + ITER_ARRAY R4 l66 1165 + l65: ITER_NEXT R35 1166 + ITER_NEXT R36 1167 + ITER_RANGE R35 R36 l68 1168 + l67: ITER_NEXT R37 1169 + GET_ARRAY 2 R30 R34 R37 R38 R39 1170 + CALL FUN d_op_times_i_i 1 R38 R38 1171 + POP R40 1172 + PUSH R40 1173 + JMP l67 1174 + l68: JMP l65 1175 + l66: JMP l63 1176 + l64: JMP l61 1177 + l62: CLEAR R32 R40 1178 + CLOSE_AGGREGATION 1179 + POP R32 1180 + LENGTH R32 R33 1181 + JMPIFNOT R33 l75 1182 + EQI R0 R33 R34 1183 + JMPIF R34 l76 1184 + CALL FUN f_sum_cc_dTvi 1 R32 1185 + POP R34 1186 + JMP l77 1187 + l75: IMMI 0 R34 1188 + JMP l77 1189 + l76: GET_VEC R32 R0 R34 1190 + l77: STORE_GLOBAL R34 27 1191 + OPEN_AGGREGATION VEC 1192 + PUSH R8 1193 + CLOSE_AGGREGATION 1194 + POP R35 1195 + OPEN_AGGREGATION VEC 1196 + ITER_ARRAY R35 l79 1197 + l78: ITER_NEXT R37 1198 + PUSH R37 1199 + JMP l78 1200 + l79: ITER_ARRAY R5 l81 1201 + l80: ITER_NEXT R38 1202 + PUSH R38 1203 + JMP l80 1204 + l81: CLEAR R37 R38 1205 + CLOSE_AGGREGATION 1206 + POP R36 1207 + CALL ROOT output_this 1 R36 1208 + ITER_ARRAY R10 l83 1209 + l82: ITER_NEXT R37 1210 + ITER_NEXT R38 1211 + ITER_RANGE R37 R38 l85 1212 + l84: ITER_NEXT R39 1213 + LOAD_GLOBAL 3 R40 1214 + GET_ARRAY 1 R40 R39 R41 R42 1215 + OPEN_AGGREGATION VEC 1216 + ITER_ARRAY R41 l87 1217 + l86: ITER_NEXT R43 1218 + ITER_NEXT R44 1219 + ITER_RANGE R43 R44 l89 1220 + l88: ITER_NEXT R45 1221 + GET_ARRAY 1 R5 R45 R46 R47 1222 + PUSH R46 1223 + JMP l88 1224 + l89: JMP l86 1225 + l87: CLEAR R43 R47 1226 + CLOSE_AGGREGATION 1227 + POP R43 1228 + OPEN_AGGREGATION VEC 1229 + ITER_ARRAY R4 l91 1230 + l90: ITER_NEXT R44 1231 + ITER_NEXT R45 1232 + ITER_RANGE R44 R45 l93 1233 + l92: ITER_NEXT R46 1234 + PUSH R46 1235 + JMP l92 1236 + l93: JMP l90 1237 + l91: CLEAR R44 R46 1238 + CLOSE_AGGREGATION 1239 + POP R44 1240 + OPEN_AGGREGATION VEC 1241 + ITER_ARRAY R4 l95 1242 + l94: ITER_NEXT R45 1243 + ITER_NEXT R46 1244 + ITER_RANGE R45 R46 l97 1245 + l96: ITER_NEXT R47 1246 + LOAD_GLOBAL 6 R48 1247 + PUSH R48 1248 + JMP l96 1249 + l97: JMP l94 1250 + l95: CLEAR R45 R48 1251 + CLOSE_AGGREGATION 1252 + POP R45 1253 + OPEN_AGGREGATION VEC 1254 + ITER_ARRAY R4 l99 1255 + l98: ITER_NEXT R46 1256 + ITER_NEXT R47 1257 + ITER_RANGE R46 R47 l101 1258 + l100: ITER_NEXT R48 1259 + LOAD_GLOBAL 7 R49 1260 + PUSH R49 1261 + JMP l100 1262 + l101: JMP l98 1263 + l99: CLEAR R46 R49 1264 + CLOSE_AGGREGATION 1265 + POP R46 1266 + CALL ROOT f_global_cardinality_low_up_closed_d1vi_d1i_d1i_d1i 1 R43 R44 R45 R46 1267 + JMP l84 1268 + l85: JMP l82 1269 + l83: ITER_ARRAY R12 l103 1270 + l102: ITER_NEXT R47 1271 + ITER_NEXT R48 1272 + ITER_RANGE R47 R48 l105 1273 + l104: ITER_NEXT R49 1274 + LOAD_GLOBAL 5 R50 1275 + GET_ARRAY 2 R50 R49 R0 R51 R52 1276 + GET_ARRAY 1 R5 R51 R53 R54 1277 + IMMI 2 R55 1278 + GET_ARRAY 2 R50 R49 R55 R56 R57 1279 + GET_ARRAY 1 R5 R56 R58 R59 1280 + LB R53 R60 1281 + UB R58 R61 1282 + LTI R60 R61 R60 1283 + SIMPLIFY_LIN R53 R58 1 R62 R63 R64 1284 + POST R52 1285 + POST R54 1286 + POST R57 1287 + POST R59 1288 + POST R60 1289 + CALL ROOT f_pre_int_lin_le_d1i_d1vi_i 1 R62 R63 R64 1290 + JMP l104 1291 + l105: JMP l102 1292 + l103: ITER_ARRAY R10 l107 1293 + l106: ITER_NEXT R65 1294 + ITER_NEXT R66 1295 + ITER_RANGE R65 R66 l109 1296 + l108: ITER_NEXT R67 1297 + OPEN_AGGREGATION VEC 1298 + ITER_ARRAY R4 l111 1299 + l110: ITER_NEXT R68 1300 + ITER_NEXT R69 1301 + ITER_RANGE R68 R69 l113 1302 + l112: ITER_NEXT R70 1303 + GET_ARRAY 2 R23 R67 R70 R71 R72 1304 + PUSH R71 1305 + JMP l112 1306 + l113: JMP l110 1307 + l111: CLEAR R68 R72 1308 + CLOSE_AGGREGATION 1309 + POP R68 1310 + LOAD_GLOBAL 3 R69 1311 + GET_ARRAY 1 R69 R67 R70 R71 1312 + OPEN_AGGREGATION VEC 1313 + ITER_ARRAY R70 l115 1314 + l114: ITER_NEXT R72 1315 + ITER_NEXT R73 1316 + ITER_RANGE R72 R73 l117 1317 + l116: ITER_NEXT R74 1318 + GET_ARRAY 1 R5 R74 R75 R76 1319 + PUSH R75 1320 + JMP l116 1321 + l117: JMP l114 1322 + l115: CLEAR R72 R76 1323 + CLOSE_AGGREGATION 1324 + POP R72 1325 + OPEN_AGGREGATION VEC 1326 + ITER_ARRAY R70 l119 1327 + l118: ITER_NEXT R73 1328 + ITER_NEXT R74 1329 + ITER_RANGE R73 R74 l121 1330 + l120: ITER_NEXT R75 1331 + LOAD_GLOBAL 8 R76 1332 + GET_ARRAY 1 R76 R75 R77 R78 1333 + PUSH R77 1334 + JMP l120 1335 + l121: JMP l118 1336 + l119: CLEAR R73 R78 1337 + CLOSE_AGGREGATION 1338 + POP R73 1339 + CALL ROOT f_bin_packing_load_d1vi_d1vi_d1i 1 R68 R72 R73 1340 + JMP l108 1341 + l109: JMP l106 1342 + l107: ITER_ARRAY R10 l123 1343 + l122: ITER_NEXT R74 1344 + ITER_NEXT R75 1345 + ITER_RANGE R74 R75 l125 1346 + l124: ITER_NEXT R76 1347 + ITER_ARRAY R4 l127 1348 + l126: ITER_NEXT R77 1349 + ITER_NEXT R78 1350 + ITER_RANGE R77 R78 l129 1351 + l128: ITER_NEXT R79 1352 + GET_ARRAY 2 R30 R76 R79 R80 R81 1353 + GET_ARRAY 2 R23 R76 R79 R82 R83 1354 + GET_ARRAY 1 R18 R76 R84 R85 1355 + CALL FUN d_op_minus_i_i 1 R82 R84 1356 + POP R86 1357 + GET_ARRAY 1 R17 R76 R87 R88 1358 + CALL FUN d_op_minus_i_i 0 R87 R82 1359 + POP R89 1360 + CALL FUN d_max_i_i 1 R86 R89 1361 + POP R90 1362 + DOM R80 R91 1363 + DOM R90 R92 1364 + INTERSECTION R91 R92 R91 1365 + ISEMPTY R91 R92 1366 + NOT R92 R92 1367 + SIMPLIFY_LIN R80 R90 0 R94 R95 R93 1368 + POST R81 1369 + POST R83 1370 + POST R85 1371 + POST R88 1372 + POST R92 1373 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R94 R95 R93 1374 + JMP l128 1375 + l129: JMP l126 1376 + l127: JMP l124 1377 + l125: JMP l122 1378 + l123: LOAD_GLOBAL 11 R96 1379 + CALL FUN d_op_times_i_i 0 R96 R34 1380 + POP R97 1381 + LOAD_GLOBAL 12 R98 1382 + CALL FUN d_op_times_i_i 0 R98 R27 1383 + POP R99 1384 + CALL FUN d_op_plus_i_i 1 R97 R99 1385 + POP R100 1386 + DOM R8 R101 1387 + DOM R100 R102 1388 + INTERSECTION R101 R102 R101 1389 + ISEMPTY R101 R102 1390 + NOT R102 R102 1391 + SIMPLIFY_LIN R8 R100 0 R104 R105 R103 1392 + POST R102 1393 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R104 R105 R103 1394 + IMMI 2 R106 1395 + CALL ROOT solve_this 1 R21 R21 R5 R106 R0 1396 + CLEAR R0 R106 1397 + RET
+2 -2
gbac/reduced_UD4-gbac.dzn
··· 19 19 w2 = 1; 20 20 course_load = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] ; 21 21 courses_of = [{1, 2, 3, 35, 8, 28, 29, 30}, {1, 3, 4, 5, 35, 28, 29, 30}, {1, 35, 6, 8, 28, 29, 30}, {1, 35, 4, 6, 7, 28, 29, 30}, {34, 9, 10, 11, 12, 13, 15, 17, 18}, {34, 9, 10, 11, 12, 13, 14, 15, 18}, {9, 10, 11, 12, 14, 15, 16, 17, 18}, {32, 33, 19, 20, 21, 22, 24, 27}, {32, 33, 19, 20, 21, 24, 27}, {32, 33, 4, 19, 20, 21, 24, 27}, {32, 33, 19, 20, 21, 24, 25, 27}, {32, 33, 13, 19, 20, 21, 23, 24, 27}, {25, 26, 19, 36, 31}, {25, 26, 19, 36, 31}, {4, 36, 19, 25, 26, 31}, {25, 26, 19, 36, 31}] ; 22 - precedes = array2d(precedences,1..2, [2, 5, 2, 7, 2, 30, 9, 17, 9, 18, 10, 17, 10, 18, 23, 21, 23, 33, 31, 36, 32, 21, 32, 33] ); 23 - undesirable = array2d(undesirables,1..2, [1, 1, 1, 4, 2, 1, 2, 4, 3, 3, 3, 6, 4, 1, 4, 4, 5, 2, 5, 5, 5, 3, 5, 6, 6, 2, 6, 5, 7, 2, 7, 5, 8, 3, 8, 6, 9, 2, 9, 5, 10, 2, 10, 5, 11, 2, 11, 5, 11, 3, 11, 6, 12, 3, 12, 6, 13, 3, 13, 6, 14, 2, 14, 5, 15, 3, 15, 6, 16, 3, 16, 6, 17, 3, 17, 6, 18, 3, 18, 6, 19, 1, 19, 4, 20, 2, 20, 5, 21, 3, 21, 6, 22, 3, 22, 6, 23, 3, 23, 6, 23, 1, 23, 4, 24, 1, 24, 4, 25, 3, 25, 6, 25, 2, 25, 5, 26, 1, 26, 4, 27, 3, 27, 6, 28, 3, 28, 6, 29, 1, 29, 4, 30, 2, 30, 5, 31, 2, 31, 5, 32, 3, 32, 6, 33, 1, 33, 4, 34, 3, 34, 6, 35, 3, 35, 6, 36, 1, 36, 4] ); 22 + precedes = array2d(1..n_precedences,1..2, [2, 5, 2, 7, 2, 30, 9, 17, 9, 18, 10, 17, 10, 18, 23, 21, 23, 33, 31, 36, 32, 21, 32, 33] ); 23 + undesirable = array2d(1..n_undesirables,1..2, [1, 1, 1, 4, 2, 1, 2, 4, 3, 3, 3, 6, 4, 1, 4, 4, 5, 2, 5, 5, 5, 3, 5, 6, 6, 2, 6, 5, 7, 2, 7, 5, 8, 3, 8, 6, 9, 2, 9, 5, 10, 2, 10, 5, 11, 2, 11, 5, 11, 3, 11, 6, 12, 3, 12, 6, 13, 3, 13, 6, 14, 2, 14, 5, 15, 3, 15, 6, 16, 3, 16, 6, 17, 3, 17, 6, 18, 3, 18, 6, 19, 1, 19, 4, 20, 2, 20, 5, 21, 3, 21, 6, 22, 3, 22, 6, 23, 3, 23, 6, 23, 1, 23, 4, 24, 1, 24, 4, 25, 3, 25, 6, 25, 2, 25, 5, 26, 1, 26, 4, 27, 3, 27, 6, 28, 3, 28, 6, 29, 1, 29, 4, 30, 2, 30, 5, 31, 2, 31, 5, 32, 3, 32, 6, 33, 1, 33, 4, 34, 3, 34, 6, 35, 3, 35, 6, 36, 1, 36, 4] ); 24 24 % {'c308': 7, 'c335': 15, 'c648': 31, 'c655': 34, 'c344': 18, 'c303': 6, 'c320': 10, 'c352': 21, 'c328': 13, 'c284': 1, 'c635': 30, 'c321': 11, 'c650': 32, 'c361': 23, 'c634': 29, 'c338': 16, 'c333': 14, 'c381': 25, 'c319': 9, 'c356': 22, 'c350': 20, 'c376': 24, 'c346': 19, 'c322': 12, 'c664': 36, 'c651': 33, 'c623': 27, 'c301': 5, 'c388': 26, 'c343': 17, 'c658': 35, 'c315': 8, 'c631': 28, 'c291': 3, 'c290': 2, 'c300': 4}
+6 -3
install.sh
··· 7 7 8 8 mkdir -p software/{build,install} 9 9 10 - # Build Chuffed 11 - for dir in "chuffed" "gecode" "gecode_on_record" "gecode_on_replay" "minizinc" 10 + # Build 11 + for dir in "chuffed" "gecode" "gecode_base" "gecode_on_record" "gecode_on_replay" "minizinc" 12 12 do 13 - cmake -S software/${dir} -B software/build/${dir} -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=`pwd`/software/install/${dir} 13 + cmake -S software/${dir} -B software/build/${dir} -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=`pwd`/software/install/${dir} -DCMAKE_POSITION_INDEPENDENT_CODE=ON 14 14 cmake --build software/build/${dir} --config Release --target install -- -j4 15 15 done 16 + 17 + cmake -S software/mza -B software/build/mza -DGECODE_ROOT=`pwd`/software/install/gecode_base/ -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=`pwd`/software/install/mza -DCMAKE_POSITION_INDEPENDENT_CODE=ON 18 + cmake --build software/build/mza --config Release --target install -- -j4 16 19 17 20 ln -s `pwd`/software/install/gecode/share/minizinc/gecode/mznlib `pwd`/software/install/minizinc/share/minizinc/gecode 18 21 ln -s `pwd`/software/install/chuffed/share/minizinc/chuffed `pwd`/software/install/minizinc/share/minizinc/chuffed
+16
output/gbac.csv
··· 1 + Configuration,Data,Compile Time (s),Solve Time (s) 2 + Base,gbac/UD2-gbac.dzn,25.458818981423974,17.341287191957235 3 + Base,gbac/UD4-gbac.dzn,25.138776898384094,14.327164655551314 4 + Base,gbac/UD5-gbac.dzn,28.67881595157087,19.71248783171177 5 + Base,gbac/UD8-gbac.dzn,27.21088409423828,25.1462098434567 6 + Base,gbac/reduced_UD4-gbac.dzn,22.770592607557774,6.444738935679197 7 + Incremental Rewriting,gbac/UD2-gbac.dzn,0.44289878150448203,16.619278862606734 8 + Incremental Rewriting,gbac/UD4-gbac.dzn,0.2829281724989414,14.927907383069396 9 + Incremental Rewriting,gbac/UD5-gbac.dzn,0.5103892032057047,18.957355537917465 10 + Incremental Rewriting,gbac/UD8-gbac.dzn,0.39341115299612284,24.45117470016703 11 + Incremental Rewriting,gbac/reduced_UD4-gbac.dzn,0.13793163280934095,7.798715312965214 12 + Restart Based Search,gbac/UD2-gbac.dzn,0.24477300000000002,10.421576 13 + Restart Based Search,gbac/UD4-gbac.dzn,0.1655035,5.5756935 14 + Restart Based Search,gbac/UD5-gbac.dzn,0.35128000000000004,19.6692045 15 + Restart Based Search,gbac/UD8-gbac.dzn,0.18578899999999998,22.257126 16 + Restart Based Search,gbac/reduced_UD4-gbac.dzn,0.076363,5.0173045
+28
output/radiation.csv
··· 1 + Configuration,Data,Compile Time (s),Solve Time (s) 2 + Base,radiation/01.dzn,0.24510734984651208,0.023913082107901572 3 + Base,radiation/02.dzn,0.30582690900191667,0.028090783022344114 4 + Base,radiation/03.dzn,0.3193663267418742,0.031867857277393344 5 + Base,radiation/04.dzn,0.39944209847599266,0.06285300282761455 6 + Base,radiation/05.dzn,0.3814492827281356,0.07408921113237739 7 + Base,radiation/06.dzn,0.42284395741298797,0.0830705595202744 8 + Base,radiation/07.dzn,0.3188631976954639,0.03759916163980961 9 + Base,radiation/08.dzn,0.41931043174117805,0.16300638895481825 10 + Base,radiation/09.dzn,0.4676839098334312,0.2566952796652913 11 + Incremental Rewriting,radiation/01.dzn,0.01925070183351636,0.01717325309291482 12 + Incremental Rewriting,radiation/02.dzn,0.020097369328141212,0.014758218824863435 13 + Incremental Rewriting,radiation/03.dzn,0.019597070664167403,0.03506866861134768 14 + Incremental Rewriting,radiation/04.dzn,0.020147585589438678,0.046414986718446016 15 + Incremental Rewriting,radiation/05.dzn,0.020718697272241116,0.07127303797751665 16 + Incremental Rewriting,radiation/06.dzn,0.020426739938557148,0.0479787765070796 17 + Incremental Rewriting,radiation/07.dzn,0.020852961204946042,0.031166965235024692 18 + Incremental Rewriting,radiation/08.dzn,0.020653770212084054,0.240933208912611 19 + Incremental Rewriting,radiation/09.dzn,0.020874314848333596,0.23791785333305598 20 + Restart Based Search,radiation/01.dzn,0.0397587,0.0156963 21 + Restart Based Search,radiation/02.dzn,0.03960400000000001,0.012639799999999998 22 + Restart Based Search,radiation/03.dzn,0.039819400000000005,0.018935200000000003 23 + Restart Based Search,radiation/04.dzn,0.044984100000000006,0.03167359999999999 24 + Restart Based Search,radiation/05.dzn,0.045806799999999995, 0.068683 25 + Restart Based Search,radiation/06.dzn,0.0460396,0.0317119 26 + Restart Based Search,radiation/07.dzn,0.048206399999999996,0.016760999999999998 27 + Restart Based Search,radiation/08.dzn,0.048394900000000005,0.1321796 28 + Restart Based Search,radiation/09.dzn,0.048275,0.1422641
+106
pyflow.lock
··· 1 + [[package]] 2 + id = 12 3 + name = "six" 4 + version = "1.16.0" 5 + source = "pypi+https://pypi.org/pypi/six/1.16.0/json" 6 + dependencies = [] 7 + 8 + [[package]] 9 + id = 17 10 + name = "scipy" 11 + version = "1.7.0" 12 + source = "pypi+https://pypi.org/pypi/scipy/1.7.0/json" 13 + dependencies = [] 14 + 15 + [[package]] 16 + id = 13 17 + name = "pandas" 18 + version = "1.3.0" 19 + source = "pypi+https://pypi.org/pypi/pandas/1.3.0/json" 20 + dependencies = ["python-dateutil 2.8.1 pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json", "pytz 2018.4 pypi+https://pypi.org/pypi/pytz/2018.4/json"] 21 + 22 + [[package]] 23 + id = 20 24 + name = "numpy" 25 + version = "1.21.0" 26 + source = "pypi+https://pypi.org/pypi/numpy/1.21.0/json" 27 + dependencies = [] 28 + 29 + [[package]] 30 + id = 10 31 + name = "kiwisolver" 32 + version = "1.3.1" 33 + source = "pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json" 34 + dependencies = [] 35 + 36 + [[package]] 37 + id = 7 38 + name = "pyparsing" 39 + version = "3.0.0b2" 40 + source = "pypi+https://pypi.org/pypi/pyparsing/3.0.0b2/json" 41 + dependencies = [] 42 + 43 + [[package]] 44 + id = 2 45 + name = "pycparser" 46 + version = "2.20" 47 + source = "pypi+https://pypi.org/pypi/pycparser/2.20/json" 48 + dependencies = [] 49 + 50 + [[package]] 51 + id = 8 52 + name = "Pillow" 53 + version = "8.3.1" 54 + source = "pypi+https://pypi.org/pypi/Pillow/8.3.1/json" 55 + dependencies = [] 56 + 57 + [[package]] 58 + id = 15 59 + name = "python-dateutil" 60 + version = "2.8.1" 61 + source = "pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json" 62 + dependencies = [] 63 + 64 + [[package]] 65 + id = 21 66 + name = "matplotlib" 67 + version = "3.4.2" 68 + source = "pypi+https://pypi.org/pypi/matplotlib/3.4.2/json" 69 + dependencies = ["Cycler 0.10.0 pypi+https://pypi.org/pypi/Cycler/0.10.0/json", "Pillow 8.3.1 pypi+https://pypi.org/pypi/Pillow/8.3.1/json", "kiwisolver 1.3.1 pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json", "pyparsing 3.0.0b2 pypi+https://pypi.org/pypi/pyparsing/3.0.0b2/json"] 70 + 71 + [[package]] 72 + id = 3 73 + name = "seaborn" 74 + version = "0.11.1" 75 + source = "pypi+https://pypi.org/pypi/seaborn/0.11.1/json" 76 + dependencies = ["pandas 1.3.0 pypi+https://pypi.org/pypi/pandas/1.3.0/json", "scipy 1.7.0 pypi+https://pypi.org/pypi/scipy/1.7.0/json"] 77 + 78 + [[package]] 79 + id = 1 80 + name = "cffi" 81 + version = "1.14.6" 82 + source = "pypi+https://pypi.org/pypi/cffi/1.14.6/json" 83 + dependencies = ["pycparser 2.20 pypi+https://pypi.org/pypi/pycparser/2.20/json"] 84 + 85 + [[package]] 86 + id = 14 87 + name = "pytz" 88 + version = "2018.4" 89 + source = "pypi+https://pypi.org/pypi/pytz/2018.4/json" 90 + dependencies = [] 91 + 92 + [[package]] 93 + id = 11 94 + name = "Cycler" 95 + version = "0.10.0" 96 + source = "pypi+https://pypi.org/pypi/Cycler/0.10.0/json" 97 + dependencies = ["six 1.16.0 pypi+https://pypi.org/pypi/six/1.16.0/json"] 98 + 99 + [[package]] 100 + id = 15 101 + name = "minizinc" 102 + version = "0.4.2" 103 + source = "pypi+https://pypi.org/pypi/minizinc/0.4.2/json" 104 + dependencies = [] 105 + 106 + [metadata]
+200
radiation.py
··· 1 + #!/usr/bin/env python3 2 + import os 3 + import sys 4 + import time 5 + import csv 6 + 7 + import logging 8 + 9 + logging.basicConfig(filename="minizinc-python.log", level=logging.DEBUG) 10 + 11 + MZNR_HOME = os.getcwd() + "/software/install/minizinc/bin" 12 + os.environ["PATH"] = MZNR_HOME + ":" + os.environ["PATH"] 13 + os.environ["MZN_SOLVER_PATH"] = ( 14 + os.getcwd() + "/software/install/gecode/share/minizinc/solvers" 15 + ) 16 + import minizinc 17 + 18 + MZA_HOME = os.getcwd() + "/software/mza" 19 + sys.path.append(MZA_HOME) 20 + 21 + mza_lib = os.getcwd() + "/software/install/mza/lib" 22 + if sys.platform == "linux" or sys.platform == "linux2": 23 + rerun = True 24 + if not "LD_LIBRARY_PATH" in os.environ: 25 + os.environ["LD_LIBRARY_PATH"] = mza_lib 26 + elif not mza_lib in os.environ.get("LD_LIBRARY_PATH"): 27 + os.environ["LD_LIBRARY_PATH"] += ":" + mza_lib 28 + else: 29 + rerun = False 30 + if rerun: 31 + os.execve(os.path.realpath(__file__), sys.argv, os.environ) 32 + 33 + import mza 34 + from mza import Instance 35 + 36 + mza.DEBUG = False 37 + 38 + SOLVER = "gecode_presolver" 39 + PROTO_MODEL = "radiation/proto.uzn" 40 + RESTART_MODEL = "radiation/on_restart.mzn" 41 + DATA = [ 42 + "radiation/01.dzn", 43 + "radiation/02.dzn", 44 + "radiation/03.dzn", 45 + "radiation/04.dzn", 46 + "radiation/05.dzn", 47 + "radiation/06.dzn", 48 + "radiation/07.dzn", 49 + "radiation/08.dzn", 50 + "radiation/09.dzn", 51 + ] 52 + FN_ID = "f_lex_obj_i" 53 + N_OBJ = 2 54 + 55 + RUNS = 10 56 + 57 + 58 + def radiation_restart(data_file): 59 + os.environ["MZN_STDLIB_DIR"] = ( 60 + os.getcwd() + "/software/install/minizinc/share/minizinc" 61 + ) 62 + gecode = minizinc.Solver.lookup("gecode") 63 + inst = minizinc.Instance(gecode, minizinc.Model(RESTART_MODEL)) 64 + inst.add_file(data_file) 65 + 66 + args = { 67 + "all_solutions": True, 68 + "--restart": "constant", 69 + "--restart-scale": 100000000, 70 + } 71 + res = inst.solve(**args) 72 + 73 + # print(res.statistics) 74 + return ( 75 + res.statistics["flatTime"].total_seconds(), 76 + (res.statistics["initTime"] + res.statistics["solveTime"]).total_seconds(), 77 + ) 78 + 79 + 80 + def radiation_incr(data_file): 81 + os.environ["MZN_STDLIB_DIR"] = os.getcwd() + "/software/mza/share/minizinc" 82 + compile_time = 0.0 83 + solve_time = 0.0 84 + 85 + # --- Initial compilation of instance --- 86 + start = time.perf_counter() 87 + inst = Instance(PROTO_MODEL, data_file, SOLVER) 88 + inst.output_dict(False) 89 + compile_time += time.perf_counter() - start 90 + # --- Solve initial instance --- 91 + start = time.perf_counter() 92 + (status, sol) = inst.solve() 93 + solve_time += time.perf_counter() - start 94 + # print(status + ": " + str(sol)) 95 + 96 + # --- Further Lexicographic Search --- 97 + stage = 1 98 + while stage <= N_OBJ: 99 + with inst.branch() as child: 100 + # --- Compile instance --- 101 + start = time.perf_counter() 102 + inst.add_call(FN_ID, stage) 103 + compile_time += time.perf_counter() - start 104 + # inst.print() 105 + 106 + # --- Solve instance --- 107 + start = time.perf_counter() 108 + (status, sol) = inst.solve() 109 + solve_time += time.perf_counter() - start 110 + if status == "UNSAT": 111 + stage += 1 112 + else: 113 + assert status == "SAT" or status == "OPT" 114 + # print(status + ": " + str(sol)) 115 + 116 + return compile_time, solve_time 117 + 118 + 119 + def radiation_redo(data_file): 120 + os.environ["MZN_STDLIB_DIR"] = os.getcwd() + "/software/mza/share/minizinc" 121 + compile_time = 0.0 122 + solve_time = 0.0 123 + 124 + incumbent = None 125 + stage = 1 126 + status = None 127 + inst = None 128 + while stage <= N_OBJ: 129 + # --- Compile instance --- 130 + start = time.perf_counter() 131 + 132 + inst = Instance(PROTO_MODEL, data_file, SOLVER) 133 + inst.output_dict(True) 134 + if incumbent is not None: 135 + inst.set_incumbent(incumbent) 136 + inst.add_call(FN_ID, stage) 137 + compile_time += time.perf_counter() - start 138 + 139 + # --- Solve instance --- 140 + start = time.perf_counter() 141 + (status, sol) = inst.solve() 142 + solve_time += time.perf_counter() - start 143 + if status == "UNSAT": 144 + stage += 1 145 + else: 146 + assert status == "SAT" or status == "OPT" 147 + incumbent = sol 148 + # print( 149 + # status + ": [" + ", ".join([str(v) for k, v in incumbent.items()]) + "]" 150 + # ) 151 + 152 + return compile_time, solve_time 153 + 154 + 155 + if __name__ == "__main__": 156 + fieldnames = ["Configuration", "Data", "Compile Time (s)", "Solve Time (s)"] 157 + writer = csv.writer(sys.stdout) 158 + 159 + writer.writerow(fieldnames) 160 + 161 + for d in DATA: 162 + # --- Run Restart based strategy 163 + t1, t2 = 0, 0 164 + for i in range(RUNS): 165 + ct, st = radiation_restart(d) 166 + t1 += ct 167 + t2 += st 168 + writer.writerow(["RBS", d, t1 / RUNS, t2 / RUNS]) 169 + # --- Run incremental rewriting 170 + t1, t2 = 0, 0 171 + for i in range(RUNS): 172 + ct, st = radiation_incr(d) 173 + t1 += ct 174 + t2 += st 175 + writer.writerow(["Incr.", d, t1 / RUNS, t2 / RUNS]) 176 + # --- Run baseline 177 + t1, t2 = 0, 0 178 + for i in range(RUNS): 179 + ct, st = radiation_redo(d) 180 + t1 += ct 181 + t2 += st 182 + writer.writerow(["Base", d, t1 / RUNS, t2 / RUNS]) 183 + 184 + # df = pd.DataFrame( 185 + # data={ 186 + # "Compile Time (s)": compile_time, 187 + # "Solve Time (s)": solve_time, 188 + # "Data": cumulative, 189 + # "Strategy": tag, 190 + # } 191 + # ) 192 + 193 + # plot = sns.scatterplot( 194 + # data=df, 195 + # x="Compile Time (s)", 196 + # y="Solve Time (s)", 197 + # hue="Strategy", 198 + # style="Strategy", 199 + # ) 200 + # plot.figure.savefig("output.pdf")
+13
radiation/01.dzn
··· 1 + 2 + m = 5; % rows 3 + n = 5; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 6, 7, 5, 6, 3 | 8 + 4, 2, 3, 1, 2 | 9 + 0, 1, 8, 0, 6 | 10 + 7, 5, 6, 4, 5 | 11 + 3, 4, 1, 3, 0 12 + |]; 13 +
+13
radiation/02.dzn
··· 1 + 2 + m = 5; % rows 3 + n = 5; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 6, 4, 5, 3, 4 | 8 + 2, 3, 0, 1, 8 | 9 + 0, 7, 5, 6, 3 | 10 + 5, 2, 3, 1, 2 | 11 + 0, 1, 8, 0, 6 12 + |]; 13 +
+13
radiation/03.dzn
··· 1 + 2 + m = 5; % rows 3 + n = 5; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 2, 0, 1, 8, 0 | 8 + 7, 8, 5, 6, 4 | 9 + 5, 3, 4, 2, 3 | 10 + 1, 2, 8, 0, 7 | 11 + 8, 6, 7, 5, 6 12 + |]; 13 +
+14
radiation/04.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 2, 0, 1, 8, 0, 7 | 8 + 8, 6, 7, 4, 5, 3 | 9 + 4, 2, 3, 1, 2, 0 | 10 + 1, 7, 5, 6, 4, 5 | 11 + 3, 4, 1, 3, 0, 1 | 12 + 8, 0, 7, 8, 6, 7 13 + |]; 14 +
+14
radiation/05.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 1, 8, 0, 7, 8, 6 | 8 + 7, 4, 6, 3, 4, 2 | 9 + 3, 1, 2, 0, 1, 7 | 10 + 0, 6, 4, 5, 3, 4 | 11 + 2, 3, 0, 1, 8, 0 | 12 + 7, 8, 6, 7, 5, 6 13 + |]; 14 +
+14
radiation/06.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 8 6 + Intensity = [| 7 + 6, 4, 5, 3, 4, 1 | 8 + 2, 0, 1, 8, 0, 7 | 9 + 8, 6, 7, 4, 5, 3 | 10 + 4, 2, 3, 1, 2, 0 | 11 + 1, 7, 8, 6, 7, 5 | 12 + 6, 4, 5, 3, 4, 1 13 + |]; 14 +
+14
radiation/07.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 9 6 + Intensity = [| 7 + 1, 8, 9, 7, 8, 5 | 8 + 7, 4, 5, 3, 4, 1 | 9 + 3, 0, 8, 9, 6, 7 | 10 + 5, 6, 4, 5, 2, 3 | 11 + 1, 2, 0, 1, 8, 9 | 12 + 7, 8, 5, 7, 4, 5 13 + |]; 14 +
+14
radiation/08.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 9 6 + Intensity = [| 7 + 7, 5, 6, 3, 5, 2 | 8 + 3, 1, 2, 9, 1, 8 | 9 + 6, 7, 4, 5, 3, 4 | 10 + 2, 3, 0, 1, 9, 0 | 11 + 8, 9, 7, 5, 6, 4 | 12 + 5, 2, 3, 1, 2, 0 13 + |]; 14 +
+14
radiation/09.dzn
··· 1 + 2 + m = 6; % rows 3 + n = 6; % columns 4 + 5 + % max intensity = 9 6 + Intensity = [| 7 + 1, 9, 6, 7, 5, 6 | 8 + 3, 5, 2, 3, 1, 2 | 9 + 9, 1, 8, 9, 7, 8 | 10 + 5, 7, 4, 5, 3, 4 | 11 + 1, 3, 0, 1, 9, 0 | 12 + 7, 9, 6, 7, 5, 6 13 + |]; 14 +
+32
radiation/on_restart.mzn
··· 1 + include "radiation.mzn"; 2 + include "restart.mzn"; 3 + 4 + %-----------------------------------------------------------------------------% 5 + % Objective 6 + %-----------------------------------------------------------------------------% 7 + 8 + predicate complete();% = abort("'complete' should be used in reified context"); 9 + predicate complete_reif(var bool: marker); 10 + 11 + predicate lex_minimize(array[int] of var int: o) = 12 + let { 13 + var min(index_set(o))..max(index_set(o))+1: stage; 14 + } in if status() = START then 15 + stage = min(index_set(o)) 16 + elseif status() = UNSAT then 17 + stage = lastval(stage) + 1 18 + else /* status() = SAT */ 19 + stage = lastval(stage) 20 + /\ o[stage] < sol(o[stage]) 21 + endif 22 + /\ forall(i in min(index_set(o))..stage-1) ( 23 + o[i] = sol(o[i]) 24 + ) 25 + /\ if stage > max(index_set(o)) then 26 + complete() 27 + endif; 28 + 29 + % var STATUS: status ::add_to_output = status(); 30 + constraint lex_minimize([Beamtime, K]); 31 + 32 + solve :: int_search([Beamtime] ++ N ++ [Q[i,j,b] | i in Rows, j in Columns, b in BTimes ], input_order, indomain_split, complete) satisfy;
+17
radiation/proto.mzn
··· 1 + include "radiation.mzn"; 2 + include "lex_less.mzn"; 3 + 4 + %-----------------------------------------------------------------------------% 5 + % Objective 6 + %-----------------------------------------------------------------------------% 7 + 8 + predicate lex_minimize(array[int] of var int: o, int: stage) = 9 + forall(i in min(index_set(o))..stage-1) ( 10 + o[i] = sol(o[i]) 11 + ) 12 + /\ o[stage] < sol(o[stage]); 13 + 14 + constraint output_this([Beamtime, K]); 15 + predicate lex_obj(int: stage) ::export = lex_minimize([Beamtime, K], stage); 16 + 17 + solve :: int_search([Beamtime] ++ N ++ [Q[i,j,b] | i in Rows, j in Columns, b in BTimes ], input_order, indomain_min, complete) satisfy;
+1113
radiation/proto.uzn
··· 1 + int: n:: global_register(1); 2 + int: m:: global_register(0); 3 + array [int,int] of int: Intensity:: global_register(2); 4 + predicate solve_this(int: mode,var int: objective,array [int] of var int: x,int: varsel,int: valsel); 5 + predicate int_lin_le(array [int] of int: as,array [int] of var int: bs,int: c); 6 + predicate int_plus(var int: a,var int: b,var int: c); 7 + predicate int_max(var int: a,var int: b,var int: c); 8 + predicate int_minus(var int: x,var int: y,var int: z); 9 + predicate int_sum(array [int] of var int: xs,var int: x); 10 + predicate int_times(var int: a,var int: b,var int: c); 11 + predicate array_int_minimum(var int: m,array [int] of var int: x); 12 + predicate int_min(var int: a,var int: b,var int: c); 13 + predicate output_this(array [int] of var int: arr); 14 + predicate array_int_maximum(var int: m,array [int] of var int: x); 15 + predicate int_lin_eq(array [int] of int: as,array [int] of var int: bs,int: c); 16 + predicate clause(array [$T] of var bool: x,array [$T] of var bool: y); 17 + predicate clause(array [$T] of bool: x,array [$T] of bool: y); 18 + predicate bool_clause(array [int] of var bool: as,array [int] of var bool: bs); 19 + predicate bool_not(var bool: a,var bool: b); 20 + @@@@@@@@@@ 21 + :mk_intvar: 1 22 + :absent: 1 23 + :infinity: 1 24 + :boolean_domain: 0 25 + :infinite_domain: 0 26 + :uniform: 2 27 + :sol: 1 28 + :sort_by: 2 29 + :floor: 1 30 + :ceil: 1 31 + :slice_Xd: 3 32 + :array_Xd: 2 33 + :index_set: 2 34 + :internal_sort: 1 35 + :f_op_not_b:FUN 1 36 + NOT R0 R1 37 + PUSH R1 38 + RET 39 + :f_op_not_vb:FUN 1 40 + OPEN_AGGREGATION OTHER 41 + BUILTIN boolean_domain 42 + POP R1 43 + CALL ROOT mk_intvar 0 R1 44 + POP R2 45 + CALL ROOT bool_not 1 R0 R2 46 + PUSH R2 47 + CLEAR R1 R2 48 + CLOSE_AGGREGATION 49 + POP R1 50 + PUSH R1 51 + RET 52 + :d_op_not_b:FUN 1 53 + ISPAR R0 R1 54 + JMPIF R1 l0 55 + JMP l1 56 + l0: TCALL FUN f_op_not_b 0 57 + l1: TCALL FUN f_op_not_vb 1 58 + :bool_clause:ROOT 2 59 + :bool_clause_reif:ROOT 3 60 + CALL FUN d_op_not_b 0 R2 61 + POP R3 62 + OPEN_AGGREGATION VEC 63 + PUSH R3 64 + CLOSE_AGGREGATION 65 + POP R4 66 + OPEN_AGGREGATION VEC 67 + ITER_ARRAY R1 l178 68 + l177: ITER_NEXT R6 69 + PUSH R6 70 + JMP l177 71 + l178: ITER_ARRAY R4 l180 72 + l179: ITER_NEXT R7 73 + PUSH R7 74 + JMP l179 75 + l180: CLEAR R6 R7 76 + CLOSE_AGGREGATION 77 + POP R5 78 + IMMI 1 R6 79 + BUILTIN index_set R0 R6 80 + POP R7 81 + ITER_ARRAY R7 l182 82 + l181: ITER_NEXT R8 83 + ITER_NEXT R9 84 + ITER_RANGE R8 R9 l184 85 + l183: ITER_NEXT R10 86 + GET_ARRAY 1 R0 R10 R11 R12 87 + OPEN_AGGREGATION OR 88 + IMMI 0 R14 89 + JMPIFNOT R12 l185 90 + MOV R11 R14 91 + l185: PUSH R14 92 + PUSH R3 93 + CLEAR R14 R14 94 + CLOSE_AGGREGATION 95 + POP R13 96 + POST R13 97 + JMP l183 98 + l184: JMP l181 99 + l182: IMMI 1 R14 100 + BUILTIN index_set R1 R14 101 + POP R15 102 + ITER_ARRAY R15 l187 103 + l186: ITER_NEXT R16 104 + ITER_NEXT R17 105 + ITER_RANGE R16 R17 l189 106 + l188: ITER_NEXT R18 107 + GET_ARRAY 1 R1 R18 R19 R20 108 + IMMI 1 R21 109 + NOT R20 R22 110 + JMPIF R22 l190 111 + OPEN_AGGREGATION OR 112 + CALL FUN d_op_not_b 0 R19 113 + POP R23 114 + PUSH R23 115 + PUSH R3 116 + CLEAR R23 R23 117 + CLOSE_AGGREGATION 118 + POP R21 119 + l190: POST R21 120 + JMP l188 121 + l189: JMP l186 122 + l187: CALL ROOT d_clause_d1b_d1b 1 R0 R5 123 + RET 124 + :int_lin_eq:ROOT 3 125 + :f_max_dTi:FUN 1 126 + IMMI 0 R2 127 + BUILTIN array_Xd R0 R2 128 + POP R1 129 + BUILTIN infinity R2 130 + POP R3 131 + ITER_ARRAY R1 l176 132 + l175: ITER_NEXT R5 133 + LTI R3 R5 R4 134 + JMPIFNOT R4 l174 135 + MOV R5 R3 136 + l174: JMP l175 137 + l176: PUSH R3 138 + RET 139 + :f_max_dTvi:FUN 1 140 + IMMI 0 R2 141 + BUILTIN array_Xd R0 R2 142 + POP R1 143 + LENGTH R0 R3 144 + IMMI 1 R4 145 + LEI R4 R3 R5 146 + CALL FUN f_max_t_d1vi 1 R1 147 + POP R6 148 + PUSH R6 149 + RET 150 + :d_max_d1i:FUN 1 151 + ISPAR R0 R1 152 + JMPIF R1 l20 153 + JMP l21 154 + l20: TCALL FUN f_max_dTi 0 155 + l21: TCALL FUN f_max_dTvi 1 156 + :output_this:ROOT 1 157 + :f_lex_obj_i:ROOT 1 158 + LOAD_GLOBAL 6 R1 159 + LOAD_GLOBAL 7 R2 160 + OPEN_AGGREGATION VEC 161 + PUSH R1 162 + PUSH R2 163 + CLOSE_AGGREGATION 164 + POP R3 165 + CALL ROOT f_lex_minimize_d1vi_i 1 R3 R0 166 + RET 167 + :f_op_times_i_i:FUN 2 168 + MULI R0 R1 R2 169 + PUSH R2 170 + RET 171 + :f_op_times_i_vi:FUN 2 172 + IMMI 1 R2 173 + IMMI 1 R4 174 + EQI R0 R2 R5 175 + JMPIFNOT R5 l138 176 + IMMI 0 R4 177 + MOV R1 R3 178 + JMP l137 179 + l138: OPEN_AGGREGATION OTHER 180 + BUILTIN infinite_domain 181 + POP R6 182 + CALL ROOT mk_intvar 0 R6 183 + POP R7 184 + CALL ROOT int_times 1 R0 R1 R7 185 + PUSH R7 186 + CLEAR R6 R7 187 + CLOSE_AGGREGATION 188 + POP R6 189 + IMMI 0 R4 190 + MOV R6 R3 191 + l137: PUSH R3 192 + RET 193 + :f_op_times_vi_i:FUN 2 194 + CALL FUN d_op_times_i_i 0 R1 R0 195 + POP R2 196 + PUSH R2 197 + RET 198 + :f_op_times_vi_vi:FUN 2 199 + OPEN_AGGREGATION OTHER 200 + BUILTIN infinite_domain 201 + POP R2 202 + CALL ROOT mk_intvar 0 R2 203 + POP R3 204 + CALL ROOT int_times 1 R0 R1 R3 205 + PUSH R3 206 + CLEAR R2 R3 207 + CLOSE_AGGREGATION 208 + POP R2 209 + PUSH R2 210 + RET 211 + :d_op_times_i_i:FUN 2 212 + ISPAR R0 R2 213 + JMPIF R2 l42 214 + JMP l43 215 + l42: ISPAR R1 R2 216 + JMPIF R2 l44 217 + JMP l45 218 + l43: ISPAR R1 R2 219 + JMPIF R2 l46 220 + JMP l47 221 + l44: TCALL FUN f_op_times_i_i 0 222 + l45: TCALL FUN f_op_times_i_vi 1 223 + l46: TCALL FUN f_op_times_vi_i 1 224 + l47: TCALL FUN f_op_times_vi_vi 1 225 + :f_sum_cc_dTvi:FUN 1 226 + OPEN_AGGREGATION OTHER 227 + IMMI 0 R2 228 + BUILTIN array_Xd R0 R2 229 + POP R1 230 + BUILTIN infinite_domain 231 + POP R3 232 + CALL ROOT mk_intvar 0 R3 233 + POP R4 234 + CALL ROOT int_sum 1 R1 R4 235 + PUSH R4 236 + CLEAR R1 R4 237 + CLOSE_AGGREGATION 238 + POP R1 239 + PUSH R1 240 + RET 241 + :f_pre_int_lin_eq_d1i_d1vi_i:ROOT 3 242 + LENGTH R0 R4 243 + IMMI 0 R5 244 + EQI R4 R5 R6 245 + JMPIFNOT R6 l136 246 + EQI R2 R5 R7 247 + MOV R7 R3 248 + JMP l135 249 + l136: CALL ROOT int_lin_eq 1 R0 R1 R2 250 + IMMI 1 R8 251 + MOV R8 R3 252 + l135: POST R3 253 + RET 254 + :f_upper_bound_on_increments_vi_d1vi:ROOT 2 255 + IMMI 1 R2 256 + GET_ARRAY 1 R1 R2 R3 R4 257 + IMMI 2 R5 258 + LOAD_GLOBAL 1 R6 259 + OPEN_AGGREGATION VEC 260 + PUSH R5 261 + PUSH R6 262 + CLOSE_AGGREGATION 263 + POP R7 264 + OPEN_AGGREGATION VEC 265 + ITER_ARRAY R7 l106 266 + l105: ITER_NEXT R8 267 + ITER_NEXT R9 268 + ITER_RANGE R8 R9 l108 269 + l107: ITER_NEXT R10 270 + GET_ARRAY 1 R1 R10 R11 R12 271 + SUBI R10 R2 R13 272 + GET_ARRAY 1 R1 R13 R14 R15 273 + CALL FUN d_op_minus_i_i 1 R11 R14 274 + POP R16 275 + IMMI 0 R17 276 + CALL FUN d_max_i_i 1 R16 R17 277 + POP R18 278 + PUSH R18 279 + JMP l107 280 + l108: JMP l105 281 + l106: CLEAR R8 R18 282 + CLOSE_AGGREGATION 283 + POP R8 284 + LENGTH R8 R9 285 + JMPIFNOT R9 l118 286 + EQI R2 R9 R10 287 + JMPIF R10 l119 288 + CALL FUN f_sum_cc_dTvi 1 R8 289 + POP R10 290 + JMP l120 291 + l118: IMMI 0 R10 292 + JMP l120 293 + l119: GET_VEC R8 R2 R10 294 + l120: CALL FUN d_op_plus_i_i 1 R3 R10 295 + POP R11 296 + LB R11 R12 297 + UB R0 R13 298 + LEI R12 R13 R12 299 + SIMPLIFY_LIN R11 R0 0 R14 R15 R16 300 + POST R4 301 + POST R12 302 + CALL ROOT f_pre_int_lin_le_d1i_d1vi_i 1 R14 R15 R16 303 + RET 304 + :solve_this:ROOT 5 305 + :f_op_minus_i_i:FUN 2 306 + SUBI R0 R1 R2 307 + PUSH R2 308 + RET 309 + :f_op_minus_vi_i:FUN 2 310 + IMMI 1 R2 311 + IMMI 1 R4 312 + IMMI 0 R5 313 + EQI R1 R5 R6 314 + JMPIFNOT R6 l134 315 + IMMI 0 R4 316 + MOV R0 R3 317 + JMP l133 318 + l134: OPEN_AGGREGATION OTHER 319 + BUILTIN infinite_domain 320 + POP R7 321 + CALL ROOT mk_intvar 0 R7 322 + POP R8 323 + CALL ROOT int_minus 1 R0 R1 R8 324 + PUSH R8 325 + CLEAR R7 R8 326 + CLOSE_AGGREGATION 327 + POP R7 328 + IMMI 0 R4 329 + MOV R7 R3 330 + l133: PUSH R3 331 + RET 332 + :f_op_minus_vi_vi:FUN 2 333 + OPEN_AGGREGATION OTHER 334 + BUILTIN infinite_domain 335 + POP R2 336 + CALL ROOT mk_intvar 0 R2 337 + POP R3 338 + CALL ROOT int_minus 1 R0 R1 R3 339 + PUSH R3 340 + CLEAR R2 R3 341 + CLOSE_AGGREGATION 342 + POP R2 343 + PUSH R2 344 + RET 345 + :d_op_minus_i_i:FUN 2 346 + ISPAR R0 R2 347 + JMPIF R2 l109 348 + JMP l110 349 + l109: ISPAR R1 R2 350 + JMPIF R2 l111 351 + JMP l112 352 + l110: ISPAR R1 R2 353 + JMPIF R2 l113 354 + JMP l112 355 + l111: TCALL FUN f_op_minus_i_i 0 356 + l112: TCALL FUN f_op_minus_vi_vi 1 357 + l113: TCALL FUN f_op_minus_vi_i 1 358 + :f_max_t_t:FUN 2 359 + IMMI 1 R2 360 + IMMI 1 R4 361 + LTI R1 R0 R5 362 + JMPIFNOT R5 l132 363 + IMMI 0 R4 364 + MOV R0 R3 365 + JMP l131 366 + l132: IMMI 0 R4 367 + MOV R1 R3 368 + l131: PUSH R3 369 + RET 370 + :f_max_vi_vi:FUN 2 371 + OPEN_AGGREGATION OTHER 372 + LB R0 R2 373 + LB R1 R3 374 + CALL FUN d_max_i_i 0 R2 R3 375 + POP R4 376 + UB R0 R5 377 + UB R1 R6 378 + CALL FUN d_max_i_i 0 R5 R6 379 + POP R7 380 + OPEN_AGGREGATION VEC 381 + PUSH R4 382 + PUSH R7 383 + CLOSE_AGGREGATION 384 + POP R8 385 + CALL ROOT mk_intvar 0 R8 386 + POP R9 387 + CALL ROOT int_max 1 R0 R1 R9 388 + PUSH R9 389 + CLEAR R2 R9 390 + CLOSE_AGGREGATION 391 + POP R2 392 + PUSH R2 393 + RET 394 + :d_max_i_i:FUN 2 395 + ISPAR R0 R2 396 + JMPIF R2 l114 397 + JMP l115 398 + l114: ISPAR R1 R2 399 + JMPIF R2 l116 400 + JMP l117 401 + l115: JMP l117 402 + l116: TCALL FUN f_max_t_t 0 403 + l117: TCALL FUN f_max_vi_vi 1 404 + :f_op_plus_i_i:FUN 2 405 + ADDI R0 R1 R2 406 + PUSH R2 407 + RET 408 + :f_op_plus_i_vi:FUN 2 409 + IMMI 1 R2 410 + IMMI 1 R4 411 + IMMI 0 R5 412 + EQI R0 R5 R6 413 + JMPIFNOT R6 l130 414 + IMMI 0 R4 415 + MOV R1 R3 416 + JMP l129 417 + l130: OPEN_AGGREGATION OTHER 418 + BUILTIN infinite_domain 419 + POP R7 420 + CALL ROOT mk_intvar 0 R7 421 + POP R8 422 + CALL ROOT int_plus 1 R0 R1 R8 423 + PUSH R8 424 + CLEAR R7 R8 425 + CLOSE_AGGREGATION 426 + POP R7 427 + IMMI 0 R4 428 + MOV R7 R3 429 + l129: PUSH R3 430 + RET 431 + :f_op_plus_vi_i:FUN 2 432 + CALL FUN d_op_plus_i_i 0 R1 R0 433 + POP R2 434 + PUSH R2 435 + RET 436 + :f_op_plus_vi_vi:FUN 2 437 + OPEN_AGGREGATION OTHER 438 + BUILTIN infinite_domain 439 + POP R2 440 + CALL ROOT mk_intvar 0 R2 441 + POP R3 442 + CALL ROOT int_plus 1 R0 R1 R3 443 + PUSH R3 444 + CLEAR R2 R3 445 + CLOSE_AGGREGATION 446 + POP R2 447 + PUSH R2 448 + RET 449 + :d_op_plus_i_i:FUN 2 450 + ISPAR R0 R2 451 + JMPIF R2 l121 452 + JMP l122 453 + l121: ISPAR R1 R2 454 + JMPIF R2 l123 455 + JMP l124 456 + l122: ISPAR R1 R2 457 + JMPIF R2 l125 458 + JMP l126 459 + l123: TCALL FUN f_op_plus_i_i 0 460 + l124: TCALL FUN f_op_plus_i_vi 1 461 + l125: TCALL FUN f_op_plus_vi_i 1 462 + l126: TCALL FUN f_op_plus_vi_vi 1 463 + :f_pre_int_lin_le_d1i_d1vi_i:ROOT 3 464 + LENGTH R0 R4 465 + IMMI 0 R5 466 + EQI R4 R5 R6 467 + JMPIFNOT R6 l128 468 + LEI R5 R2 R7 469 + MOV R7 R3 470 + JMP l127 471 + l128: CALL ROOT int_lin_le 1 R0 R1 R2 472 + IMMI 1 R8 473 + MOV R8 R3 474 + l127: POST R3 475 + RET 476 + :int_lin_le:ROOT 3 477 + :int_plus:ROOT 3 478 + :int_max:ROOT 3 479 + :int_minus:ROOT 3 480 + :int_sum:ROOT 2 481 + :int_times:ROOT 3 482 + :f_lex_minimize_d1vi_i:ROOT 2 483 + IMMI 1 R2 484 + BUILTIN index_set R0 R2 485 + POP R3 486 + CALL FUN d_min_si 0 R3 487 + POP R4 488 + SUBI R1 R2 R5 489 + OPEN_AGGREGATION VEC 490 + PUSH R4 491 + PUSH R5 492 + CLOSE_AGGREGATION 493 + POP R6 494 + ITER_ARRAY R6 l142 495 + l141: ITER_NEXT R7 496 + ITER_NEXT R8 497 + ITER_RANGE R7 R8 l144 498 + l143: ITER_NEXT R9 499 + GET_ARRAY 1 R0 R9 R10 R11 500 + BUILTIN sol R10 501 + POP R12 502 + DOM R10 R13 503 + DOM R12 R14 504 + INTERSECTION R13 R14 R13 505 + ISEMPTY R13 R14 506 + NOT R14 R14 507 + SIMPLIFY_LIN R10 R12 0 R16 R17 R15 508 + POST R11 509 + POST R14 510 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R16 R17 R15 511 + JMP l143 512 + l144: JMP l141 513 + l142: GET_ARRAY 1 R0 R1 R18 R19 514 + BUILTIN sol R18 515 + POP R20 516 + LB R18 R21 517 + UB R20 R22 518 + LTI R21 R22 R21 519 + SIMPLIFY_LIN R18 R20 1 R23 R24 R25 520 + POST R19 521 + POST R21 522 + CALL ROOT f_pre_int_lin_le_d1i_d1vi_i 1 R23 R24 R25 523 + RET 524 + :f_min_si:FUN 1 525 + LENGTH R0 R2 526 + IMMI 1 R3 527 + LEI R3 R2 R1 528 + JMPIF R1 l162 529 + ABORT 530 + l162: GET_VEC R0 R3 R1 531 + PUSH R1 532 + RET 533 + :f_min_dTvi:FUN 1 534 + IMMI 0 R2 535 + BUILTIN array_Xd R0 R2 536 + POP R1 537 + LENGTH R0 R3 538 + IMMI 1 R4 539 + LEI R4 R3 R5 540 + CALL FUN f_min_t_d1vi 1 R1 541 + POP R6 542 + PUSH R6 543 + RET 544 + :d_min_si:FUN 1 545 + ISPAR R0 R1 546 + JMPIF R1 l139 547 + JMP l140 548 + l139: TCALL FUN f_min_si 0 549 + l140: TCALL FUN f_min_dTvi 1 550 + :f_min_t_d1vi:FUN 1 551 + IMMI 1 R1 552 + IMMI 1 R3 553 + LENGTH R0 R4 554 + IMMI 0 R5 555 + EQI R4 R5 R6 556 + JMPIFNOT R6 l146 557 + IMMI 0 R3 558 + MOV R5 R2 559 + JMP l145 560 + l146: EQI R4 R1 R7 561 + JMPIFNOT R7 l147 562 + GET_ARRAY 1 R0 R1 R8 R9 563 + MOV R9 R3 564 + MOV R8 R2 565 + JMP l145 566 + l147: IMMI 2 R10 567 + EQI R4 R10 R11 568 + JMPIFNOT R11 l148 569 + GET_ARRAY 1 R0 R1 R12 R13 570 + GET_ARRAY 1 R0 R10 R14 R15 571 + CALL FUN d_min_i_i 1 R12 R14 572 + POP R16 573 + IMMI 0 R17 574 + JMPIFNOT R13 l153 575 + MOV R15 R17 576 + l153: MOV R17 R3 577 + MOV R16 R2 578 + JMP l145 579 + l148: OPEN_AGGREGATION OTHER 580 + BUILTIN infinity R1 581 + POP R18 582 + ITER_ARRAY R0 l156 583 + l155: ITER_NEXT R21 584 + LB R21 R19 585 + LTI R19 R18 R20 586 + JMPIFNOT R20 l154 587 + MOV R19 R18 588 + l154: JMP l155 589 + l156: BUILTIN infinity R5 590 + POP R22 591 + ITER_ARRAY R0 l159 592 + l158: ITER_NEXT R25 593 + UB R25 R23 594 + LTI R22 R23 R24 595 + JMPIFNOT R24 l157 596 + MOV R23 R22 597 + l157: JMP l158 598 + l159: OPEN_AGGREGATION VEC 599 + PUSH R18 600 + PUSH R22 601 + CLOSE_AGGREGATION 602 + POP R26 603 + CALL ROOT mk_intvar 0 R26 604 + POP R27 605 + CALL ROOT array_int_minimum 1 R27 R0 606 + PUSH R27 607 + CLEAR R18 R27 608 + CLOSE_AGGREGATION 609 + POP R18 610 + IMMI 0 R3 611 + MOV R18 R2 612 + l145: PUSH R2 613 + RET 614 + :f_min_t_t:FUN 2 615 + IMMI 1 R2 616 + IMMI 1 R4 617 + LTI R0 R1 R5 618 + JMPIFNOT R5 l161 619 + IMMI 0 R4 620 + MOV R0 R3 621 + JMP l160 622 + l161: IMMI 0 R4 623 + MOV R1 R3 624 + l160: PUSH R3 625 + RET 626 + :f_min_vi_vi:FUN 2 627 + OPEN_AGGREGATION OTHER 628 + LB R0 R2 629 + LB R1 R3 630 + CALL FUN d_min_i_i 0 R2 R3 631 + POP R4 632 + UB R0 R5 633 + UB R1 R6 634 + CALL FUN d_min_i_i 0 R5 R6 635 + POP R7 636 + OPEN_AGGREGATION VEC 637 + PUSH R4 638 + PUSH R7 639 + CLOSE_AGGREGATION 640 + POP R8 641 + CALL ROOT mk_intvar 0 R8 642 + POP R9 643 + CALL ROOT int_min 1 R0 R1 R9 644 + PUSH R9 645 + CLEAR R2 R9 646 + CLOSE_AGGREGATION 647 + POP R2 648 + PUSH R2 649 + RET 650 + :d_min_i_i:FUN 2 651 + ISPAR R0 R2 652 + JMPIF R2 l149 653 + JMP l150 654 + l149: ISPAR R1 R2 655 + JMPIF R2 l151 656 + JMP l152 657 + l150: JMP l152 658 + l151: TCALL FUN f_min_t_t 0 659 + l152: TCALL FUN f_min_vi_vi 1 660 + :array_int_minimum:ROOT 2 661 + :int_min:ROOT 3 662 + :f_max_t_d1vi:FUN 1 663 + IMMI 1 R1 664 + IMMI 1 R3 665 + LENGTH R0 R4 666 + IMMI 0 R5 667 + EQI R4 R5 R6 668 + JMPIFNOT R6 l164 669 + IMMI 0 R3 670 + MOV R5 R2 671 + JMP l163 672 + l164: EQI R4 R1 R7 673 + JMPIFNOT R7 l165 674 + BUILTIN index_set R0 R1 675 + POP R8 676 + CALL FUN d_min_si 0 R8 677 + POP R9 678 + GET_ARRAY 1 R0 R9 R10 R11 679 + MOV R11 R3 680 + MOV R10 R2 681 + JMP l163 682 + l165: IMMI 2 R12 683 + EQI R4 R12 R13 684 + JMPIFNOT R13 l166 685 + GET_ARRAY 1 R0 R1 R14 R15 686 + GET_ARRAY 1 R0 R12 R16 R17 687 + CALL FUN d_max_i_i 0 R14 R16 688 + POP R18 689 + IMMI 0 R19 690 + JMPIFNOT R15 l167 691 + MOV R17 R19 692 + l167: MOV R19 R3 693 + MOV R18 R2 694 + JMP l163 695 + l166: OPEN_AGGREGATION OTHER 696 + BUILTIN infinity R1 697 + POP R20 698 + ITER_ARRAY R0 l170 699 + l169: ITER_NEXT R23 700 + LB R23 R21 701 + LTI R21 R20 R22 702 + JMPIFNOT R22 l168 703 + MOV R21 R20 704 + l168: JMP l169 705 + l170: BUILTIN infinity R5 706 + POP R24 707 + ITER_ARRAY R0 l173 708 + l172: ITER_NEXT R27 709 + UB R27 R25 710 + LTI R24 R25 R26 711 + JMPIFNOT R26 l171 712 + MOV R25 R24 713 + l171: JMP l172 714 + l173: OPEN_AGGREGATION VEC 715 + PUSH R20 716 + PUSH R24 717 + CLOSE_AGGREGATION 718 + POP R28 719 + CALL ROOT mk_intvar 0 R28 720 + POP R29 721 + CALL ROOT array_int_maximum 1 R29 R0 722 + PUSH R29 723 + CLEAR R20 R29 724 + CLOSE_AGGREGATION 725 + POP R20 726 + IMMI 0 R3 727 + MOV R20 R2 728 + l163: PUSH R2 729 + RET 730 + :array_int_maximum:ROOT 2 731 + :clause:ROOT 2 732 + :clause:ROOT 2 733 + :d_clause_d1b_d1b:ROOT 2 734 + ISPAR R0 R2 735 + JMPIF R2 l191 736 + JMP l192 737 + l191: ISPAR R1 R2 738 + JMPIF R2 l193 739 + JMP l194 740 + l192: JMP l194 741 + l193: TCALL ROOT clause 1 742 + l194: TCALL ROOT clause 1 743 + :bool_not:ROOT 2 744 + :main:ROOT 0 745 + OPEN_AGGREGATION OTHER 746 + IMMI 1 R0 747 + LOAD_GLOBAL 0 R1 748 + OPEN_AGGREGATION VEC 749 + PUSH R0 750 + PUSH R1 751 + CLOSE_AGGREGATION 752 + POP R2 753 + STORE_GLOBAL R2 3 754 + LOAD_GLOBAL 1 R3 755 + OPEN_AGGREGATION VEC 756 + PUSH R0 757 + PUSH R3 758 + CLOSE_AGGREGATION 759 + POP R4 760 + STORE_GLOBAL R4 4 761 + OPEN_AGGREGATION VEC 762 + ITER_ARRAY R2 l3 763 + l2: ITER_NEXT R5 764 + ITER_NEXT R6 765 + ITER_RANGE R5 R6 l5 766 + l4: ITER_NEXT R7 767 + ITER_ARRAY R4 l7 768 + l6: ITER_NEXT R8 769 + ITER_NEXT R9 770 + ITER_RANGE R8 R9 l9 771 + l8: ITER_NEXT R10 772 + LOAD_GLOBAL 2 R11 773 + GET_ARRAY 2 R11 R7 R10 R12 R13 774 + PUSH R12 775 + JMP l8 776 + l9: JMP l6 777 + l7: JMP l4 778 + l5: JMP l2 779 + l3: CLEAR R5 R13 780 + CLOSE_AGGREGATION 781 + POP R5 782 + IMMI 0 R6 783 + ITER_ARRAY R5 l11 784 + l10: ITER_NEXT R7 785 + ADDI R6 R7 R6 786 + JMP l10 787 + l11: STORE_GLOBAL R6 5 788 + IMMI 0 R8 789 + OPEN_AGGREGATION VEC 790 + PUSH R8 791 + PUSH R6 792 + CLOSE_AGGREGATION 793 + POP R9 794 + CALL ROOT mk_intvar 0 R9 795 + POP R10 796 + STORE_GLOBAL R10 6 797 + MULI R1 R3 R11 798 + OPEN_AGGREGATION VEC 799 + PUSH R8 800 + PUSH R11 801 + CLOSE_AGGREGATION 802 + POP R12 803 + CALL ROOT mk_intvar 0 R12 804 + POP R13 805 + STORE_GLOBAL R13 7 806 + OPEN_AGGREGATION VEC 807 + ITER_ARRAY R2 l13 808 + l12: ITER_NEXT R14 809 + ITER_NEXT R15 810 + ITER_RANGE R14 R15 l15 811 + l14: ITER_NEXT R16 812 + ITER_ARRAY R4 l17 813 + l16: ITER_NEXT R17 814 + ITER_NEXT R18 815 + ITER_RANGE R17 R18 l19 816 + l18: ITER_NEXT R19 817 + LOAD_GLOBAL 2 R20 818 + GET_ARRAY 2 R20 R16 R19 R21 R22 819 + PUSH R21 820 + JMP l18 821 + l19: JMP l16 822 + l17: JMP l14 823 + l15: JMP l12 824 + l13: CLEAR R14 R22 825 + CLOSE_AGGREGATION 826 + POP R14 827 + CALL FUN d_max_d1i 0 R14 828 + POP R15 829 + STORE_GLOBAL R15 8 830 + OPEN_AGGREGATION VEC 831 + PUSH R0 832 + PUSH R15 833 + CLOSE_AGGREGATION 834 + POP R16 835 + STORE_GLOBAL R16 9 836 + OPEN_AGGREGATION VEC 837 + ITER_ARRAY R2 l23 838 + l22: ITER_NEXT R19 839 + ITER_NEXT R20 840 + ITER_RANGE R19 R20 l25 841 + l24: ITER_NEXT R21 842 + ITER_ARRAY R4 l27 843 + l26: ITER_NEXT R22 844 + ITER_NEXT R23 845 + ITER_RANGE R22 R23 l29 846 + l28: ITER_NEXT R24 847 + ITER_ARRAY R16 l31 848 + l30: ITER_NEXT R25 849 + ITER_NEXT R26 850 + ITER_RANGE R25 R26 l33 851 + l32: ITER_NEXT R27 852 + CALL ROOT mk_intvar 0 R12 853 + JMP l32 854 + l33: JMP l30 855 + l31: JMP l28 856 + l29: JMP l26 857 + l27: JMP l24 858 + l25: JMP l22 859 + l23: CLEAR R19 R27 860 + CLOSE_AGGREGATION 861 + POP R17 862 + OPEN_AGGREGATION VEC 863 + GET_VEC R2 R0 R18 864 + PUSH R18 865 + IMMI 2 R19 866 + GET_VEC R2 R19 R18 867 + PUSH R18 868 + GET_VEC R4 R0 R18 869 + PUSH R18 870 + GET_VEC R4 R19 R18 871 + PUSH R18 872 + GET_VEC R16 R0 R18 873 + PUSH R18 874 + GET_VEC R16 R19 R18 875 + PUSH R18 876 + CLEAR R19 R19 877 + CLOSE_AGGREGATION 878 + POP R18 879 + BUILTIN array_Xd R17 R18 880 + POP R17 881 + STORE_GLOBAL R17 10 882 + OPEN_AGGREGATION VEC 883 + ITER_ARRAY R16 l35 884 + l34: ITER_NEXT R21 885 + ITER_NEXT R22 886 + ITER_RANGE R21 R22 l37 887 + l36: ITER_NEXT R23 888 + CALL ROOT mk_intvar 0 R12 889 + JMP l36 890 + l37: JMP l34 891 + l35: CLEAR R21 R23 892 + CLOSE_AGGREGATION 893 + POP R19 894 + OPEN_AGGREGATION VEC 895 + GET_VEC R16 R0 R20 896 + PUSH R20 897 + IMMI 2 R21 898 + GET_VEC R16 R21 R20 899 + PUSH R20 900 + CLEAR R21 R21 901 + CLOSE_AGGREGATION 902 + POP R20 903 + BUILTIN array_Xd R19 R20 904 + POP R19 905 + STORE_GLOBAL R19 11 906 + OPEN_AGGREGATION VEC 907 + PUSH R10 908 + PUSH R13 909 + CLOSE_AGGREGATION 910 + POP R21 911 + CALL ROOT output_this 1 R21 912 + OPEN_AGGREGATION VEC 913 + ITER_ARRAY R16 l39 914 + l38: ITER_NEXT R22 915 + ITER_NEXT R23 916 + ITER_RANGE R22 R23 l41 917 + l40: ITER_NEXT R24 918 + GET_ARRAY 1 R19 R24 R25 R26 919 + CALL FUN d_op_times_i_i 1 R24 R25 920 + POP R27 921 + PUSH R27 922 + JMP l40 923 + l41: JMP l38 924 + l39: CLEAR R22 R27 925 + CLOSE_AGGREGATION 926 + POP R22 927 + LENGTH R22 R23 928 + JMPIFNOT R23 l48 929 + EQI R0 R23 R24 930 + JMPIF R24 l49 931 + CALL FUN f_sum_cc_dTvi 1 R22 932 + POP R24 933 + JMP l50 934 + l48: IMMI 0 R24 935 + JMP l50 936 + l49: GET_VEC R22 R0 R24 937 + l50: DOM R10 R25 938 + DOM R24 R26 939 + INTERSECTION R25 R26 R25 940 + ISEMPTY R25 R26 941 + NOT R26 R26 942 + SIMPLIFY_LIN R10 R24 0 R28 R29 R27 943 + OPEN_AGGREGATION VEC 944 + ITER_ARRAY R16 l52 945 + l51: ITER_NEXT R30 946 + ITER_NEXT R31 947 + ITER_RANGE R30 R31 l54 948 + l53: ITER_NEXT R32 949 + GET_ARRAY 1 R19 R32 R33 R34 950 + PUSH R33 951 + JMP l53 952 + l54: JMP l51 953 + l52: CLEAR R30 R34 954 + CLOSE_AGGREGATION 955 + POP R30 956 + LENGTH R30 R31 957 + JMPIFNOT R31 l55 958 + EQI R0 R31 R32 959 + JMPIF R32 l56 960 + CALL FUN f_sum_cc_dTvi 1 R30 961 + POP R32 962 + JMP l57 963 + l55: IMMI 0 R32 964 + JMP l57 965 + l56: GET_VEC R30 R0 R32 966 + l57: DOM R13 R33 967 + DOM R32 R34 968 + INTERSECTION R33 R34 R33 969 + ISEMPTY R33 R34 970 + NOT R34 R34 971 + SIMPLIFY_LIN R13 R32 0 R36 R37 R35 972 + ITER_ARRAY R2 l59 973 + l58: ITER_NEXT R38 974 + ITER_NEXT R39 975 + ITER_RANGE R38 R39 l61 976 + l60: ITER_NEXT R40 977 + ITER_ARRAY R4 l63 978 + l62: ITER_NEXT R41 979 + ITER_NEXT R42 980 + ITER_RANGE R41 R42 l65 981 + l64: ITER_NEXT R43 982 + LOAD_GLOBAL 2 R44 983 + GET_ARRAY 2 R44 R40 R43 R45 R46 984 + OPEN_AGGREGATION VEC 985 + ITER_ARRAY R16 l67 986 + l66: ITER_NEXT R47 987 + ITER_NEXT R48 988 + ITER_RANGE R47 R48 l69 989 + l68: ITER_NEXT R49 990 + GET_ARRAY 3 R17 R40 R43 R49 R50 R51 991 + CALL FUN d_op_times_i_i 0 R49 R50 992 + POP R52 993 + PUSH R52 994 + JMP l68 995 + l69: JMP l66 996 + l67: CLEAR R47 R52 997 + CLOSE_AGGREGATION 998 + POP R47 999 + LENGTH R47 R48 1000 + JMPIFNOT R48 l70 1001 + EQI R0 R48 R49 1002 + JMPIF R49 l71 1003 + CALL FUN f_sum_cc_dTvi 1 R47 1004 + POP R49 1005 + JMP l72 1006 + l70: IMMI 0 R49 1007 + JMP l72 1008 + l71: GET_VEC R47 R0 R49 1009 + l72: DOM R45 R50 1010 + DOM R49 R51 1011 + INTERSECTION R50 R51 R50 1012 + ISEMPTY R50 R51 1013 + NOT R51 R51 1014 + SIMPLIFY_LIN R45 R49 0 R53 R54 R52 1015 + POST R46 1016 + POST R51 1017 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R53 R54 R52 1018 + JMP l64 1019 + l65: JMP l62 1020 + l63: JMP l60 1021 + l61: JMP l58 1022 + l59: ITER_ARRAY R2 l74 1023 + l73: ITER_NEXT R55 1024 + ITER_NEXT R56 1025 + ITER_RANGE R55 R56 l76 1026 + l75: ITER_NEXT R57 1027 + ITER_ARRAY R16 l78 1028 + l77: ITER_NEXT R58 1029 + ITER_NEXT R59 1030 + ITER_RANGE R58 R59 l80 1031 + l79: ITER_NEXT R60 1032 + GET_ARRAY 1 R19 R60 R61 R62 1033 + OPEN_AGGREGATION VEC 1034 + ITER_ARRAY R4 l82 1035 + l81: ITER_NEXT R63 1036 + ITER_NEXT R64 1037 + ITER_RANGE R63 R64 l84 1038 + l83: ITER_NEXT R65 1039 + GET_ARRAY 3 R17 R57 R65 R60 R66 R67 1040 + PUSH R66 1041 + JMP l83 1042 + l84: JMP l81 1043 + l82: CLEAR R63 R67 1044 + CLOSE_AGGREGATION 1045 + POP R63 1046 + POST R62 1047 + CALL ROOT f_upper_bound_on_increments_vi_d1vi 1 R61 R63 1048 + JMP l79 1049 + l80: JMP l77 1050 + l78: JMP l75 1051 + l76: JMP l73 1052 + l74: POST R26 1053 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R28 R29 R27 1054 + POST R34 1055 + CALL ROOT f_pre_int_lin_eq_d1i_d1vi_i 1 R36 R37 R35 1056 + OPEN_AGGREGATION VEC 1057 + PUSH R10 1058 + CLOSE_AGGREGATION 1059 + POP R64 1060 + OPEN_AGGREGATION VEC 1061 + ITER_ARRAY R64 l86 1062 + l85: ITER_NEXT R66 1063 + PUSH R66 1064 + JMP l85 1065 + l86: ITER_ARRAY R19 l88 1066 + l87: ITER_NEXT R67 1067 + PUSH R67 1068 + JMP l87 1069 + l88: CLEAR R66 R67 1070 + CLOSE_AGGREGATION 1071 + POP R65 1072 + OPEN_AGGREGATION VEC 1073 + ITER_ARRAY R2 l90 1074 + l89: ITER_NEXT R66 1075 + ITER_NEXT R67 1076 + ITER_RANGE R66 R67 l92 1077 + l91: ITER_NEXT R68 1078 + ITER_ARRAY R4 l94 1079 + l93: ITER_NEXT R69 1080 + ITER_NEXT R70 1081 + ITER_RANGE R69 R70 l96 1082 + l95: ITER_NEXT R71 1083 + ITER_ARRAY R16 l98 1084 + l97: ITER_NEXT R72 1085 + ITER_NEXT R73 1086 + ITER_RANGE R72 R73 l100 1087 + l99: ITER_NEXT R74 1088 + GET_ARRAY 3 R17 R68 R71 R74 R75 R76 1089 + PUSH R75 1090 + JMP l99 1091 + l100: JMP l97 1092 + l98: JMP l95 1093 + l96: JMP l93 1094 + l94: JMP l91 1095 + l92: JMP l89 1096 + l90: CLEAR R66 R76 1097 + CLOSE_AGGREGATION 1098 + POP R66 1099 + OPEN_AGGREGATION VEC 1100 + ITER_ARRAY R65 l102 1101 + l101: ITER_NEXT R68 1102 + PUSH R68 1103 + JMP l101 1104 + l102: ITER_ARRAY R66 l104 1105 + l103: ITER_NEXT R69 1106 + PUSH R69 1107 + JMP l103 1108 + l104: CLEAR R68 R69 1109 + CLOSE_AGGREGATION 1110 + POP R67 1111 + CALL ROOT solve_this 1 R8 R8 R67 R0 R0 1112 + CLEAR R0 R67 1113 + RET
+77
radiation/radiation.mzn
··· 1 + %-----------------------------------------------------------------------------% 2 + % Radiation problem, MiniZinc 2.0.4 version 3 + % 4 + %-----------------------------------------------------------------------------% 5 + 6 + %-----------------------------------------------------------------------------% 7 + % Parameters 8 + %-----------------------------------------------------------------------------% 9 + 10 + int: m; % Rows 11 + int: n; % Columns 12 + 13 + set of int: Rows = 1..m; 14 + set of int: Columns = 1..n; 15 + 16 + % Intensity matrix 17 + array[Rows, Columns] of int: Intensity; 18 + 19 + 20 + set of int: BTimes = 1..Bt_max; 21 + 22 + int: Bt_max = max(i in Rows, j in Columns) (Intensity[i,j]); 23 + int: Ints_sum = sum(i in Rows, j in Columns) (Intensity[i,j]); 24 + 25 + %-----------------------------------------------------------------------------% 26 + % Variables 27 + %-----------------------------------------------------------------------------% 28 + 29 + % Total beam-on time 30 + var 0..Ints_sum: Beamtime; 31 + 32 + % Number of shape matrices 33 + var 0..m*n: K; 34 + 35 + % N[b] is the number of shape matrices with associated beam-on time b 36 + array[BTimes] of var 0..m*n: N; 37 + 38 + % Q[i,j,b] is the number of shape matrices with associated beam-on time 39 + % b that expose cell (i,j) 40 + array[Rows, Columns, BTimes] of var 0..m*n: Q; 41 + 42 + %-----------------------------------------------------------------------------% 43 + % Constraints 44 + %-----------------------------------------------------------------------------% 45 + 46 + % For FD/LP hybrid solving, all these should go the LP solver 47 + % (with a suitable linearisation of the 'max' expressions). 48 + constraint 49 + Beamtime = sum(b in BTimes) (b * N[b]) 50 + /\ 51 + K = sum(b in BTimes) (N[b]) 52 + /\ 53 + forall(i in Rows, j in Columns) 54 + ( Intensity[i,j] = sum([b * Q[i,j,b] | b in BTimes]) ) 55 + /\ 56 + forall(i in Rows, b in BTimes) 57 + ( upper_bound_on_increments(N[b], [Q[i,j,b] | j in Columns]) ); 58 + 59 + 60 + predicate upper_bound_on_increments(var int: N_b, array[int] of var int: L) = 61 + N_b >= L[1] + sum([ max(L[j] - L[j-1], 0) | j in 2..n ]); 62 + % 63 + % Good linear version: 64 + % let { array[min(index_set(L))..max(index_set(L))] of var int: S } in 65 + % N_b >= L[1] + sum([ S[j] | j in 2..n ]) /\ 66 + % forall([ S[j] >= L[j] - L[j-1] /\ S[j] >= 0 | j in 2..n ]); 67 + 68 + 69 + %-----------------------------------------------------------------------------% 70 + output [ 71 + "Beamtime = \(Beamtime);\n", 72 + "K = \(K);\n", 73 + "N = \(N);\n", 74 + "Q = array3d(\(Rows), \(Columns), \(BTimes), \(Q));\n" 75 + ]; 76 + 77 + %-----------------------------------------------------------------------------%
+35
scatterplot.py
··· 1 + #!/usr/bin/env python3 2 + import sys 3 + 4 + import numpy as np 5 + import seaborn as sns 6 + import matplotlib.pyplot as plt 7 + import pandas as pd 8 + import matplotlib as mpl 9 + 10 + if __name__ == "__main__": 11 + data = pd.read_csv(sys.argv[1]) 12 + 13 + sns.set(font_scale=1.24, style="whitegrid", font="IBM Plex Sans") 14 + fig, ax = plt.subplots() 15 + 16 + plot = sns.scatterplot( 17 + data=data, 18 + x="Compile Time (s)", 19 + y="Solve Time (s)", 20 + hue="Configuration", 21 + style="Configuration", 22 + legend="gbac" in sys.argv[1], 23 + ) 24 + 25 + if "radiation" in sys.argv[1]: 26 + ax.set_xlim(0, 0.5) 27 + ax.set_ylim(0, 0.5) 28 + elif "gbac" in sys.argv[1]: 29 + handles, labels = ax.get_legend_handles_labels() 30 + ax.legend(handles=handles, labels=labels) 31 + plot.legend(bbox_to_anchor=(0.23, 0.95), loc="upper left", borderaxespad=0) 32 + ax.set_xlim(0, 30) 33 + ax.set_ylim(0, 30) 34 + 35 + plot.figure.savefig("output.pdf", bbox_inches="tight")