{ "cells": [ { "cell_type": "markdown", "id": "8e71e7e0-8638-4add-bf9d-1808d9d9d833", "metadata": {}, "source": [ "# 3.6.2 Cazzaro and Pisinger 2022 G-140 and G-210" ] }, { "cell_type": "markdown", "id": "bc641f38-1c40-456b-baef-a3478b16674a", "metadata": {}, "source": [ "This is used in the paper **Flexible cable routing framework for wind farm collection system optimization**." ] }, { "cell_type": "code", "execution_count": 1, "id": "46319630-c621-42bb-9ffe-8fde346193ff", "metadata": {}, "outputs": [], "source": [ "import dill\n", "from importlib.resources import files" ] }, { "cell_type": "code", "execution_count": 2, "id": "e42e55fa-eb49-4d5f-bbad-6fd028f7333b", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.interarraylib import G_from_S\n", "from optiwindnet.svg import svgplot\n", "from optiwindnet.mesh import make_planar_embedding\n", "from optiwindnet.baselines.hgs import hgs_multiroot\n", "from optiwindnet.importer import L_from_yaml\n", "from optiwindnet.pathfinding import PathFinder\n", "from optiwindnet.MILP import solver_factory, ModelOptions\n", "from optiwindnet.interarraylib import as_normalized" ] }, { "cell_type": "markdown", "id": "b8a8162a-95bc-4e17-90ba-fb805126f692", "metadata": {}, "source": [ "## Reference solutions" ] }, { "cell_type": "markdown", "id": "fcfa5745-a619-49d9-9308-adfcb07e5af8", "metadata": {}, "source": [ "Cazzaro, D., & Pisinger, D. (2022). Balanced cable routing for offshore wind farms with obstacles. Networks, 80(4), 386–406. https://doi.org/10.1002/net.22100" ] }, { "cell_type": "code", "execution_count": 3, "id": "68392d31-8ead-40bc-848d-d6d1e258bfb0", "metadata": {}, "outputs": [], "source": [ "G140_ref = dill.load(open('data/cazzaro_2022G_140_paper_routeset.dill', 'rb'))" ] }, { "cell_type": "code", "execution_count": 4, "id": "dda90fc7-4dbf-4950-a462-2602208532f7", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 241673.0 m(+0) α: 8, β: 8, γ: 8κ = 6, T = 140" ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G140_ref)" ] }, { "cell_type": "code", "execution_count": 5, "id": "6bcadb4b-859c-4cda-810e-e45418f2cda2", "metadata": {}, "outputs": [], "source": [ "G210_ref = dill.load(open('data/cazzaro_2022G_210_paper_routeset.dill', 'rb'))" ] }, { "cell_type": "code", "execution_count": 6, "id": "7c31b0e3-4ccb-4358-8288-2ceff0fe21b1", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 301477.0 m(+0) α: 10, β: 10, γ: 10κ = 7, T = 210" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G210_ref)" ] }, { "cell_type": "markdown", "id": "2a51d282-1794-4ddc-9b92-8e68cf5b2bef", "metadata": {}, "source": [ "## Start here" ] }, { "cell_type": "markdown", "id": "100251e0-47e1-416d-beb9-4a114fd59a38", "metadata": {}, "source": [ "## Instantiate solver" ] }, { "cell_type": "code", "execution_count": 7, "id": "107be1c5-8b44-4587-b27e-9029af334e8a", "metadata": {}, "outputs": [], "source": [ "solver = solver_factory('gurobi')" ] }, { "cell_type": "markdown", "id": "5df153e7-d83e-45e0-b62a-59da6db94ffc", "metadata": {}, "source": [ "## G-140, κ = 6" ] }, { "cell_type": "code", "execution_count": 56, "id": "c282d7c0-7f50-423f-9e4e-a69d13518d04", "metadata": {}, "outputs": [], "source": [ "L140 = L_from_yaml(files('optiwindnet.data') / 'Cazzaro-2022G-140.yaml')" ] }, { "cell_type": "code", "execution_count": 57, "id": "bc633875-a777-42a1-8130-d6931eef88d1", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 57, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(L140)" ] }, { "cell_type": "code", "execution_count": 58, "id": "91bf5be2-adb5-4bd9-9b5e-a06eb2b26157", "metadata": {}, "outputs": [], "source": [ "P, A = make_planar_embedding(L140)\n", "A_norm = as_normalized(A)" ] }, { "cell_type": "code", "execution_count": 59, "id": "3cb92ab8-92df-4d1f-b6fa-91d6ba61c965", "metadata": {}, "outputs": [], "source": [ "Sʹ = hgs_multiroot(A_norm, capacity=6, time_limit=0.5, balanced=True)" ] }, { "cell_type": "code", "execution_count": 60, "id": "ef00a57c-32e1-4b92-b094-3b0504246948", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0.41, 0.04, 0.22)" ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Sʹ.graph['solution_time']" ] }, { "cell_type": "code", "execution_count": 61, "id": "f9a5ef9e-af93-45d1-b281-b42307cad9bc", "metadata": {}, "outputs": [], "source": [ "Gʹ = G_from_S(Sʹ, A)" ] }, { "cell_type": "code", "execution_count": 62, "id": "1e8dc8f1-2b67-4e3c-bdbc-886cc33d7c99", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 243298.0 m(+0) α: 8, β: 7, γ: 9κ = 6, T = 140" ], "text/plain": [ "" ] }, "execution_count": 62, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Gʹ)" ] }, { "cell_type": "code", "execution_count": 63, "id": "ca8478f6-4104-4478-ac6e-8fd633dc63ae", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[[6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6], [5, 5, 5, 6, 6, 6, 5, 6]]" ] }, "execution_count": 63, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[[Sʹ[r][n]['load'] for n in Sʹ[r]] for r in range(-3, 0)]" ] }, { "cell_type": "code", "execution_count": 64, "id": "d0502663-e022-4ce2-8756-5b8994534ca7", "metadata": {}, "outputs": [], "source": [ "Hʹ = PathFinder(Gʹ, planar=P, A=A, branched=False).create_detours()" ] }, { "cell_type": "code", "execution_count": 65, "id": "80b16543-48d7-4dce-a157-2ea147683953", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 245110.0 m(+0) α: 9, β: 8, γ: 7κ = 6, T = 140" ], "text/plain": [ "" ] }, "execution_count": 65, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Hʹ)" ] }, { "cell_type": "code", "execution_count": 66, "id": "a2be37cb-4c3c-4ab7-afd7-17cc617d1b34", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01422305639439081" ] }, "execution_count": 66, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Hʹ.size(weight='length')/G140_ref.size(weight='length') - 1" ] }, { "cell_type": "code", "execution_count": 67, "id": "1d961d96-a63c-43c4-a283-78e40b6e8d66", "metadata": {}, "outputs": [], "source": [ "solver.set_problem(\n", " P, A,\n", " capacity=Sʹ.graph['capacity'],\n", " model_options=ModelOptions(\n", " topology=\"radial\",\n", " feeder_route=\"segmented\",\n", " feeder_limit=\"minimum\",\n", " balanced=True,\n", " ),\n", " warmstart=Sʹ,\n", ")" ] }, { "cell_type": "code", "execution_count": 68, "id": "157a3ab4-d1c3-42de-b912-37fb886e099f", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set parameter OutputFlag to value 1\n", "Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (win64 - Windows 11.0 (26100.2))\n", "\n", "CPU model: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz, instruction set [SSE2|AVX|AVX2|AVX512]\n", "Thread count: 8 physical cores, 16 logical processors, using up to 16 threads\n", "\n", "Non-default parameters:\n", "TimeLimit 10\n", "MIPGap 0.005\n", "MIPFocus 1\n", "RINS 100\n", "VarBranch 1\n", "CutPasses 4\n", "\n", "Academic license 937681 - for non-commercial use only - registered to ma___@dtu.dk\n", "Optimize a model with 5480 rows, 3388 columns and 21198 nonzeros\n", "Model fingerprint: 0x96a337c4\n", "Variable types: 0 continuous, 3388 integer (1694 binary)\n", "Coefficient statistics:\n", " Matrix range [1e+00, 6e+00]\n", " Objective range [4e+02, 2e+04]\n", " Bounds range [1e+00, 6e+00]\n", " RHS range [1e+00, 1e+02]\n", "\n", "Loaded user MIP start with objective 243298\n", "\n", "Presolve removed 967 rows and 0 columns\n", "Presolve time: 0.02s\n", "Presolved: 4513 rows, 3388 columns, 18426 nonzeros\n", "Variable types: 0 continuous, 3388 integer (1694 binary)\n", "\n", "Root relaxation: objective 2.199122e+05, 4317 iterations, 0.09 seconds (0.12 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 219912.178 0 310 243297.969 219912.178 9.61% - 0s\n", "H 0 0 242528.61779 219912.178 9.33% - 0s\n", " 0 0 223896.916 0 516 242528.618 223896.916 7.68% - 0s\n", " 0 0 224016.460 0 514 242528.618 224016.460 7.63% - 0s\n", " 0 0 224021.381 0 525 242528.618 224021.381 7.63% - 0s\n", " 0 0 224023.472 0 524 242528.618 224023.472 7.63% - 0s\n", " 0 0 225407.123 0 592 242528.618 225407.123 7.06% - 0s\n", " 0 0 225602.899 0 643 242528.618 225602.899 6.98% - 0s\n", "H 0 0 242183.75078 225690.237 6.81% - 1s\n", " 0 0 225690.237 0 637 242183.751 225690.237 6.81% - 1s\n", " 0 0 225709.871 0 637 242183.751 225709.871 6.80% - 1s\n", " 0 0 225712.887 0 647 242183.751 225712.887 6.80% - 1s\n", " 0 0 225714.300 0 644 242183.751 225714.300 6.80% - 1s\n", " 0 0 225714.354 0 646 242183.751 225714.354 6.80% - 1s\n", "H 0 0 241615.53053 226471.157 6.27% - 1s\n", " 0 0 226471.157 0 655 241615.531 226471.157 6.27% - 1s\n", "H 0 0 241364.12069 226471.157 6.17% - 1s\n", " 0 0 226635.955 0 659 241364.121 226635.955 6.10% - 1s\n", " 0 0 226709.998 0 635 241364.121 226709.998 6.07% - 1s\n", " 0 0 226715.282 0 639 241364.121 226715.282 6.07% - 1s\n", " 0 0 226715.824 0 645 241364.121 226715.824 6.07% - 1s\n", " 0 0 227040.537 0 656 241364.121 227040.537 5.93% - 2s\n", "H 0 0 241189.12632 227040.999 5.87% - 3s\n", "H 0 0 238512.20561 227040.999 4.81% - 3s\n", "H 0 0 238186.72680 227040.999 4.68% - 3s\n", "H 0 0 237756.27923 227040.999 4.51% - 3s\n", " 0 2 227040.999 0 656 237756.279 227040.999 4.51% - 3s\n", "H 52 54 237590.81979 227256.387 4.35% 195 4s\n", "H 80 89 237571.79303 227256.387 4.34% 166 4s\n", " 112 121 227653.474 17 667 237571.793 227256.387 4.34% 163 5s\n", "H 120 129 237015.37629 227256.387 4.12% 161 5s\n", "H 147 156 236660.42833 227256.387 3.97% 165 5s\n", "H 241 244 236637.08564 227256.387 3.96% 168 6s\n", " 604 561 228174.031 13 575 236637.086 227336.507 3.93% 142 10s\n", "\n", "Cutting planes:\n", " Gomory: 34\n", " Cover: 4\n", " Implied bound: 3\n", " MIR: 260\n", " StrongCG: 10\n", " Flow cover: 81\n", " Flow path: 11\n", " GUB cover: 5\n", " Zero half: 3\n", " Mod-K: 1\n", " Network: 40\n", " RLT: 8\n", " Relax-and-lift: 8\n", "\n", "Explored 629 nodes (98453 simplex iterations) in 10.04 seconds (10.12 work units)\n", "Thread count was 16 (of 16 available processors)\n", "\n", "Solution count 10: 236637 236660 237015 ... 241364\n", "\n", "Time limit reached\n", "Best objective 2.366370856382e+05, best bound 2.273365073120e+05, gap 3.9303%\n", "WARNING: Loading a SolverResults object with an 'aborted' status, but\n", "containing a solution\n" ] }, { "data": { "text/plain": [ "SolutionInfo(runtime=10.043999910354614, bound=227336.5073120126, objective=236637.0856382203, relgap=0.03930313078832781, termination='maxTimeLimit')" ] }, "execution_count": 68, "metadata": {}, "output_type": "execute_result" } ], "source": [ "solver.solve(\n", " mip_gap=0.005,\n", " time_limit=10,\n", " verbose=True,\n", " options=dict(\n", " mipfocus=1,\n", " RINS=100,\n", " CutPasses=4,\n", " VarBranch=1,\n", " ),\n", ")" ] }, { "cell_type": "code", "execution_count": 69, "id": "b9a78173-dda1-42f2-8b2f-fe972c904f59", "metadata": {}, "outputs": [], "source": [ "S140, G140 = solver.get_solution()" ] }, { "cell_type": "code", "execution_count": 70, "id": "18213448-31c0-4341-adde-66260b545489", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[[6, 6, 6, 6, 6, 6, 6, 5, 6, 6], [6, 6, 6, 5, 5, 6], [5, 6, 6, 6, 6, 6, 6, 6]]" ] }, "execution_count": 70, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[[G140[r][n]['load'] for n in G140[r]] for r in range(-3, 0)]" ] }, { "cell_type": "code", "execution_count": 71, "id": "5b42e18a-ac45-4692-b899-407cd69ef788", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.020828468287038326" ] }, "execution_count": 71, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1 - G140.size(weight='length')/G140_ref.size(weight='length')" ] }, { "cell_type": "code", "execution_count": 72, "id": "e0673ae5-ac08-4941-b8ce-bb5fe1cade68", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 236639.0 m(+0) α: 8, β: 6, γ: 10κ = 6, T = 140" ], "text/plain": [ "" ] }, "execution_count": 72, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G140)" ] }, { "cell_type": "code", "execution_count": 73, "id": "9507b531-cba5-46b8-b5b4-5bf444c3bd94", "metadata": {}, "outputs": [], "source": [ "with open('cazzaro_2022G_140_κ_6_radial_balanced_our.dill', 'wb') as outfile:\n", " dill.dump(G140, outfile)" ] }, { "cell_type": "markdown", "id": "aebcb530-ebfd-4d66-abea-6d5c15de2548", "metadata": {}, "source": [ "## G-210, κ = 7" ] }, { "cell_type": "code", "execution_count": 38, "id": "52ce008f-3144-4566-8665-99b3bdc1ef46", "metadata": {}, "outputs": [], "source": [ "L210 = L_from_yaml(files('optiwindnet.data') / 'Cazzaro-2022G-210.yaml')" ] }, { "cell_type": "code", "execution_count": 39, "id": "a3e74356-811c-4da6-9465-4582c81f8735", "metadata": { "scrolled": true }, "outputs": [], "source": [ "P, A = make_planar_embedding(L210)\n", "A_norm = as_normalized(A)" ] }, { "cell_type": "code", "execution_count": 40, "id": "957bbc2b-914f-4f58-b8cd-50b8ca32b2a2", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(L210)" ] }, { "cell_type": "code", "execution_count": 41, "id": "58f1096d-d004-4c00-8ef5-b5f1bc04dba0", "metadata": {}, "outputs": [], "source": [ "Sʹ = hgs_multiroot(A_norm, capacity=7, time_limit=1)" ] }, { "cell_type": "code", "execution_count": 42, "id": "4656d9cb-4dd4-431d-8408-9fd60fad372a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0.35, 0.26, 0.33)" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Sʹ.graph['solution_time']" ] }, { "cell_type": "code", "execution_count": 43, "id": "dc4eb98b-396c-480b-9f26-bd7953ffbc4f", "metadata": {}, "outputs": [], "source": [ "Gʹ = G_from_S(Sʹ, A)" ] }, { "cell_type": "code", "execution_count": 44, "id": "5db4e247-12fa-4430-8980-20e666bdfbbb", "metadata": {}, "outputs": [], "source": [ "Hʹ = PathFinder(Gʹ, planar=P, A=A, branched=False).create_detours()" ] }, { "cell_type": "code", "execution_count": 45, "id": "60b6cf36-55ef-47ad-9b6a-f5820bc3119c", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 296904.0 m(+0) α: 10, β: 9, γ: 11κ = 7, T = 210" ], "text/plain": [ "" ] }, "execution_count": 45, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Hʹ)" ] }, { "cell_type": "code", "execution_count": 46, "id": "846930f8-9410-43b2-8612-0228d60c3925", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01517110172331404" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1- Hʹ.size(weight='length')/G210_ref.size(weight='length')" ] }, { "cell_type": "markdown", "id": "e42f9b9c-7301-4539-aea5-1e3d36e2b065", "metadata": {}, "source": [ "### Solve the balanced MILP model" ] }, { "cell_type": "markdown", "id": "7c91d1bd-24a5-4a32-bfec-d33a2c2fb526", "metadata": {}, "source": [ "#### 90 s Gurobi" ] }, { "cell_type": "code", "execution_count": 50, "id": "fae59cb7-9183-4b4a-ac33-6d608336f593", "metadata": {}, "outputs": [], "source": [ "solver.set_problem(\n", " P, A,\n", " capacity=Sʹ.graph['capacity'],\n", " model_options=ModelOptions(\n", " topology=\"radial\",\n", " feeder_route=\"segmented\",\n", " feeder_limit=\"minimum\",\n", " balanced=True,\n", " ),\n", " warmstart=Sʹ,\n", ")" ] }, { "cell_type": "code", "execution_count": 51, "id": "fde2eb59-bafa-4d9b-bd3e-01ad0662283c", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set parameter OutputFlag to value 1\n", "Gurobi Optimizer version 12.0.2 build v12.0.2rc0 (win64 - Windows 11.0 (26100.2))\n", "\n", "CPU model: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz, instruction set [SSE2|AVX|AVX2|AVX512]\n", "Thread count: 8 physical cores, 16 logical processors, using up to 16 threads\n", "\n", "Non-default parameters:\n", "TimeLimit 90\n", "MIPGap 0.005\n", "MIPFocus 1\n", "RINS 100\n", "VarBranch 1\n", "CutPasses 4\n", "\n", "Academic license 937681 - for non-commercial use only - registered to ma___@dtu.dk\n", "Optimize a model with 7924 rows, 5304 columns and 32058 nonzeros\n", "Model fingerprint: 0x68736103\n", "Variable types: 0 continuous, 5304 integer (2652 binary)\n", "Coefficient statistics:\n", " Matrix range [1e+00, 7e+00]\n", " Objective range [3e+02, 2e+04]\n", " Bounds range [1e+00, 7e+00]\n", " RHS range [1e+00, 2e+02]\n", "\n", "Loaded user MIP start with objective 296615\n", "\n", "Presolve removed 891 rows and 0 columns\n", "Presolve time: 0.09s\n", "Presolved: 7033 rows, 5304 columns, 29018 nonzeros\n", "Variable types: 0 continuous, 5304 integer (2652 binary)\n", "\n", "Root relaxation: objective 2.696831e+05, 6521 iterations, 0.21 seconds (0.23 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 269683.061 0 522 296615.310 269683.061 9.08% - 0s\n", " 0 0 274175.257 0 810 296615.310 274175.257 7.57% - 0s\n", " 0 0 274387.439 0 816 296615.310 274387.439 7.49% - 1s\n", " 0 0 274398.258 0 790 296615.310 274398.258 7.49% - 1s\n", " 0 0 274398.956 0 817 296615.310 274398.956 7.49% - 1s\n", " 0 0 274398.961 0 817 296615.310 274398.961 7.49% - 1s\n", " 0 0 275906.797 0 864 296615.310 275906.797 6.98% - 1s\n", " 0 0 276041.080 0 873 296615.310 276041.080 6.94% - 1s\n", " 0 0 276084.392 0 883 296615.310 276084.392 6.92% - 1s\n", " 0 0 276089.695 0 916 296615.310 276089.695 6.92% - 2s\n", " 0 0 276091.872 0 910 296615.310 276091.872 6.92% - 2s\n", " 0 0 276092.112 0 903 296615.310 276092.112 6.92% - 2s\n", " 0 0 276676.095 0 899 296615.310 276676.095 6.72% - 3s\n", " 0 0 276892.720 0 916 296615.310 276892.720 6.65% - 3s\n", " 0 0 276925.480 0 923 296615.310 276925.480 6.64% - 3s\n", " 0 0 276930.832 0 923 296615.310 276930.832 6.64% - 3s\n", " 0 0 276932.405 0 942 296615.310 276932.405 6.64% - 3s\n", " 0 0 276932.553 0 941 296615.310 276932.553 6.64% - 3s\n", " 0 0 277384.616 0 887 296615.310 277384.616 6.48% - 4s\n", " 0 2 277384.616 0 887 296615.310 277384.616 6.48% - 5s\n", " 165 174 278984.721 19 846 296615.310 277705.053 6.38% 183 10s\n", " 412 445 283287.283 42 766 296615.310 277705.053 6.38% 180 15s\n", "H 529 538 296545.85094 277705.053 6.35% 169 16s\n", " 926 923 294734.649 104 560 296545.851 277724.118 6.35% 145 20s\n", " 1005 1013 295184.104 111 577 296545.851 277724.118 6.35% 140 25s\n", "H 1155 1207 295517.37122 277724.118 6.02% 133 27s\n", " 1835 1856 283534.041 27 691 295517.371 277785.217 6.00% 132 30s\n", " 1973 1858 288853.542 142 522 295517.371 277785.217 6.00% 132 35s\n", " 1988 1868 283018.958 37 1049 295517.371 278764.332 5.67% 131 40s\n", " 1996 1874 279121.136 12 1139 295517.371 279121.136 5.55% 131 45s\n", " 2128 1974 280586.028 21 984 295517.371 279333.914 5.48% 153 50s\n", "H 2191 1911 295012.16221 279333.914 5.31% 157 51s\n", "H 2228 1850 294974.13520 279333.914 5.30% 160 52s\n", " 2295 1900 283737.679 31 822 294974.135 279333.914 5.30% 163 55s\n", "H 2314 1820 294760.12095 279333.914 5.23% 164 55s\n", "H 2358 1788 294759.96552 279333.914 5.23% 166 56s\n", " 2566 1910 288562.734 46 710 294759.966 279333.914 5.23% 180 60s\n", " 2847 2059 284637.848 39 826 294759.966 279333.914 5.23% 185 65s\n", " 2988 2120 285689.853 56 703 294759.966 279366.770 5.22% 188 70s\n", " 3341 2254 293006.677 103 678 294759.966 279374.393 5.22% 189 75s\n", " 3471 2296 293800.803 124 618 294759.966 279393.224 5.21% 190 80s\n", " 3675 2503 280204.404 24 942 294759.966 279393.224 5.21% 191 85s\n", " 3997 2570 284233.344 58 806 294759.966 279393.224 5.21% 193 90s\n", "\n", "Cutting planes:\n", " Gomory: 28\n", " Cover: 1\n", " Implied bound: 2\n", " MIR: 494\n", " StrongCG: 15\n", " Flow cover: 325\n", " Flow path: 2\n", " GUB cover: 2\n", " Zero half: 5\n", " Network: 19\n", " RLT: 13\n", " Relax-and-lift: 45\n", " BQP: 10\n", "\n", "Explored 4005 nodes (785596 simplex iterations) in 90.06 seconds (104.80 work units)\n", "Thread count was 16 (of 16 available processors)\n", "\n", "Solution count 7: 294760 294760 294974 ... 296615\n", "\n", "Time limit reached\n", "Best objective 2.947599655209e+05, best bound 2.793932237341e+05, gap 5.2133%\n", "WARNING: Loading a SolverResults object with an 'aborted' status, but\n", "containing a solution\n" ] }, { "data": { "text/plain": [ "SolutionInfo(runtime=90.0609998703003, bound=279393.2237340622, objective=294759.96552093467, relgap=0.05213306956293917, termination='maxTimeLimit')" ] }, "execution_count": 51, "metadata": {}, "output_type": "execute_result" } ], "source": [ "solver.solve(\n", " mip_gap=0.005,\n", " time_limit=90,\n", " verbose=True,\n", " options=dict(\n", " mipfocus=1,\n", " RINS=100,\n", " CutPasses=4,\n", " VarBranch=1,\n", " ),\n", ")" ] }, { "cell_type": "code", "execution_count": 52, "id": "d895c73a-1f67-41e6-9dd4-a9f509e26424", "metadata": {}, "outputs": [], "source": [ "S210, G210 = solver.get_solution()" ] }, { "cell_type": "code", "execution_count": 53, "id": "4a3665bc-79be-4169-b66b-edbdcd5a6be3", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 295026.0 m(+0) α: 10, β: 8, γ: 12κ = 7, T = 210" ], "text/plain": [ "" ] }, "execution_count": 53, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G210)" ] }, { "cell_type": "code", "execution_count": 54, "id": "0b6c5ab8-41d8-4707-a940-32312f247e40", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.02139847724499233" ] }, "execution_count": 54, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1 - G210.size(weight='length')/G210_ref.size(weight='length')" ] }, { "cell_type": "code", "execution_count": 55, "id": "d6c9bdc2-1775-40c9-97f0-e842a2c390e1", "metadata": {}, "outputs": [], "source": [ "with open('cazzaro_2022G_210_κ_7_radial_balanced_our.dill', 'wb') as outfile:\n", " dill.dump(G210, outfile)" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }