{ "cells": [ { "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": 23, "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": 24, "id": "bc633875-a777-42a1-8130-d6931eef88d1", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(L140)" ] }, { "cell_type": "code", "execution_count": 25, "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": 26, "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": 27, "id": "ef00a57c-32e1-4b92-b094-3b0504246948", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0.25, 0.04, 0.06)" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Sʹ.graph['solution_time']" ] }, { "cell_type": "code", "execution_count": 28, "id": "f9a5ef9e-af93-45d1-b281-b42307cad9bc", "metadata": {}, "outputs": [], "source": [ "Gʹ = G_from_S(Sʹ, A)" ] }, { "cell_type": "code", "execution_count": 29, "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": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Gʹ)" ] }, { "cell_type": "code", "execution_count": 30, "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": 30, "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": 31, "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": 32, "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": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Hʹ)" ] }, { "cell_type": "code", "execution_count": 33, "id": "a2be37cb-4c3c-4ab7-afd7-17cc617d1b34", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01422305639439081" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Hʹ.size(weight='length')/G140_ref.size(weight='length') - 1" ] }, { "cell_type": "code", "execution_count": 34, "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": 35, "id": "b822a82a-d029-4450-8e25-7b54605503e4", "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": 36, "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.3 build v12.0.3rc0 (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 5387 rows, 3324 columns and 20784 nonzeros\n", "Model fingerprint: 0xb9f7ec7f\n", "Variable types: 0 continuous, 3324 integer (1662 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 951 rows and 0 columns\n", "Presolve time: 0.03s\n", "Presolved: 4436 rows, 3324 columns, 18044 nonzeros\n", "Variable types: 0 continuous, 3324 integer (1662 binary)\n", "\n", "Root relaxation: objective 2.199121e+05, 4222 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.125 0 303 243297.915 219912.125 9.61% - 0s\n", "H 0 0 242528.56393 219912.125 9.33% - 0s\n", " 0 0 223993.254 0 506 242528.564 223993.254 7.64% - 0s\n", " 0 0 224084.717 0 519 242528.564 224084.717 7.60% - 0s\n", " 0 0 224095.074 0 525 242528.564 224095.074 7.60% - 0s\n", " 0 0 224096.578 0 528 242528.564 224096.578 7.60% - 0s\n", " 0 0 224096.617 0 515 242528.564 224096.617 7.60% - 0s\n", "H 0 0 241364.06683 224096.617 7.15% - 0s\n", " 0 0 225370.560 0 550 241364.067 225370.560 6.63% - 0s\n", " 0 0 225565.142 0 604 241364.067 225565.142 6.55% - 0s\n", " 0 0 225615.031 0 587 241364.067 225615.031 6.53% - 0s\n", " 0 0 225617.987 0 583 241364.067 225617.987 6.52% - 0s\n", " 0 0 225618.643 0 580 241364.067 225618.643 6.52% - 0s\n", " 0 0 225618.746 0 594 241364.067 225618.746 6.52% - 0s\n", "H 0 0 241021.97105 225618.746 6.39% - 1s\n", "H 0 0 239068.72253 225618.746 5.63% - 1s\n", " 0 0 226405.872 0 646 239068.723 226405.872 5.30% - 1s\n", "H 0 0 238724.85414 226405.872 5.16% - 1s\n", " 0 0 226578.755 0 659 238724.854 226578.755 5.09% - 1s\n", " 0 0 226623.664 0 657 238724.854 226623.664 5.07% - 1s\n", " 0 0 226628.548 0 655 238724.854 226628.548 5.07% - 1s\n", " 0 0 226630.495 0 666 238724.854 226630.495 5.07% - 1s\n", " 0 0 226630.629 0 666 238724.854 226630.629 5.07% - 1s\n", " 0 0 227010.487 0 646 238724.854 227010.487 4.91% - 2s\n", " 0 2 227010.678 0 646 238724.854 227010.678 4.91% - 3s\n", "H 1 4 238048.94350 227010.973 4.64% 116 3s\n", "H 27 33 237982.78645 227175.192 4.54% 275 3s\n", "H 44 52 237795.06576 227175.192 4.47% 229 4s\n", " 94 107 227623.758 13 644 237795.066 227175.192 4.47% 195 5s\n", "H 124 133 237725.29284 227175.192 4.44% 202 5s\n", "H 232 241 237544.57690 227175.192 4.37% 175 6s\n", "H 318 322 237520.99301 227175.192 4.36% 172 7s\n", "H 381 403 237501.96625 227175.192 4.35% 164 7s\n", "H 398 403 237015.32242 227175.192 4.15% 162 7s\n", "H 406 408 236637.03177 227175.192 4.00% 161 8s\n", "H 485 444 236462.08620 227175.192 3.93% 156 8s\n", "H 548 493 236406.97459 227175.192 3.91% 158 9s\n", "H 551 493 236375.56172 227175.192 3.89% 157 9s\n", " 579 521 235210.933 56 447 236375.562 227204.064 3.88% 158 10s\n", "\n", "Cutting planes:\n", " Gomory: 33\n", " Cover: 3\n", " Implied bound: 6\n", " MIR: 286\n", " StrongCG: 7\n", " Flow cover: 86\n", " Flow path: 12\n", " GUB cover: 4\n", " Zero half: 4\n", " Network: 44\n", " RLT: 8\n", " Relax-and-lift: 3\n", "\n", "Explored 587 nodes (100683 simplex iterations) in 10.04 seconds (11.15 work units)\n", "Thread count was 16 (of 16 available processors)\n", "\n", "Solution count 10: 236376 236407 236462 ... 237795\n", "\n", "Time limit reached\n", "Best objective 2.363755617238e+05, best bound 2.272041605162e+05, gap 3.8800%\n", "WARNING: Loading a SolverResults object with an 'aborted' status, but\n", "containing a solution\n" ] }, { "data": { "text/plain": [ "SolutionInfo(runtime=10.044999837875366, bound=227204.1605161552, objective=236375.5617237814, relgap=0.038800124432252, termination='maxTimeLimit')" ] }, "execution_count": 36, "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": 37, "id": "b9a78173-dda1-42f2-8b2f-fe972c904f59", "metadata": {}, "outputs": [], "source": [ "S140, G140 = solver.get_solution()" ] }, { "cell_type": "code", "execution_count": 38, "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": 38, "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": 39, "id": "5b42e18a-ac45-4692-b899-407cd69ef788", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.020828468287038326" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1 - G140.size(weight='length')/G140_ref.size(weight='length')" ] }, { "cell_type": "code", "execution_count": 40, "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": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G140)" ] }, { "cell_type": "code", "execution_count": 41, "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": 8, "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": 9, "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": 10, "id": "957bbc2b-914f-4f58-b8cd-50b8ca32b2a2", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(L210)" ] }, { "cell_type": "code", "execution_count": 11, "id": "58f1096d-d004-4c00-8ef5-b5f1bc04dba0", "metadata": {}, "outputs": [], "source": [ "Sʹ = hgs_multiroot(A_norm, capacity=7, time_limit=0.5)" ] }, { "cell_type": "code", "execution_count": 12, "id": "4656d9cb-4dd4-431d-8408-9fd60fad372a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0.36, 0.29, 0.35)" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Sʹ.graph['solution_time']" ] }, { "cell_type": "code", "execution_count": 13, "id": "dc4eb98b-396c-480b-9f26-bd7953ffbc4f", "metadata": {}, "outputs": [], "source": [ "Gʹ = G_from_S(Sʹ, A)" ] }, { "cell_type": "code", "execution_count": 14, "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": 15, "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": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(Hʹ)" ] }, { "cell_type": "code", "execution_count": 16, "id": "846930f8-9410-43b2-8612-0228d60c3925", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01517110172331404" ] }, "execution_count": 16, "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": 17, "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": 18, "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.3 build v12.0.3rc0 (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 7781 rows, 5208 columns and 31424 nonzeros\n", "Model fingerprint: 0xc1a9e0ab\n", "Variable types: 0 continuous, 5208 integer (2604 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 863 rows and 0 columns\n", "Presolve time: 0.04s\n", "Presolved: 6918 rows, 5208 columns, 28440 nonzeros\n", "Variable types: 0 continuous, 5208 integer (2604 binary)\n", "\n", "Root relaxation: objective 2.696831e+05, 6139 iterations, 0.18 seconds (0.22 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 274087.161 0 805 296615.310 274087.161 7.60% - 0s\n", " 0 0 274277.712 0 803 296615.310 274277.712 7.53% - 0s\n", " 0 0 274284.710 0 809 296615.310 274284.710 7.53% - 0s\n", " 0 0 274285.474 0 815 296615.310 274285.474 7.53% - 0s\n", " 0 0 274285.481 0 816 296615.310 274285.481 7.53% - 0s\n", " 0 0 275691.998 0 835 296615.310 275691.998 7.05% - 1s\n", " 0 0 275886.525 0 894 296615.310 275886.525 6.99% - 1s\n", " 0 0 275932.314 0 890 296615.310 275932.314 6.97% - 1s\n", " 0 0 275933.479 0 902 296615.310 275933.479 6.97% - 1s\n", " 0 0 275935.879 0 904 296615.310 275935.879 6.97% - 1s\n", " 0 0 275935.984 0 906 296615.310 275935.984 6.97% - 1s\n", " 0 0 276570.974 0 956 296615.310 276570.974 6.76% - 2s\n", " 0 0 276728.565 0 951 296615.310 276728.565 6.70% - 2s\n", " 0 0 276765.275 0 964 296615.310 276765.275 6.69% - 2s\n", " 0 0 276776.615 0 970 296615.310 276776.615 6.69% - 2s\n", " 0 0 276778.102 0 965 296615.310 276778.102 6.69% - 2s\n", " 0 0 276778.384 0 964 296615.310 276778.384 6.69% - 2s\n", " 0 0 277216.062 0 997 296615.310 277216.062 6.54% - 3s\n", " 0 2 277216.062 0 997 296615.310 277216.062 6.54% - 4s\n", " 3 8 277419.281 2 987 296615.310 277232.637 6.53% 269 5s\n", " 225 236 279419.543 19 829 296615.310 277512.867 6.44% 188 10s\n", "H 310 318 296468.36423 277512.867 6.39% 184 12s\n", "H 365 375 296451.16816 277512.867 6.39% 182 12s\n", " 537 558 283321.195 35 730 296451.168 277512.867 6.39% 166 15s\n", "H 556 558 295890.54091 277512.867 6.21% 163 15s\n", "H 713 715 295715.35272 277531.088 6.15% 149 16s\n", "H 841 840 295640.25910 277531.088 6.13% 142 17s\n", " 1101 1143 292691.608 97 575 295640.259 277531.088 6.13% 133 20s\n", " 1544 1472 282925.814 42 997 295640.259 277531.088 6.13% 133 25s\n", " 1554 1479 278730.052 11 1099 295640.259 278159.027 5.91% 132 30s\n", " 1573 1492 279334.519 17 522 295640.259 279334.519 5.52% 142 36s\n", " 1588 1502 292077.093 72 1094 295640.259 279430.626 5.48% 141 40s\n", " 1598 1514 279576.495 24 1073 295640.259 279535.653 5.45% 150 45s\n", " 1809 1663 281195.474 40 920 295640.259 279623.625 5.42% 165 50s\n", " 1996 1791 284879.411 53 763 295640.259 279623.625 5.42% 174 55s\n", " 2119 1862 287529.114 61 736 295640.259 279623.625 5.42% 175 60s\n", "H 2317 1912 294602.63748 279623.625 5.08% 176 64s\n", " 2415 1977 288849.354 70 675 294602.637 279623.625 5.08% 176 65s\n", " 2772 2122 279881.900 30 954 294602.637 279645.050 5.08% 172 70s\n", "H 2849 2046 294442.28087 279655.211 5.02% 174 72s\n", " 2894 2080 280290.797 37 930 294442.281 279655.211 5.02% 173 75s\n", "H 2924 2005 294222.20524 279655.211 4.95% 173 76s\n", " 3054 2070 281748.152 50 900 294222.205 279655.211 4.95% 174 80s\n", "H 3133 2101 293936.54134 279655.211 4.86% 175 83s\n", " 3336 2177 285167.561 61 773 293936.541 279655.211 4.86% 175 85s\n", " 3376 2199 287845.909 68 739 293936.541 279655.211 4.86% 176 90s\n", "\n", "Cutting planes:\n", " Gomory: 19\n", " Cover: 3\n", " Implied bound: 1\n", " Clique: 2\n", " MIR: 397\n", " StrongCG: 11\n", " Flow cover: 259\n", " Flow path: 4\n", " Zero half: 5\n", " Network: 12\n", " RLT: 11\n", " Relax-and-lift: 40\n", " BQP: 11\n", "\n", "Explored 3384 nodes (605488 simplex iterations) in 90.05 seconds (114.55 work units)\n", "Thread count was 16 (of 16 available processors)\n", "\n", "Solution count 10: 293937 294222 294442 ... 296615\n", "\n", "Time limit reached\n", "Best objective 2.939365413391e+05, best bound 2.796552111162e+05, gap 4.8586%\n", "WARNING: Loading a SolverResults object with an 'aborted' status, but\n", "containing a solution\n" ] }, { "data": { "text/plain": [ "SolutionInfo(runtime=90.06900000572205, bound=279655.2111162467, objective=293936.5413391452, relgap=0.048586440317471946, termination='maxTimeLimit')" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "solver.solve(\n", " mip_gap=0.005,\n", " time_limit=90,\n", " verbose=True,\n", " options=dict(\n", " RINS=100,\n", " CutPasses=4,\n", " VarBranch=1,\n", " ),\n", ")" ] }, { "cell_type": "code", "execution_count": 19, "id": "d895c73a-1f67-41e6-9dd4-a9f509e26424", "metadata": {}, "outputs": [], "source": [ "S210, G210 = solver.get_solution()" ] }, { "cell_type": "code", "execution_count": 20, "id": "59fe5aae-579d-4d8a-807b-f55b80bd42d0", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 294032.0 m(+0) α: 11, β: 8, γ: 11κ = 7, T = 210" ], "text/plain": [ "" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "svgplot(G210)" ] }, { "cell_type": "code", "execution_count": 21, "id": "0b6c5ab8-41d8-4707-a940-32312f247e40", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.024698115350317407" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1 - G210.size(weight='length')/G210_ref.size(weight='length')" ] }, { "cell_type": "code", "execution_count": 22, "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 }