This is the one hundred and sixth part of the ILP series. For your convenience you can find other parts in the table of contents in Part 1 – Boolean algebra
Let’s solve Golden Waste (Złoty Odpad) riddle. We have a board with golden coins on it. One of the coins is a starting point and is numbered 1
. We need to go along the blue lines and collect all the coins with the following rules:
- we must collect a coin when we get to it
- when collecting a coin, we can either continue straight or turn left or right; we can’t turn around (do U turn)
Let’s solve that with ILP. The idea is as follows:
- We want to number coins from one to
n
(number of coins); we represent this number with a bitset (to make things faster) - each coin has two bitsets indicating which direction we entered this coin (up, right, bottom, left) and which direction we left
- for each coin, we analyze all four directions and make sure that all coins on the path in that direction have either lower number (so they were collected earlier) or we entered the first coin with higher number from the correct direction
Let’s see the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
public class Field { public IVariable[] DirectionIn {get;set;} public IVariable[] DirectionOut {get;set;} public IVariable[] Number {get;set;} } var board = new string[]{ " X X", " X X ", " XX X1", "X X", " XXXX ", "X XX ", " XX ", "XXXX X " }; var numbersCount = board.SelectMany(line => line.Select(character => character)).Count(character => character != ' '); var fields = board.Select(line => line.Select(f => f != ' ' ? new Field{ DirectionIn = Enumerable.Range(0, 4).Select(i => solver.CreateAnonymous(Domain.BinaryInteger)).ToArray(), DirectionOut = Enumerable.Range(0, 4).Select(i => solver.CreateAnonymous(Domain.BinaryInteger)).ToArray(), Number = Enumerable.Range(0, numbersCount).Select(i => solver.CreateAnonymous(Domain.BinaryInteger)).ToArray() } : null).ToArray()).ToArray(); for(int row=0;row<board.Length;++row){ for(int column=0;column<board[0].Length;++column){ if(board[row][column] != ' '){ var thisField = fields[row][column]; // If this is one, then select it if(board[row][column] == '1'){ thisField.Number[0].Set<Equal>(solver.FromConstant(1)); } // Exactly one number solver.Set<Equal>(solver.FromConstant(1), solver.Operation<Addition>(thisField.Number)); // Cannot turn around for(int direction=0;direction<4;++direction){ thisField.DirectionIn[direction].Operation<Addition>(thisField.DirectionOut[direction]).Set<LessOrEqual>(solver.FromConstant(1)); } // Exactly one direction in solver.Set<Equal>(solver.FromConstant(1), solver.Operation<Addition>(thisField.DirectionIn)); // Exactly one direction out solver.Set<Equal>(solver.FromConstant(1), solver.Operation<Addition>(thisField.DirectionOut)); // Either this is last fields // Or there is some other field with value + 1 and input direction matching output direction // 0 going up, 1 going right, 2 going down, 3 going left var isNotLastField = thisField.Number[numbersCount-1].Operation<BinaryNegation>(); Func<Field, IVariable> numberHash = f => solver.Operation<Addition>( Enumerable.Range(0, numbersCount).Select(p => solver.Operation<Multiplication>(f.Number[p], solver.FromConstant(p))).ToArray() ); Func<Field, int, int, int, IVariable, IVariable> matchField = (localThis, r, c, directionIn, shouldCarryOn) => { if(board[r][c] != ' '){ var thatField = fields[r][c]; var isLowerNumber = solver.Operation<IsLessOrEqual>( numberHash(thatField), numberHash(localThis) ); var isNextNumber = solver.Operation<IsEqual>( solver.Operation<Addition>(solver.FromConstant(1), numberHash(localThis)), numberHash(thatField) ); var isDirectionInMatching = thatField.DirectionIn[directionIn]; solver.Set<Equal>( solver.FromConstant(1), solver.Operation<MaterialImplication>( solver.Operation<Conjunction>(shouldCarryOn), solver.Operation<Disjunction>( isLowerNumber, solver.Operation<Conjunction>(isNextNumber, isDirectionInMatching) ) ) ); return solver.Operation<Conjunction>(shouldCarryOn, isLowerNumber); } return shouldCarryOn; }; IVariable shouldContinue; // Going up shouldContinue = thisField.DirectionOut[0].Operation<Conjunction>(isNotLastField); for(int row2 = row-1;row2>=0;--row2){ shouldContinue = shouldContinue.Operation<Conjunction>(matchField(thisField, row2, column, 2, shouldContinue)); } shouldContinue.Set<Equal>(solver.FromConstant(0)); // Going down shouldContinue = thisField.DirectionOut[2].Operation<Conjunction>(isNotLastField); for(int row2 = row+1;row2<board.Length;++row2){ shouldContinue = shouldContinue.Operation<Conjunction>(matchField(thisField, row2, column, 0, shouldContinue)); } shouldContinue.Set<Equal>(solver.FromConstant(0)); // Going left shouldContinue = thisField.DirectionOut[3].Operation<Conjunction>(isNotLastField); for(int column2=column-1;column2>=0;--column2){ shouldContinue = shouldContinue.Operation<Conjunction>(matchField(thisField, row, column2, 1, shouldContinue)); } shouldContinue.Set<Equal>(solver.FromConstant(0)); // Going right shouldContinue = thisField.DirectionOut[1].Operation<Conjunction>(isNotLastField); for(int column2=column+1;column2<board[0].Length;++column2){ shouldContinue = shouldContinue.Operation<Conjunction>(matchField(thisField, row, column2, 3, shouldContinue)); } shouldContinue.Set<Equal>(solver.FromConstant(0)); } } } // All numbers are different for(int number=0;number<numbersCount;++number){ solver.Operation<Addition>(fields.SelectMany(f => f).Where(f => f != null).Select(f => f.Number[number]).ToArray()).Set<Equal>(solver.FromConstant(1)); } solver.AddGoal("goal", solver.FromConstant(0)); solver.Solve(); for(int row=0;row<board.Length;++row){ for(int column=0;column<board.Length;++column){ if(board[row][column] != ' '){ var thisField = fields[row][column]; for(int number=0;number<numbersCount;++number){ if(solver.GetValue(thisField.Number[number]) > 0){ Console.Write((number < 9 ? " " : "") + (number + 1) + " "); } } }else{ Console.Write(" "); } } Console.WriteLine(); } |
First, we define our coin class (lines 1-5). Next, we define a starting board (lines 7-16). We also count the number of coins (18) and then initialize variables (20-24).
Next, we iterate over all fields (26) and look for coins (28). We hardcode the starting point (31-34). Next, we make sure that the bitset indicating the number has exactly one value (36-37), that we can’t exit the coin to go back (to the U-turn) (39-42), and that there is exactly one input direction and output direction (44-48).
Now, we encode the main part. We first store a variable indicating whether this is the last coin to collect (53). We define a helper variable that will decode number bitset into a single integer so we can compare them easily (55-57). Finally, we encode the main function that builds the path.
The idea is: we start from some coin localThis
and we check other fields along some straight line. When we spot another coin, we calculate if it has lower number (and was collected earlier) (63), or is exactly next to be collected (68-71), and that we entered from the right direction (73). We then enforce this with material implication (75-84). Finally, we return the flag indicating whether we should continue looking along this path (lines 86, 89).
We then use this function in four directions: (94-99, 101-106, 108-113, 115-120). Finally, we just make sure that all coins have different numbers (125-128) and solve the problem. Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
Tried aggregator 3 times. MIP Presolve eliminated 1270 rows and 609 columns. MIP Presolve modified 33469 coefficients. Aggregator did 895 substitutions. Reduced MIP has 1886 rows, 1454 columns, and 32267 nonzeros. Reduced MIP has 1454 binaries, 0 generals, 0 SOSs, and 0 indicators. Presolve time = 0.06 sec. (89.01 ticks) Probing time = 0.00 sec. (4.29 ticks) Tried aggregator 1 time. Reduced MIP has 1886 rows, 1454 columns, and 32267 nonzeros. Reduced MIP has 1454 binaries, 0 generals, 0 SOSs, and 0 indicators. Presolve time = 0.02 sec. (11.67 ticks) Probing time = 0.00 sec. (4.28 ticks) Clique table members: 2759. MIP emphasis: balance optimality and feasibility. MIP search method: dynamic search. Parallel mode: deterministic, using up to 12 threads. Root relaxation solution time = 0.05 sec. (52.10 ticks) Nodes Cuts/ Node Left Objective IInf Best Integer Best Bound ItCnt Gap 0 0 0.0000 508 0.0000 874 0 0 0.0000 481 Cuts: 238 1192 0 0 0.0000 580 Cuts: 410 2048 0 0 0.0000 532 Cuts: 192 2580 0 0 0.0000 660 Cuts: 498 3396 0 2 0.0000 263 0.0000 3400 Elapsed time = 2.36 sec. (2430.37 ticks, tree = 0.01 MB, solutions = 0) 25 27 0.0000 372 0.0000 9792 182 146 0.0000 480 0.0000 34215 360 218 0.0000 359 0.0000 59248 473 275 0.0000 382 0.0000 86080 630 392 0.0000 392 0.0000 102841 961 441 infeasible 0.0000 127669 1029 455 infeasible 0.0000 146053 1149 479 0.0000 408 0.0000 163289 1216 540 0.0000 440 0.0000 176188 1551 579 infeasible 0.0000 232730 Elapsed time = 5.97 sec. (5824.01 ticks, tree = 0.56 MB, solutions = 0) 1690 585 infeasible 0.0000 289363 1805 601 0.0000 515 0.0000 325263 1983 602 0.0000 477 0.0000 373383 2124 600 0.0000 455 0.0000 431960 2316 589 infeasible 0.0000 490860 2546 600 0.0000 570 0.0000 544653 2586 598 0.0000 562 0.0000 584681 2750 632 infeasible 0.0000 643752 2914 652 infeasible 0.0000 681857 3119 652 0.0000 679 0.0000 725066 Elapsed time = 22.92 sec. (18464.39 ticks, tree = 1.39 MB, solutions = 0) 3251 658 0.0000 695 0.0000 811097 3287 656 infeasible 0.0000 849022 3404 681 0.0000 528 0.0000 907778 3484 695 infeasible 0.0000 930758 3586 721 0.0000 648 0.0000 954548 3874 774 0.0000 588 0.0000 1014376 4009 807 0.0000 444 0.0000 1049944 4065 821 0.0000 502 0.0000 1069917 4327 865 0.0000 407 0.0000 1144971 4367 877 0.0000 521 0.0000 1160531 Elapsed time = 39.03 sec. (29642.77 ticks, tree = 1.74 MB, solutions = 0) 4472 910 0.0000 417 0.0000 1190811 4763 909 infeasible 0.0000 1275674 4797 921 0.0000 475 0.0000 1295329 4821 935 0.0000 481 0.0000 1312840 4857 949 0.0000 508 0.0000 1332501 4918 960 0.0000 520 0.0000 1392387 5005 997 0.0000 455 0.0000 1432805 5072 1020 0.0000 594 0.0000 1448193 5160 1040 0.0000 321 0.0000 1479499 5246 1048 0.0000 398 0.0000 1504146 Elapsed time = 54.63 sec. (42147.18 ticks, tree = 2.13 MB, solutions = 0) 5426 1124 0.0000 423 0.0000 1544836 5711 1181 infeasible 0.0000 1604289 5787 1158 infeasible 0.0000 1631589 5850 1169 0.0000 595 0.0000 1655718 5966 1183 0.0000 596 0.0000 1695224 6145 1204 0.0000 611 0.0000 1770821 6253 1242 0.0000 595 0.0000 1814478 6279 1244 infeasible 0.0000 1843727 6318 1247 infeasible 0.0000 1878957 6342 1249 infeasible 0.0000 1894346 Elapsed time = 70.39 sec. (54490.95 ticks, tree = 3.57 MB, solutions = 0) 6453 1240 0.0000 653 0.0000 1946631 6764 1281 0.0000 556 0.0000 2047656 6804 1283 infeasible 0.0000 2063706 6864 1299 infeasible 0.0000 2080575 7032 1340 0.0000 404 0.0000 2123133 7164 1346 0.0000 386 0.0000 2158194 7320 1336 0.0000 389 0.0000 2205352 7598 1302 0.0000 492 0.0000 2275263 7824 1294 0.0000 386 -0.0000 2350430 7831 1300 0.0000 442 -0.0000 2352517 Elapsed time = 93.77 sec. (77852.80 ticks, tree = 58.94 MB, solutions = 0) 7850 1311 0.0000 404 -0.0000 2355298 7923 969 0.0000 442 -0.0000 2366582 8187 689 0.0000 402 -0.0000 2400804 8559 412 0.0000 318 -0.0000 2435661 8948 389 infeasible -0.0000 2470993 9576 476 0.0000 330 -0.0000 2520604 10159 477 0.0000 334 -0.0000 2579870 10555 518 0.0000 303 -0.0000 2618541 10930 518 0.0000 303 -0.0000 2664466 11282 519 0.0000 418 -0.0000 2711235 Elapsed time = 103.23 sec. (87766.62 ticks, tree = 1.00 MB, solutions = 0) 11651 566 0.0000 366 -0.0000 2758926 11693 565 0.0000 380 -0.0000 2764222 12058 290 0.0000 402 -0.0000 2801170 12633 230 infeasible -0.0000 2865597 13570 230 0.0000 239 -0.0000 2948118 14733 263 infeasible -0.0000 3061474 15820 202 0.0000 287 -0.0000 3169807 17003 275 0.0000 300 -0.0000 3281567 17989 304 0.0000 216 -0.0000 3379704 19041 267 0.0000 359 -0.0000 3481728 Elapsed time = 116.88 sec. (103305.54 ticks, tree = 0.03 MB, solutions = 0) 20430 274 infeasible -0.0000 3627297 21450 423 0.0000 302 -0.0000 3711606 23285 375 0.0000 276 -0.0000 3861744 24549 281 infeasible -0.0000 3979235 26136 435 0.0000 218 -0.0000 4127636 27561 391 0.0000 288 -0.0000 4249779 29100 424 0.0000 240 -0.0000 4376829 30874 439 0.0000 277 -0.0000 4524167 32176 415 0.0000 317 -0.0000 4638570 33981 443 0.0000 303 -0.0000 4798347 Elapsed time = 128.17 sec. (112887.60 ticks, tree = 0.05 MB, solutions = 0) 35594 351 0.0000 374 -0.0000 4933169 36777 478 0.0000 341 -0.0000 5045144 38466 458 0.0000 241 -0.0000 5209098 39471 471 0.0000 314 -0.0000 5311307 41132 528 0.0000 166 -0.0000 5465492 42639 520 infeasible -0.0000 5596801 44371 393 infeasible -0.0000 5747683 45828 546 0.0000 318 -0.0000 5889722 47025 530 0.0000 263 -0.0000 6007087 52571 586 infeasible -0.0000 6553399 Elapsed time = 142.38 sec. (125333.77 ticks, tree = 0.08 MB, solutions = 0) 58950 670 0.0000 353 -0.0000 7130024 64631 643 0.0000 281 -0.0000 7646642 69621 603 infeasible -0.0000 8169867 74350 602 0.0000 264 -0.0000 8669095 80366 715 0.0000 176 -0.0000 9230184 85904 475 0.0000 319 -0.0000 9771470 91692 502 0.0000 316 -0.0000 10317244 97439 608 0.0000 262 -0.0000 10808574 103409 594 0.0000 155 -0.0000 11361920 109112 645 infeasible -0.0000 11891245 Elapsed time = 186.53 sec. (163579.26 ticks, tree = 0.06 MB, solutions = 0) 114282 994 infeasible -0.0000 12422478 119356 803 infeasible -0.0000 12941160 125898 915 0.0000 273 -0.0000 13509013 132155 881 0.0000 262 -0.0000 14064545 137866 886 infeasible -0.0000 14590510 143707 914 0.0000 288 -0.0000 15177172 149235 807 0.0000 285 -0.0000 15701530 154911 675 0.0000 178 -0.0000 16241618 161882 821 0.0000 201 -0.0000 16817652 169771 823 0.0000 294 -0.0000 17381212 Elapsed time = 245.55 sec. (201783.67 ticks, tree = 0.09 MB, solutions = 0) 177104 765 0.0000 153 -0.0000 17960080 184942 821 0.0000 317 -0.0000 18569902 192554 749 0.0000 260 -0.0000 19131939 198295 787 0.0000 244 -0.0000 19644341 204161 727 0.0000 203 -0.0000 20187350 210163 575 0.0000 188 -0.0000 20746953 217540 898 0.0000 223 -0.0000 21304646 224070 780 infeasible -0.0000 21843454 230533 820 0.0000 263 -0.0000 22406991 236733 779 0.0000 272 -0.0000 22960102 Elapsed time = 300.91 sec. (240013.77 ticks, tree = 0.07 MB, solutions = 0) 242658 745 infeasible -0.0000 23514500 247652 787 0.0000 344 -0.0000 24030942 252764 942 infeasible -0.0000 24564913 258233 961 0.0000 325 -0.0000 25099913 263573 874 0.0000 322 -0.0000 25638923 268963 864 0.0000 284 -0.0000 26164593 273168 887 0.0000 278 -0.0000 26658456 277901 886 0.0000 210 -0.0000 27176495 283861 956 0.0000 313 -0.0000 27737094 289071 1070 infeasible -0.0000 28251655 Elapsed time = 344.66 sec. (278234.91 ticks, tree = 0.14 MB, solutions = 0) 293946 1036 0.0000 295 -0.0000 28774451 298674 1027 0.0000 270 -0.0000 29314425 304035 901 0.0000 291 -0.0000 29855358 308755 1004 0.0000 260 -0.0000 30377899 313952 1082 0.0000 182 -0.0000 30884392 319647 1011 infeasible -0.0000 31447232 325025 962 0.0000 368 -0.0000 31993586 331144 1152 infeasible -0.0000 32537413 336554 1085 0.0000 293 -0.0000 33082843 342745 1060 0.0000 310 -0.0000 33644741 Elapsed time = 399.03 sec. (316477.28 ticks, tree = 0.09 MB, solutions = 0) 348043 1070 0.0000 325 -0.0000 34195498 353051 1083 infeasible -0.0000 34733741 357706 1092 0.0000 204 -0.0000 35234117 362868 1098 0.0000 396 -0.0000 35793118 367279 1060 0.0000 250 -0.0000 36308791 372233 1152 0.0000 240 -0.0000 36828052 377434 1040 0.0000 218 -0.0000 37350915 382616 1201 0.0000 283 -0.0000 37889699 387312 1104 0.0000 321 -0.0000 38398280 392225 1292 0.0000 250 -0.0000 38920991 Elapsed time = 447.94 sec. (354693.45 ticks, tree = 0.12 MB, solutions = 0) 397318 1139 0.0000 375 -0.0000 39441204 402948 1109 0.0000 301 -0.0000 39988911 408043 1211 0.0000 325 -0.0000 40527949 413033 1266 infeasible -0.0000 41021940 418087 1259 0.0000 336 -0.0000 41533403 422935 1164 0.0000 238 -0.0000 42063377 427481 1148 0.0000 288 -0.0000 42573987 432508 1157 0.0000 310 -0.0000 43081190 437531 1104 0.0000 393 -0.0000 43621012 442498 1095 infeasible -0.0000 44152646 Elapsed time = 493.66 sec. (392931.47 ticks, tree = 0.11 MB, solutions = 0) 447235 1243 0.0000 367 -0.0000 44673781 454167 1167 0.0000 364 -0.0000 45252390 459563 1358 0.0000 258 -0.0000 45779187 465352 1280 0.0000 276 -0.0000 46357473 470467 1164 infeasible -0.0000 46875991 475439 1234 0.0000 351 -0.0000 47413722 480265 1176 0.0000 341 -0.0000 47920454 485190 1296 0.0000 308 -0.0000 48445537 489439 1203 0.0000 275 -0.0000 48969330 494417 1212 infeasible -0.0000 49473099 Elapsed time = 543.44 sec. (431141.50 ticks, tree = 0.11 MB, solutions = 0) 499878 1134 0.0000 212 -0.0000 50001890 505210 1150 0.0000 348 -0.0000 50541821 510703 1177 0.0000 288 -0.0000 51085904 516296 1191 0.0000 315 -0.0000 51627983 522136 1340 0.0000 275 -0.0000 52196564 527818 1254 infeasible -0.0000 52747921 533847 1184 infeasible -0.0000 53277168 539496 1225 0.0000 267 -0.0000 53838500 545609 1258 0.0000 324 -0.0000 54438657 550950 1279 0.0000 239 -0.0000 54978252 Elapsed time = 608.14 sec. (469350.48 ticks, tree = 0.11 MB, solutions = 0) 556262 1247 0.0000 248 -0.0000 55503690 562223 1376 0.0000 353 -0.0000 56086832 567933 1384 0.0000 303 -0.0000 56644010 573375 1411 0.0000 201 -0.0000 57189815 578931 1373 infeasible -0.0000 57706883 584688 1302 0.0000 337 -0.0000 58273497 590210 1307 infeasible -0.0000 58818386 596342 1262 0.0000 400 -0.0000 59389073 601521 1501 0.0000 261 -0.0000 59915960 607666 1618 0.0000 316 -0.0000 60463241 Elapsed time = 655.89 sec. (507553.95 ticks, tree = 0.14 MB, solutions = 0) 613534 1464 infeasible -0.0000 61020365 619827 1346 infeasible -0.0000 61571663 625674 1185 0.0000 337 -0.0000 62134994 630902 1230 infeasible -0.0000 62649879 636152 1269 0.0000 267 -0.0000 63170593 641404 1232 infeasible -0.0000 63717245 647098 1131 0.0000 277 -0.0000 64283791 651991 1146 0.0000 280 -0.0000 64792110 657625 1102 0.0000 336 -0.0000 65339290 662514 1143 0.0000 288 -0.0000 65886969 Elapsed time = 701.64 sec. (545809.44 ticks, tree = 0.10 MB, solutions = 0) 667761 982 infeasible -0.0000 66435420 672993 997 infeasible -0.0000 66975538 678105 878 0.0000 333 -0.0000 67497233 684034 904 0.0000 243 -0.0000 68064925 688856 1029 infeasible -0.0000 68561991 694528 996 0.0000 357 -0.0000 69108002 699668 949 0.0000 315 -0.0000 69630518 704198 991 infeasible -0.0000 70161775 708775 1017 0.0000 359 -0.0000 70646954 713778 1124 0.0000 319 -0.0000 71197164 Elapsed time = 753.45 sec. (584025.21 ticks, tree = 0.10 MB, solutions = 0) 718098 1053 infeasible -0.0000 71697499 722978 1157 0.0000 354 -0.0000 72209736 727746 1094 infeasible -0.0000 72707109 732735 1208 0.0000 321 -0.0000 73253307 737382 1158 0.0000 262 -0.0000 73777309 741743 1186 0.0000 314 -0.0000 74282073 746089 1111 0.0000 231 -0.0000 74770022 750690 1071 0.0000 333 -0.0000 75294136 756570 1056 0.0000 183 -0.0000 75849757 761838 990 infeasible -0.0000 76384511 Elapsed time = 806.95 sec. (622255.57 ticks, tree = 0.09 MB, solutions = 0) 766503 1047 0.0000 199 -0.0000 76884595 772155 973 0.0000 357 -0.0000 77445968 777804 905 0.0000 307 -0.0000 78018695 782798 1022 0.0000 255 -0.0000 78543623 787886 915 0.0000 354 -0.0000 79080195 792781 837 0.0000 207 -0.0000 79607676 798278 812 0.0000 288 -0.0000 80149715 804008 877 0.0000 352 -0.0000 80674521 810292 950 0.0000 221 -0.0000 81234497 816081 1096 0.0000 248 -0.0000 81761078 Elapsed time = 864.78 sec. (660493.24 ticks, tree = 0.09 MB, solutions = 0) 821608 981 0.0000 339 -0.0000 82343536 826874 806 0.0000 328 -0.0000 82820634 832016 757 0.0000 328 -0.0000 83327447 837482 787 0.0000 308 -0.0000 83869680 842139 731 0.0000 323 -0.0000 84381411 847060 783 infeasible -0.0000 84938335 851915 664 0.0000 290 -0.0000 85467634 857317 674 0.0000 237 -0.0000 85996304 862563 625 infeasible -0.0000 86529643 868267 601 0.0000 337 -0.0000 87056256 Elapsed time = 919.34 sec. (698703.51 ticks, tree = 0.06 MB, solutions = 0) 874538 564 0.0000 289 -0.0000 87647117 880183 486 infeasible -0.0000 88177720 885096 474 0.0000 393 -0.0000 88714039 890118 478 0.0000 278 -0.0000 89215217 894929 452 infeasible -0.0000 89745753 899775 557 0.0000 289 -0.0000 90248578 905044 588 0.0000 284 -0.0000 90809349 909687 539 0.0000 291 -0.0000 91299572 914621 535 0.0000 372 -0.0000 91835448 919578 534 0.0000 259 -0.0000 92373542 Elapsed time = 979.02 sec. (736908.26 ticks, tree = 0.05 MB, solutions = 0) 924284 528 infeasible -0.0000 92897665 928973 614 0.0000 284 -0.0000 93422898 933775 525 0.0000 303 -0.0000 93952475 938738 533 0.0000 248 -0.0000 94478367 943372 431 0.0000 174 -0.0000 94995204 948523 447 0.0000 334 -0.0000 95503630 953489 585 0.0000 402 -0.0000 96027542 958414 528 0.0000 374 -0.0000 96555477 962500 423 0.0000 353 -0.0000 97053906 967184 482 0.0000 268 -0.0000 97556109 Elapsed time = 1033.42 sec. (775159.19 ticks, tree = 0.05 MB, solutions = 0) 971887 500 0.0000 316 -0.0000 98087834 975986 487 0.0000 300 -0.0000 98569907 980549 469 infeasible -0.0000 99091590 985736 427 infeasible -0.0000 99606175 990496 452 infeasible -0.0000 1.00e+008 996024 427 0.0000 367 -0.0000 1.01e+008 1001487 326 0.0000 399 -0.0000 1.01e+008 1006410 393 0.0000 338 -0.0000 1.02e+008 1010756 381 0.0000 340 -0.0000 1.02e+008 1015858 393 0.0000 400 -0.0000 1.03e+008 Elapsed time = 1085.41 sec. (813376.28 ticks, tree = 0.05 MB, solutions = 0) 1021091 437 0.0000 279 -0.0000 1.03e+008 1027315 368 0.0000 253 -0.0000 1.04e+008 1032859 283 0.0000 261 -0.0000 1.04e+008 1037989 506 0.0000 315 -0.0000 1.05e+008 1043080 291 0.0000 329 -0.0000 1.05e+008 1048499 481 0.0000 238 -0.0000 1.06e+008 1054622 474 infeasible -0.0000 1.06e+008 1059697 488 infeasible -0.0000 1.07e+008 1065295 516 0.0000 215 -0.0000 1.07e+008 1070060 537 0.0000 293 -0.0000 1.08e+008 Elapsed time = 1150.30 sec. (851586.95 ticks, tree = 0.16 MB, solutions = 0) 1075283 516 0.0000 255 -0.0000 1.08e+008 1080812 392 0.0000 336 -0.0000 1.09e+008 1085879 298 0.0000 336 -0.0000 1.10e+008 1091175 558 infeasible -0.0000 1.10e+008 1096144 557 infeasible -0.0000 1.11e+008 1100783 505 0.0000 271 -0.0000 1.11e+008 1106516 471 0.0000 305 -0.0000 1.12e+008 1111268 484 0.0000 365 -0.0000 1.12e+008 1116540 569 0.0000 303 -0.0000 1.13e+008 1121296 601 0.0000 299 -0.0000 1.13e+008 Elapsed time = 1210.66 sec. (889845.90 ticks, tree = 0.06 MB, solutions = 0) 1125401 527 infeasible -0.0000 1.14e+008 1129996 481 0.0000 330 -0.0000 1.14e+008 1133934 408 0.0000 305 -0.0000 1.15e+008 1138889 437 infeasible -0.0000 1.15e+008 1143893 449 0.0000 220 -0.0000 1.16e+008 1149074 467 0.0000 364 -0.0000 1.16e+008 1153624 329 0.0000 352 -0.0000 1.17e+008 1158969 491 infeasible -0.0000 1.17e+008 1163791 431 infeasible -0.0000 1.18e+008 1167484 332 0.0000 318 -0.0000 1.18e+008 Elapsed time = 1264.00 sec. (928040.04 ticks, tree = 0.26 MB, solutions = 0) 1171268 317 infeasible -0.0000 1.19e+008 1175984 329 0.0000 287 -0.0000 1.19e+008 1180925 323 0.0000 293 -0.0000 1.20e+008 1185958 242 0.0000 415 -0.0000 1.20e+008 1191580 223 infeasible -0.0000 1.21e+008 *1194993 186 integral 0 0.0000 -0.0000 1.21e+008 0.00% Root node processing (before b&c): Real time = 2.33 sec. (2407.88 ticks) Parallel b&c, 12 threads: Real time = 1294.31 sec. (947046.19 ticks) Sync time (average) = 178.58 sec. Wait time (average) = 0.08 sec. ------------ Total (root+branch&cut) = 1296.64 sec. (949454.07 ticks) 17 18 4 3 6 5 2 1 20 19 14 7 13 12 21 8 9 10 11 22 16 15 23 24 |