mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Update docs dependencies; re-run notebooks
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"\n",
|
||||
"## HDF5 Format\n",
|
||||
"\n",
|
||||
"MIPLearn stores all training data in [HDF5](HDF5) (Hierarchical Data Format, Version 5) files. The HDF format was originally developed by the [National Center for Supercomputing Applications][NCSA] (NCSA) for storing and organizing large amounts of data, and supports a variety of data types, including integers, floating-point numbers, strings, and arrays. Compared to other formats, such as CSV, JSON or SQLite, the HDF5 format provides several advantages for MIPLearn, including:\n",
|
||||
"MIPLearn stores all training data in [HDF5][HDF5] (Hierarchical Data Format, Version 5) files. The HDF format was originally developed by the [National Center for Supercomputing Applications][NCSA] (NCSA) for storing and organizing large amounts of data, and supports a variety of data types, including integers, floating-point numbers, strings, and arrays. Compared to other formats, such as CSV, JSON or SQLite, the HDF5 format provides several advantages for MIPLearn, including:\n",
|
||||
"\n",
|
||||
"- *Storage of multiple scalars, vectors and matrices in a single file* --- This allows MIPLearn to store all training data related to a given problem instance in a single file, which makes training data easier to store, organize and transfer.\n",
|
||||
"- *High-performance partial I/O* --- Partial I/O allows MIPLearn to read a single element from the training data (e.g. value of the optimal solution) without loading the entire file to memory or reading it from beginning to end, which dramatically improves performance and reduces memory requirements. This is especially important when processing a large number of training data files.\n",
|
||||
@@ -58,21 +58,21 @@
|
||||
"x1 = 1\n",
|
||||
"x2 = hello world\n",
|
||||
"x3 = [1 2 3]\n",
|
||||
"x4 = [[0.37454012 0.9507143 0.7319939 ]\n",
|
||||
" [0.5986585 0.15601864 0.15599452]\n",
|
||||
" [0.05808361 0.8661761 0.601115 ]]\n",
|
||||
"x5 = (3, 2)\t0.6803075671195984\n",
|
||||
" (2, 3)\t0.4504992663860321\n",
|
||||
" (0, 4)\t0.013264961540699005\n",
|
||||
" (2, 0)\t0.9422017335891724\n",
|
||||
" (2, 4)\t0.5632882118225098\n",
|
||||
" (1, 2)\t0.38541650772094727\n",
|
||||
" (1, 1)\t0.015966251492500305\n",
|
||||
" (0, 3)\t0.2308938205242157\n",
|
||||
" (4, 4)\t0.24102546274662018\n",
|
||||
" (3, 1)\t0.6832635402679443\n",
|
||||
" (1, 3)\t0.6099966764450073\n",
|
||||
" (3, 0)\t0.83319491147995\n"
|
||||
"x4 = [[0.37454012 0.95071431 0.73199394]\n",
|
||||
" [0.59865848 0.15601864 0.15599452]\n",
|
||||
" [0.05808361 0.86617615 0.60111501]]\n",
|
||||
"x5 = (3, 2)\t0.6803075385877797\n",
|
||||
" (2, 3)\t0.450499251969543\n",
|
||||
" (0, 4)\t0.013264961159866528\n",
|
||||
" (2, 0)\t0.9422017556848528\n",
|
||||
" (2, 4)\t0.5632882178455393\n",
|
||||
" (1, 2)\t0.3854165025399161\n",
|
||||
" (1, 1)\t0.015966252220214194\n",
|
||||
" (0, 3)\t0.230893825622149\n",
|
||||
" (4, 4)\t0.24102546602601171\n",
|
||||
" (3, 1)\t0.6832635188254582\n",
|
||||
" (1, 3)\t0.6099966577826209\n",
|
||||
" (3, 0)\t0.8331949117361643\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -108,12 +108,6 @@
|
||||
" print(\"x5 =\", h5.get_sparse(\"x5\"))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "50441907",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d0000c8d",
|
||||
|
||||
@@ -69,22 +69,22 @@
|
||||
" -709. -605. -543. -321.\n",
|
||||
" -674. -571. -341. ]\n",
|
||||
"variable features (10, 4) \n",
|
||||
" [[-1.53124309e+03 -3.50000000e+02 0.00000000e+00 9.43468018e+01]\n",
|
||||
" [-1.53124309e+03 -6.92000000e+02 2.51703322e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -4.54000000e+02 0.00000000e+00 8.25504150e+01]\n",
|
||||
" [-1.53124309e+03 -7.09000000e+02 1.11373022e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -6.05000000e+02 1.00000000e+00 -1.26055283e+02]\n",
|
||||
" [-1.53124309e+03 -5.43000000e+02 0.00000000e+00 1.68693771e+02]\n",
|
||||
" [[-1.53124309e+03 -3.50000000e+02 0.00000000e+00 9.43467993e+01]\n",
|
||||
" [-1.53124309e+03 -6.92000000e+02 2.51703329e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -4.54000000e+02 0.00000000e+00 8.25504181e+01]\n",
|
||||
" [-1.53124309e+03 -7.09000000e+02 1.11373019e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -6.05000000e+02 1.00000000e+00 -1.26055279e+02]\n",
|
||||
" [-1.53124309e+03 -5.43000000e+02 0.00000000e+00 1.68693775e+02]\n",
|
||||
" [-1.53124309e+03 -3.21000000e+02 1.07488781e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -6.74000000e+02 8.82293701e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -6.74000000e+02 8.82293687e-01 0.00000000e+00]\n",
|
||||
" [-1.53124309e+03 -5.71000000e+02 0.00000000e+00 1.41129074e+02]\n",
|
||||
" [-1.53124309e+03 -3.41000000e+02 1.28830120e-01 0.00000000e+00]]\n",
|
||||
" [-1.53124309e+03 -3.41000000e+02 1.28830116e-01 0.00000000e+00]]\n",
|
||||
"constraint features (5, 3) \n",
|
||||
" [[ 1.3100000e+03 -1.5978307e-01 0.0000000e+00]\n",
|
||||
" [ 9.8800000e+02 -3.2881632e-01 0.0000000e+00]\n",
|
||||
" [ 1.0040000e+03 -4.0601316e-01 0.0000000e+00]\n",
|
||||
" [ 1.2690000e+03 -1.3659772e-01 0.0000000e+00]\n",
|
||||
" [ 1.0070000e+03 -2.8800571e-01 0.0000000e+00]]\n"
|
||||
" [[ 1.31000000e+03 -1.59783068e-01 0.00000000e+00]\n",
|
||||
" [ 9.88000000e+02 -3.28816327e-01 0.00000000e+00]\n",
|
||||
" [ 1.00400000e+03 -4.06013164e-01 0.00000000e+00]\n",
|
||||
" [ 1.26900000e+03 -1.36597720e-01 0.00000000e+00]\n",
|
||||
" [ 1.00700000e+03 -2.88005696e-01 0.00000000e+00]]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"\n",
|
||||
"Before presenting the primal components themselves, we briefly discuss the three ways a solution may be provided to the solver. Each approach has benefits and limitations, which we also discuss in this section. All primal components can be configured to use any of the following approaches.\n",
|
||||
"\n",
|
||||
"The first approach is to provide the solution to the solver as a **warm start**. This is implemented by the class [SetWarmStart](SetWarmStart). The main advantage is that this method maintains all optimality and feasibility guarantees of the MIP solver, while still providing significant performance benefits for various classes of problems. If the machine learning model is able to predict multiple solutions, it is also possible to set multiple warm starts. In this case, the solver evaluates each warm start, discards the infeasible ones, then proceeds with the one that has the best objective value. The main disadvantage of this approach, compared to the next two, is that it provides relatively modest speedups for most problem classes, and no speedup at all for many others, even when the machine learning predictions are 100% accurate.\n",
|
||||
"The first approach is to provide the solution to the solver as a **warm start**. This is implemented by the class [SetWarmStart][SetWarmStart]. The main advantage is that this method maintains all optimality and feasibility guarantees of the MIP solver, while still providing significant performance benefits for various classes of problems. If the machine learning model is able to predict multiple solutions, it is also possible to set multiple warm starts. In this case, the solver evaluates each warm start, discards the infeasible ones, then proceeds with the one that has the best objective value. The main disadvantage of this approach, compared to the next two, is that it provides relatively modest speedups for most problem classes, and no speedup at all for many others, even when the machine learning predictions are 100% accurate.\n",
|
||||
"\n",
|
||||
"[SetWarmStart]: ../../api/components/#miplearn.components.primal.actions.SetWarmStart\n",
|
||||
"\n",
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
"8 [ 8.47 21.9 16.58 15.37 3.76 3.91 1.57 20.57 14.76 18.61] 94.58\n",
|
||||
"9 [ 8.57 22.77 17.06 16.25 4.14 4. 1.56 22.97 14.09 19.09] 100.79\n",
|
||||
"\n",
|
||||
"Restricted license - for non-production use only - expires 2024-10-28\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Restricted license - for non-production use only - expires 2026-11-23\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -155,18 +155,19 @@
|
||||
"\n",
|
||||
" 0 0 1.27484 0 4 5.00000 1.27484 74.5% - 0s\n",
|
||||
"H 0 0 4.0000000 1.27484 68.1% - 0s\n",
|
||||
"H 0 0 3.0000000 1.27484 57.5% - 0s\n",
|
||||
"H 0 0 2.0000000 1.27484 36.3% - 0s\n",
|
||||
" 0 0 1.27484 0 4 2.00000 1.27484 36.3% - 0s\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (38 simplex iterations) in 0.03 seconds (0.00 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
"\n",
|
||||
"Solution count 3: 2 4 5 \n",
|
||||
"Solution count 4: 2 3 4 5 \n",
|
||||
"\n",
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 2.000000000000e+00, best bound 2.000000000000e+00, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 143, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 151, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -324,7 +325,7 @@
|
||||
"capacities\n",
|
||||
" [1310. 988. 1004. 1269. 1007.]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -349,21 +350,20 @@
|
||||
" Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time\n",
|
||||
"\n",
|
||||
" 0 0 -1428.7265 0 4 -804.00000 -1428.7265 77.7% - 0s\n",
|
||||
"H 0 0 -995.0000000 -1428.7265 43.6% - 0s\n",
|
||||
"H 0 0 -1279.000000 -1428.7265 11.7% - 0s\n",
|
||||
" 0 0 -1428.7265 0 4 -1279.0000 -1428.7265 11.7% - 0s\n",
|
||||
"\n",
|
||||
"Cutting planes:\n",
|
||||
" Cover: 1\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (4 simplex iterations) in 0.01 seconds (0.00 work units)\n",
|
||||
"Explored 1 nodes (4 simplex iterations) in 0.02 seconds (0.00 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
"\n",
|
||||
"Solution count 2: -1279 -804 \n",
|
||||
"Solution count 3: -1279 -995 -804 \n",
|
||||
"No other solutions better than -1279\n",
|
||||
"\n",
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective -1.279000000000e+03, best bound -1.279000000000e+03, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 490, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 417, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -501,7 +501,7 @@
|
||||
"demands = [6.12 1.39 2.92 3.66 4.56 7.85 2. 5.14 5.92 0.46]\n",
|
||||
"capacities = [151.89 42.63 16.26 237.22 241.41 202.1 76.15 24.42 171.06 110.04]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -518,35 +518,38 @@
|
||||
"Presolve time: 0.00s\n",
|
||||
"Presolved: 21 rows, 110 columns, 220 nonzeros\n",
|
||||
"Variable types: 0 continuous, 110 integer (110 binary)\n",
|
||||
"Found heuristic solution: objective 245.6400000\n",
|
||||
"\n",
|
||||
"Root relaxation: objective 0.000000e+00, 18 iterations, 0.00 seconds (0.00 work units)\n",
|
||||
"\n",
|
||||
" Nodes | Current Node | Objective Bounds | Work\n",
|
||||
" Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time\n",
|
||||
"\n",
|
||||
" 0 0 0.00000 0 6 245.64000 0.00000 100% - 0s\n",
|
||||
" 0 0 0.00000 0 6 368.79000 0.00000 100% - 0s\n",
|
||||
"H 0 0 301.7200000 0.00000 100% - 0s\n",
|
||||
"H 0 0 185.1900000 0.00000 100% - 0s\n",
|
||||
"H 0 0 148.6300000 17.14595 88.5% - 0s\n",
|
||||
"H 0 0 113.1800000 17.14595 84.9% - 0s\n",
|
||||
" 0 0 17.14595 0 10 113.18000 17.14595 84.9% - 0s\n",
|
||||
"H 0 0 99.5000000 17.14595 82.8% - 0s\n",
|
||||
"H 0 0 98.3900000 17.14595 82.6% - 0s\n",
|
||||
"H 0 0 93.9800000 64.28872 31.6% - 0s\n",
|
||||
" 0 0 64.28872 0 15 93.98000 64.28872 31.6% - 0s\n",
|
||||
"H 0 0 93.9200000 64.28872 31.5% - 0s\n",
|
||||
" 0 0 86.06884 0 15 93.92000 86.06884 8.36% - 0s\n",
|
||||
"* 0 0 0 91.2300000 91.23000 0.00% - 0s\n",
|
||||
"H 0 0 153.5000000 0.00000 100% - 0s\n",
|
||||
"H 0 0 131.7700000 0.00000 100% - 0s\n",
|
||||
" 0 0 17.14595 0 10 131.77000 17.14595 87.0% - 0s\n",
|
||||
"H 0 0 115.6500000 17.14595 85.2% - 0s\n",
|
||||
"H 0 0 114.5300000 64.28872 43.9% - 0s\n",
|
||||
"H 0 0 98.3900000 64.28872 34.7% - 0s\n",
|
||||
" 0 0 74.01104 0 15 98.39000 74.01104 24.8% - 0s\n",
|
||||
"H 0 0 91.2300000 74.01104 18.9% - 0s\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (70 simplex iterations) in 0.08 seconds (0.00 work units)\n",
|
||||
"Cutting planes:\n",
|
||||
" Cover: 16\n",
|
||||
" MIR: 1\n",
|
||||
" StrongCG: 1\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (42 simplex iterations) in 0.02 seconds (0.00 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
"\n",
|
||||
"Solution count 10: 91.23 93.92 93.98 ... 368.79\n",
|
||||
"Solution count 9: 91.23 98.39 114.53 ... 368.79\n",
|
||||
"\n",
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 9.123000000000e+01, best bound 9.123000000000e+01, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 190, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 189, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -675,7 +678,7 @@
|
||||
"costs [1044.58 850.13 1014.5 944.83 697.9 971.87 213.49 220.98 70.23\n",
|
||||
" 425.33]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -701,7 +704,7 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 2.134900000000e+02, best bound 2.134900000000e+02, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 178, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 183, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -816,7 +819,7 @@
|
||||
"costs [1044.58 850.13 1014.5 944.83 697.9 971.87 213.49 220.98 70.23\n",
|
||||
" 425.33]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -843,7 +846,7 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective -1.986370000000e+03, best bound -1.986370000000e+03, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 238, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 244, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -943,11 +946,14 @@
|
||||
"weights[1] [ 2.06 96.99 83.24 21.23 18.18 18.34 30.42 52.48 43.19 29.12]\n",
|
||||
"\n",
|
||||
"Set parameter PreCrush to value 1\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
"\n",
|
||||
"Non-default parameters:\n",
|
||||
"PreCrush 1\n",
|
||||
"\n",
|
||||
"Optimize a model with 15 rows, 10 columns and 30 nonzeros\n",
|
||||
"Model fingerprint: 0x3240ea4a\n",
|
||||
"Variable types: 0 continuous, 10 integer (10 binary)\n",
|
||||
@@ -978,7 +984,7 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective -2.191400000000e+02, best bound -2.191400000000e+02, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 299, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 303, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1123,11 +1129,15 @@
|
||||
"\n",
|
||||
"Set parameter PreCrush to value 1\n",
|
||||
"Set parameter LazyConstraints to value 1\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
"\n",
|
||||
"Non-default parameters:\n",
|
||||
"PreCrush 1\n",
|
||||
"LazyConstraints 1\n",
|
||||
"\n",
|
||||
"Optimize a model with 10 rows, 45 columns and 90 nonzeros\n",
|
||||
"Model fingerprint: 0x719675e5\n",
|
||||
"Variable types: 0 continuous, 45 integer (45 binary)\n",
|
||||
@@ -1158,7 +1168,7 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 2.921000000000e+03, best bound 2.921000000000e+03, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 106, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 111, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1342,7 +1352,7 @@
|
||||
" 828.28 775.18 834.99 959.76 865.72 1193.52 1058.92 985.19 893.92\n",
|
||||
" 962.16 781.88 723.15 639.04 602.4 787.02]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -1355,43 +1365,46 @@
|
||||
" Objective range [7e+00, 6e+03]\n",
|
||||
" Bounds range [1e+00, 1e+00]\n",
|
||||
" RHS range [1e+00, 1e+03]\n",
|
||||
"Presolve removed 244 rows and 131 columns\n",
|
||||
"Presolve removed 341 rows and 133 columns\n",
|
||||
"Presolve time: 0.01s\n",
|
||||
"Presolved: 334 rows, 229 columns, 842 nonzeros\n",
|
||||
"Variable types: 116 continuous, 113 integer (113 binary)\n",
|
||||
"Found heuristic solution: objective 440662.46430\n",
|
||||
"Found heuristic solution: objective 429461.97680\n",
|
||||
"Found heuristic solution: objective 374043.64040\n",
|
||||
"Presolved: 237 rows, 227 columns, 725 nonzeros\n",
|
||||
"Variable types: 114 continuous, 113 integer (113 binary)\n",
|
||||
"Found heuristic solution: objective 475243.89360\n",
|
||||
"\n",
|
||||
"Root relaxation: objective 3.361348e+05, 142 iterations, 0.00 seconds (0.00 work units)\n",
|
||||
"Root relaxation: objective 3.361348e+05, 96 iterations, 0.00 seconds (0.00 work units)\n",
|
||||
"\n",
|
||||
" Nodes | Current Node | Objective Bounds | Work\n",
|
||||
" Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time\n",
|
||||
"\n",
|
||||
" 0 0 336134.820 0 18 374043.640 336134.820 10.1% - 0s\n",
|
||||
"H 0 0 368600.14450 336134.820 8.81% - 0s\n",
|
||||
"H 0 0 364721.76610 336134.820 7.84% - 0s\n",
|
||||
" 0 0 cutoff 0 364721.766 364721.766 0.00% - 0s\n",
|
||||
" 0 0 336134.820 0 18 475243.894 336134.820 29.3% - 0s\n",
|
||||
"H 0 0 471441.37480 336134.820 28.7% - 0s\n",
|
||||
"H 0 0 410679.27820 336134.820 18.2% - 0s\n",
|
||||
"H 0 0 391706.31610 336134.820 14.2% - 0s\n",
|
||||
"H 0 0 374515.31390 336134.820 10.2% - 0s\n",
|
||||
"H 0 0 369369.87450 336134.820 9.00% - 0s\n",
|
||||
"H 0 0 368600.14450 344055.048 6.66% - 0s\n",
|
||||
"H 0 0 368180.65796 364657.488 0.96% - 0s\n",
|
||||
"H 0 0 364721.76610 364657.488 0.02% - 0s\n",
|
||||
" 0 0 364721.766 0 6 364721.766 364721.766 0.00% - 0s\n",
|
||||
"\n",
|
||||
"Cutting planes:\n",
|
||||
" Gomory: 3\n",
|
||||
" Cover: 8\n",
|
||||
" Implied bound: 29\n",
|
||||
" Clique: 222\n",
|
||||
" MIR: 7\n",
|
||||
" Flow cover: 7\n",
|
||||
" RLT: 1\n",
|
||||
" Relax-and-lift: 7\n",
|
||||
" Gomory: 2\n",
|
||||
" Cover: 7\n",
|
||||
" Implied bound: 1\n",
|
||||
" Clique: 19\n",
|
||||
" MIR: 3\n",
|
||||
" RLT: 10\n",
|
||||
" Relax-and-lift: 1\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (234 simplex iterations) in 0.02 seconds (0.02 work units)\n",
|
||||
"Explored 1 nodes (181 simplex iterations) in 0.03 seconds (0.01 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
"\n",
|
||||
"Solution count 5: 364722 368600 374044 ... 440662\n",
|
||||
"Solution count 7: 364722 368600 374515 ... 475244\n",
|
||||
"\n",
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 3.647217661000e+05, best bound 3.647217661000e+05, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 677, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 815, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1511,7 +1524,7 @@
|
||||
"weights[0] [37.45 95.07 73.2 59.87 15.6 15.6 5.81 86.62 60.11 70.81]\n",
|
||||
"weights[1] [ 2.06 96.99 83.24 21.23 18.18 18.34 30.42 52.48 43.19 29.12]\n",
|
||||
"\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -1530,12 +1543,12 @@
|
||||
"Presolved: 8 rows, 8 columns, 19 nonzeros\n",
|
||||
"Variable types: 0 continuous, 8 integer (8 binary)\n",
|
||||
"\n",
|
||||
"Root relaxation: objective 2.995750e+02, 8 iterations, 0.00 seconds (0.00 work units)\n",
|
||||
"Root relaxation: cutoff, 8 iterations, 0.00 seconds (0.00 work units)\n",
|
||||
"\n",
|
||||
" Nodes | Current Node | Objective Bounds | Work\n",
|
||||
" Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time\n",
|
||||
"\n",
|
||||
" 0 0 infeasible 0 301.00000 301.00000 0.00% - 0s\n",
|
||||
" 0 0 cutoff 0 301.00000 301.00000 0.00% - 0s\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (8 simplex iterations) in 0.01 seconds (0.00 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
@@ -1545,7 +1558,7 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 3.010000000000e+02, best bound 3.010000000000e+02, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 326, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 333, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Restricted license - for non-production use only - expires 2024-10-28\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Restricted license - for non-production use only - expires 2026-11-23\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
@@ -90,17 +90,21 @@
|
||||
" 0 6.3600000e+02 1.700000e+01 0.000000e+00 0s\n",
|
||||
" 15 2.7610000e+03 0.000000e+00 0.000000e+00 0s\n",
|
||||
"\n",
|
||||
"Solved in 15 iterations and 0.00 seconds (0.00 work units)\n",
|
||||
"Solved in 15 iterations and 0.01 seconds (0.00 work units)\n",
|
||||
"Optimal objective 2.761000000e+03\n",
|
||||
"\n",
|
||||
"User-callback calls 56, time in user-callback 0.00 sec\n",
|
||||
"Set parameter PreCrush to value 1\n",
|
||||
"Set parameter LazyConstraints to value 1\n",
|
||||
"Gurobi Optimizer version 10.0.3 build v10.0.3rc0 (linux64)\n",
|
||||
"Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (linux64 - \"Ubuntu 22.04.4 LTS\")\n",
|
||||
"\n",
|
||||
"CPU model: 13th Gen Intel(R) Core(TM) i7-13800H, instruction set [SSE2|AVX|AVX2]\n",
|
||||
"Thread count: 10 physical cores, 20 logical processors, using up to 20 threads\n",
|
||||
"\n",
|
||||
"Non-default parameters:\n",
|
||||
"PreCrush 1\n",
|
||||
"LazyConstraints 1\n",
|
||||
"\n",
|
||||
"Optimize a model with 10 rows, 45 columns and 90 nonzeros\n",
|
||||
"Model fingerprint: 0x74ca3d0a\n",
|
||||
"Variable types: 0 continuous, 45 integer (45 binary)\n",
|
||||
@@ -123,12 +127,11 @@
|
||||
" Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time\n",
|
||||
"\n",
|
||||
" 0 0 2761.00000 0 - 2796.00000 2761.00000 1.25% - 0s\n",
|
||||
" 0 0 cutoff 0 2796.00000 2796.00000 0.00% - 0s\n",
|
||||
"\n",
|
||||
"Cutting planes:\n",
|
||||
" Lazy constraints: 3\n",
|
||||
"\n",
|
||||
"Explored 1 nodes (16 simplex iterations) in 0.01 seconds (0.00 work units)\n",
|
||||
"Explored 1 nodes (14 simplex iterations) in 0.01 seconds (0.00 work units)\n",
|
||||
"Thread count was 20 (of 20 available processors)\n",
|
||||
"\n",
|
||||
"Solution count 1: 2796 \n",
|
||||
@@ -136,18 +139,8 @@
|
||||
"Optimal solution found (tolerance 1.00e-04)\n",
|
||||
"Best objective 2.796000000000e+03, best bound 2.796000000000e+03, gap 0.0000%\n",
|
||||
"\n",
|
||||
"User-callback calls 110, time in user-callback 0.00 sec\n"
|
||||
"User-callback calls 114, time in user-callback 0.00 sec\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'WS: Count': 1, 'WS: Number of variables set': 41.0}"
|
||||
]
|
||||
},
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
@@ -215,7 +208,7 @@
|
||||
"solver.fit(train_data)\n",
|
||||
"\n",
|
||||
"# Solve a test instance\n",
|
||||
"solver.optimize(test_data[0], build_tsp_model_gurobipy)"
|
||||
"solver.optimize(test_data[0], build_tsp_model_gurobipy);"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user