{ "cells": [ { "cell_type": "markdown", "id": "d3889873-304a-4138-8d26-71cd9df08281", "metadata": {}, "source": [ "# 🚀 Quick Start" ] }, { "cell_type": "markdown", "id": "b613f213-609c-4fab-b6e2-6da86ea72cb6", "metadata": {}, "source": [ "This notebook shows the *minimum steps* needed to run a electrical network optimization in a wind farm via OptiWindNet." ] }, { "cell_type": "markdown", "id": "56bae6b4-9cf4-4e01-83ce-e17d4b788b18", "metadata": {}, "source": [ "## Steps" ] }, { "cell_type": "markdown", "id": "77861cab-daa3-4bf5-98a9-27d52ad7cecb", "metadata": {}, "source": [ "An network optimization via OptiWindNet involves two components:\n", "\n", "* A `WindFarmNetwork` containing the problem data.\n", "* A `Router` describing the method used to solve it.\n", "\n", "The network optimization can be performed using following steps:\n", "\n", "1) Create a `WindFarmNetwork` instance\n", "2) Define a router\n", "3) Run the optimization and get the results" ] }, { "cell_type": "markdown", "id": "48145102", "metadata": {}, "source": [ "### 1. Create a `WindFarmNetwork` instance" ] }, { "cell_type": "markdown", "id": "fac8dccf", "metadata": {}, "source": [ "The `WindFarmNetwork` component stores the turbine layout and runs optimization (storing the optimized network after running an optimization). See [WindFarmNetwork and Router](a02_WindFarmNetwork.ipynb) for some of the important methods and functionalities provided by this component." ] }, { "cell_type": "code", "execution_count": 1, "id": "2f1ecb89-84e4-4316-9db9-dbaf5b282bf0", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import WindFarmNetwork" ] }, { "cell_type": "code", "execution_count": 2, "id": "c955df78", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "# Display figures as SVG in Jupyter notebooks\n", "%config InlineBackend.figure_formats = ['svg']" ] }, { "cell_type": "markdown", "id": "e0765d5c", "metadata": {}, "source": [ "#### Load location data\n", "\n", "> Note: For details about *OptiWindNet*'s `load_repository()`, check [Load repositories containing location data](a03_load_repositories.ipynb)." ] }, { "cell_type": "code", "execution_count": 3, "id": "1f2d7a49-6c57-49e9-bb85-cad2eb08d350", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import load_repository\n", "locations = load_repository()\n", "L = locations.doggerA" ] }, { "cell_type": "markdown", "id": "082fda01", "metadata": {}, "source": [ "Initialize a `WindFarmNetwork` instance with a prebuilt `L` and a desired maximum cable capacity *(See [Data Input](a01_data_input.ipynb) for various input formats.)*" ] }, { "cell_type": "code", "execution_count": 4, "id": "1cefe795", "metadata": {}, "outputs": [], "source": [ "wfn = WindFarmNetwork(L=L, cables=8)" ] }, { "cell_type": "markdown", "id": "a8fd46b9", "metadata": {}, "source": [ "We can plot the location to make sure `wfn` is created with the correct data." ] }, { "cell_type": "markdown", "id": "753feb91", "metadata": {}, "source": [ ">**Tip.** In a notebook, just put `wfn` as the last line of a cell for plotting G.\n", ">\n", ">* Before optimization (no `G` yet), it renders the location geometry `L`.\n", ">* If `G` exists (e.g. after a `optimize()` is run), it automatically renders `G`.\n", ">\n", ">We could use `wfn.plot_location()` for plotting the location geometry. For more details look into the notebook about [plotting](a04_Plotting.ipynb)" ] }, { "cell_type": "code", "execution_count": 5, "id": "e0e31dfa", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn" ] }, { "cell_type": "markdown", "id": "64a931d6-a64a-4e6b-a36d-6b103a8216dc", "metadata": {}, "source": [ "### 2. Define a `Router`" ] }, { "cell_type": "markdown", "id": "100bfc85-3785-435e-839e-1a6adef38c23", "metadata": {}, "source": [ "Three built-in routers are available in *OptiWindNet* :\n", "\n", "| Router | Speed | Accuracy | Notes |\n", "|------------|-------|----------|-------|\n", "| EWRouter | ⭐⭐⭐ | ⭐ | Very fast heuristic |\n", "| HGSRouter | ⭐⭐ | ⭐⭐ | Radial topology |\n", "| MILPRouter | ⭐ | ⭐⭐⭐ | Exact MILP solver |\n", "\n", "See [WindFarmNetwork and Router](a02_WindFarmNetwork.ipynb) for details about routers." ] }, { "cell_type": "markdown", "id": "d949bb52-5c2b-467b-954b-1ff0be0f717c", "metadata": {}, "source": [ "#### EWRouter" ] }, { "cell_type": "markdown", "id": "90750db9-b0e4-48cf-ade0-339d2ef14d84", "metadata": {}, "source": [ "To use this router, simply create an instance of the `EWRouter` class. All arguments are *optional*, making it quick and easy to get started with minimal configuration." ] }, { "cell_type": "code", "execution_count": 6, "id": "b6a65515-8573-4fb7-9f14-f741d78eb361", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import EWRouter" ] }, { "cell_type": "code", "execution_count": 7, "id": "e4218728-24ee-4e12-a597-0aff167ce84d", "metadata": {}, "outputs": [], "source": [ "ew_router = EWRouter()" ] }, { "cell_type": "markdown", "id": "e52ecc51", "metadata": {}, "source": [ "#### HGSRouter\n", "\n", "To use this router, create an instance of the `HGSRouter` class. The *only required argument* is `time_limit`, which defines how long the optimization is allowed to run (in seconds)." ] }, { "cell_type": "code", "execution_count": 8, "id": "3c842d29", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import HGSRouter" ] }, { "cell_type": "code", "execution_count": 9, "id": "346b0030", "metadata": {}, "outputs": [], "source": [ "hgs_router = HGSRouter(time_limit=1)" ] }, { "cell_type": "markdown", "id": "8694bc98", "metadata": {}, "source": [ "#### MILPRouter\n", "\n", "To use this router, create an instance of the `MILPRouter` class.\n", "You must provide:\n", "\n", "* `solver_name`: the MILP solver to use (e.g., `'ortools.cp_sat'`, `'gurobi'`, `'cbc'`)\n", "* `time_limit`: maximum time allowed for solving (in seconds)\n", "* `mip_gap`: acceptable optimality gap (e.g., `0.005` = 0.5%)" ] }, { "cell_type": "markdown", "id": "cc4966be", "metadata": {}, "source": [ "Optional arguments:\n", "\n", "* `verbose` *(default: False)*: set to `True` to display solver progress and detailed logs\n", "* `solver_options`: dictionary of solver-specific parameters\n", "* `model_options`: advanced model settings (e.g., topology, feeder configuration)" ] }, { "cell_type": "code", "execution_count": 10, "id": "9362998f", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import MILPRouter" ] }, { "cell_type": "code", "execution_count": 11, "id": "052b93cb", "metadata": {}, "outputs": [], "source": [ "milp_router = MILPRouter(solver_name='ortools.cp_sat', time_limit=20, mip_gap=0.005, verbose=True)" ] }, { "cell_type": "markdown", "id": "77b319ef", "metadata": {}, "source": [ "### 3. Run the optimization" ] }, { "cell_type": "markdown", "id": "a1993761", "metadata": {}, "source": [ "#### EWRouter (very fast)" ] }, { "cell_type": "code", "execution_count": 12, "id": "db91b101-c598-4a53-859d-d2bd540c1bef", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "30.6 ms ± 169 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" ] } ], "source": [ "%%timeit\n", "res_ew = wfn.optimize(router=ew_router)" ] }, { "cell_type": "code", "execution_count": 13, "id": "d534a69f-957b-4966-9d32-b326e24ab888", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'router': 'EWRouter', 'capacity': 8, 'method': 'biased_EW', 'iterations': 84}" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.solution_info()" ] }, { "cell_type": "code", "execution_count": 14, "id": "0d340d87-76a2-4537-8267-a5ae267b3ac2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "261192.1342444766" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.length()" ] }, { "cell_type": "markdown", "id": "bc45a08e", "metadata": {}, "source": [ "Plot optimized network\n", "\n", "> Note: we could use `wfn.plot()` for plotting the optimized network. For more details look into the notebook about [plotting](a04_Plotting.ipynb)" ] }, { "cell_type": "code", "execution_count": 15, "id": "842e6996-49a7-4354-b28a-c3c042b5a6a3", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 261 192 m(+2) SS1: 14κ = 8, T = 95" ], "text/plain": [ "" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn" ] }, { "cell_type": "markdown", "id": "95ce79c5", "metadata": {}, "source": [ "> **Note:** When calling `.optimize()` multiple times on the **same** `WindFarmNetwork` instance, the previously stored solution and related information (e.g., network graph, cost, length) will be **overwritten**.\n", "> You can verify this by checking the updated total length or by re-plotting the optimized network and comparing it to the earlier result." ] }, { "cell_type": "markdown", "id": "0d00cd7e", "metadata": {}, "source": [ "#### HGSRouter (fast - radial only solutions)" ] }, { "cell_type": "code", "execution_count": 16, "id": "181abc1b", "metadata": {}, "outputs": [], "source": [ "res_hgs = wfn.optimize(router=hgs_router)" ] }, { "cell_type": "code", "execution_count": 17, "id": "92dfde90", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'router': 'HGSRouter',\n", " 'capacity': 8,\n", " 'solver_name': 'HGS-CVRP',\n", " 'complete': False,\n", " 'feeders_above_min': None,\n", " 'nbGranular': 20,\n", " 'mu': 25,\n", " 'lambda_': 40,\n", " 'nbElite': 4,\n", " 'nbClose': 5,\n", " 'nbIterPenaltyManagement': 100,\n", " 'targetFeasible': 0.2,\n", " 'penaltyDecrease': 0.85,\n", " 'penaltyIncrease': 1.2,\n", " 'seed': 1135034442,\n", " 'nbIter': 20000,\n", " 'nbIterTraces': 500,\n", " 'timeLimit': 1,\n", " 'useSwapStar': True,\n", " 'runtime': 1.000543211}" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.solution_info()" ] }, { "cell_type": "code", "execution_count": 18, "id": "ecc63aca", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "243285.1091892355" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.length()" ] }, { "cell_type": "code", "execution_count": 19, "id": "02a617ed", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 243 285 m(+0) SS1: 12κ = 8, T = 95" ], "text/plain": [ "" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn" ] }, { "cell_type": "markdown", "id": "454c5969", "metadata": {}, "source": [ "> Note that the HGSRouter always produces a network with **radial topology**.\n", ">\n", "> A **radial topology** means that each turbine has at most two connections (maximum degree of 2). Contrast that with the default **branched topology**, where there is no limit on the number of connections of each turbine. See the figure below for an illustrative example." ] }, { "cell_type": "code", "execution_count": 20, "id": "0251de67-d621-4087-ba09-08d1dfaaeab5", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.synthetic import toyfarm\n", "from optiwindnet.api import ModelOptions" ] }, { "cell_type": "code", "execution_count": 21, "id": "78b2a511-03a4-444c-aa4c-3840df2ecbb5", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", " \n", " \n", " \n", " \n", " image/svg+xml\n", " \n", " \n", " OptiWindNet\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " Radial\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " Branched\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, (axl, axr) = plt.subplots(1, 2, facecolor='none')\n", "\n", "wfn_toy = WindFarmNetwork(L=toyfarm(), cables=4)\n", "opt_milp = dict(mip_gap=0.001, time_limit=5, solver_name='ortools.cp_sat')\n", "\n", "axl.set_title('Radial', color='#888888')\n", "wfn_toy.optimize(\n", " router=MILPRouter(**opt_milp,\n", " model_options=ModelOptions(topology='radial', feeder_limit='minimum'))\n", ")\n", "wfn_toy.plot(ax=axl, infobox=False)\n", "\n", "axr.set_title('Branched', color='#888888');\n", "wfn_toy.optimize(\n", " router=MILPRouter(**opt_milp,\n", " model_options=ModelOptions(topology='branched', feeder_limit='minimum'))\n", ")\n", "wfn_toy.plot(ax=axr, infobox=False);" ] }, { "cell_type": "markdown", "id": "fb0f3edb", "metadata": {}, "source": [ "#### MILPRouter" ] }, { "cell_type": "markdown", "id": "5040c87d", "metadata": {}, "source": [ "\n", "(high-quality solutions with guarantees, may take several minutes)" ] }, { "cell_type": "markdown", "id": "f421ae7d", "metadata": {}, "source": [ "> Note:\n", "> * if a `WindFarmNetwork` already has a solution, `MILPRouter` will use it as a warm start.\n", "> * To avoid warm-starting, create a **new** `WindFarmNetwork` and run MILP directly. \n", "> * Set `verbose=True` to see warm-start messages in the logs (The log messages of the MILP router provide information about warm-start).\n" ] }, { "cell_type": "code", "execution_count": 22, "id": "64e22c2f-1339-48b6-86a8-635874e8b382", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "IntegerBoundsPreprocessor 2613 rows, 1690 columns, 9531 entries with magnitude in [1.000000e+00, 8.000000e+00]\n", "BoundPropagationPreprocessor 2613 rows, 1690 columns, 9531 entries with magnitude in [1.000000e+00, 8.000000e+00]\n", "ImpliedIntegerPreprocessor 2613 rows, 1690 columns, 9531 entries with magnitude in [1.000000e+00, 8.000000e+00]\n", "IntegerBoundsPreprocessor 2613 rows, 1690 columns, 9531 entries with magnitude in [1.000000e+00, 8.000000e+00]\n", "ReduceCostOverExclusiveOrConstraintPreprocessor 2613 rows, 1690 columns, 9531 entries with magnitude in [1.000000e+00, 8.000000e+00]\n", "\n", "Scaling to pure integer problem.\n", "Num integers: 1690/1690 (implied: 0 in_inequalities: 0 max_scaling: 0) [IP] \n", "Maximum constraint coefficient relative error: 0\n", "Maximum constraint worst-case activity error: 0\n", "Constraint scaling factor range: [1, 1]\n", "\n", "Starting CP-SAT solver v9.15.6755\n", "Parameters: max_time_in_seconds: 20 log_search_progress: true catch_sigint_signal: false relative_gap_limit: 0.005\n", "Setting number of workers to 16\n", "\n", "Initial optimization model 'optiwindnet': (model_fingerprint: 0x3e191ebfad7f2979)\n", "#Variables: 1'690 (#bools: 750 in floating point objective) (1'500 primary variables)\n", " - 845 Booleans in [0,1]\n", " - 750 in [0,7]\n", " - 95 in [0,8]\n", "#kLinear2: 2'065\n", "#kLinear3: 4\n", "#kLinearN: 544 (#terms: 5'389)\n", "\n", "Starting presolve at 0.00s\n", "The solution hint is complete and is feasible.\n", "[Scaling] Floating point objective has 750 terms with magnitude in [0.00903211, 21204.4] average = 3140.28\n", "[Scaling] Objective coefficient relative error: 1.87515e-05\n", "[Scaling] Objective worst-case absolute error: 9.16404e-05\n", "[Scaling] Objective scaling factor: 1.04858e+06\n", " 9.76e-04s 0.00e+00d [DetectDominanceRelations] \n", " 9.90e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 2.36e-05s 0.00e+00d [ExtractEncodingFromLinear] #potential_supersets=355 \n", " 2.21e-04s 0.00e+00d [DetectDuplicateColumns] \n", " 1.58e-04s 0.00e+00d [DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 6'368 nodes and 11'971 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.00055943 dtime: 0.00116108\n", "[SAT presolve] num removable Booleans: 0 / 845\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:375 literals:750 vars:750 one_side_vars:750 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [8.6824e-05s] clauses:375 literals:750 vars:750 one_side_vars:750 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.000155479s] clauses:375 literals:750 vars:750 one_side_vars:750 simple_definition:0 singleton_clauses:0\n", " 1.81e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.16e-02s 1.04e-02d [Probe] #probed=3'380 #new_binary_clauses=845 \n", " 7.22e-04s 5.46e-04d [MaxClique] Merged 635 constraints with 1'926 literals into 330 constraints with 1'316 literals\n", " 3.68e-04s 0.00e+00d [DetectDominanceRelations] \n", " 4.67e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.20e-03s 0.00e+00d [ProcessAtMostOneAndLinear] #num_changes=845 \n", " 1.48e-04s 0.00e+00d [DetectDuplicateConstraints] \n", " 1.41e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.67e-04s 1.46e-05d [DetectDominatedLinearConstraints] #relevant_constraints=193 #num_inclusions=96 \n", " 3.91e-05s 0.00e+00d [DetectDifferentVariables] \n", " 3.67e-03s 3.73e-04d [ProcessSetPPC] #relevant_constraints=427 #num_inclusions=425 \n", " 1.50e-04s 0.00e+00d [TransformClausesToExactlyOne] #num_amos=330 \n", " 7.56e-04s 0.00e+00d [DetectEncodedComplexDomains] \n", " 2.95e-05s 0.00e+00d [FindAlmostIdenticalLinearConstraints] \n", " 5.32e-04s 2.83e-04d [FindBigAtMostOneAndLinearOverlap] \n", " 1.98e-04s 3.25e-04d [FindBigVerticalLinearOverlap] \n", " 2.62e-05s 1.24e-05d [FindBigHorizontalLinearOverlap] #linears=179 \n", " 2.76e-05s 0.00e+00d [MergeClauses] \n", " 9.36e-04s 0.00e+00d [DetectDominanceRelations] \n", " 6.30e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 3.43e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.97e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.07e-04s 0.00e+00d [DetectDuplicateColumns] \n", " 1.56e-04s 0.00e+00d [DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 5'717 nodes and 9'866 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.000388603 dtime: 0.00104477\n", "[SAT presolve] num removable Booleans: 0 / 845\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [8.502e-06s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [2.5283e-05s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n", " 1.63e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 8.99e-03s 3.44e-03d [Probe] #probed=1'690 \n", " 2.86e-04s 3.69e-04d [MaxClique] \n", " 8.98e-04s 0.00e+00d [DetectDominanceRelations] \n", " 4.30e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.87e-04s 0.00e+00d [ProcessAtMostOneAndLinear] \n", " 1.76e-04s 0.00e+00d [DetectDuplicateConstraints] \n", " 1.56e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.17e-04s 1.10e-05d [DetectDominatedLinearConstraints] #relevant_constraints=192 #num_inclusions=95 \n", " 2.32e-05s 0.00e+00d [DetectDifferentVariables] \n", " 1.53e-04s 7.32e-06d [ProcessSetPPC] #relevant_constraints=426 \n", " 2.80e-04s 0.00e+00d [TransformClausesToExactlyOne] #num_amos=330 \n", " 1.11e-03s 0.00e+00d [DetectEncodedComplexDomains] \n", " 4.27e-05s 0.00e+00d [FindAlmostIdenticalLinearConstraints] \n", " 2.73e-04s 2.79e-04d [FindBigAtMostOneAndLinearOverlap] \n", " 1.94e-04s 3.25e-04d [FindBigVerticalLinearOverlap] \n", " 3.49e-05s 1.24e-05d [FindBigHorizontalLinearOverlap] #linears=179 \n", " 1.90e-05s 0.00e+00d [MergeClauses] \n", " 3.37e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.75e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 4.49e-06s 0.00e+00d [MergeNoOverlap] \n", " 5.18e-06s 0.00e+00d [MergeNoOverlap2D] \n", " 2.50e-04s 0.00e+00d [ExpandObjective] #entries=7'754 #tight_variables=845 #tight_constraints=95 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 191 times.\n", " - rule 'TODO linear2: convert ax + by != cte to clauses for large domains' was applied 5'070 times.\n", " - rule 'at_most_one: transformed into max clique' was applied 1 time.\n", " - rule 'bool_or: implications' was applied 375 times.\n", " - rule 'deductions: 1690 stored' was applied 1 time.\n", " - rule 'linear + amo: extracted enforcement literal' was applied 845 times.\n", " - rule 'linear2: contains a boolean' was applied 845 times.\n", " - rule 'linear2: convert ax + by != cte to clauses' was applied 375 times.\n", " - rule 'linear: positive at most one' was applied 260 times.\n", " - rule 'linear: positive equal one' was applied 95 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 95 times.\n", " - rule 'presolve: 0 unused variables removed.' was applied 1 time.\n", " - rule 'presolve: iteration' was applied 2 times.\n", " - rule 'setppc: exactly_one included in linear' was applied 95 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 94 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 845 times.\n", " - rule 'variables: detect half reified value encoding' was applied 1'690 times.\n", "\n", "Presolved optimization model 'optiwindnet': (model_fingerprint: 0x8a183b8cbedf8015)\n", "#Variables: 1'690 (#bools: 750 in objective) (1'500 primary variables)\n", " - 845 Booleans in [0,1]\n", " - 750 in [0,7]\n", " - 95 in [0,8]\n", "#kAtMostOne: 260 (#literals: 1'176)\n", "#kBoolAnd: 70 (#enforced: 70) (#literals: 140)\n", "#kExactlyOne: 95 (#literals: 845)\n", "#kLinear1: 1'690 (#enforced: 1'690)\n", "#kLinear3: 4\n", "#kLinearN: 188 (#terms: 2'523)\n", "[Symmetry] Graph for symmetry has 5'717 nodes and 9'866 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.000543924 dtime: 0.00104354\n", "\n", "Preloading model.\n", "#Bound 0.09s best:inf next:[160817.074,2309766.32] initial_domain\n", "#1 0.09s best:243285.109 next:[160817.074,243285.109] complete_hint\n", "#Model 0.09s var:1690/1690 constraints:2307/2307\n", "\n", "Starting search at 0.09s with 16 workers.\n", "11 full problem subsolvers: [core, default_lp, lb_tree_search, max_lp, no_lp, objective_lb_search, probing, pseudo_costs, quick_restart, quick_restart_no_lp, reduced_costs]\n", "5 first solution subsolvers: [fj(2), fs_random, fs_random_no_lp, fs_random_quick_restart_no_lp]\n", "11 interleaved subsolvers: [feasibility_pump, graph_arc_lns, graph_cst_lns, graph_dec_lns, graph_var_lns, lb_relax_lns, ls, ls_lin, rins/rens, rnd_cst_lns, rnd_var_lns]\n", "3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]\n", "\n", "#2 0.12s best:243274.296 next:[160817.074,243274.296] graph_cst_lns (d=5.00e-01 s=15 t=0.10 p=0.00 stall=0 h=base)\n", "#Bound 0.12s best:243274.296 next:[162472.38,243274.296] am1_presolve (num_literals=750 num_am1=34 increase=1735714016 work_done=2720)\n", "#Bound 0.12s best:243274.296 next:[188354.862,243274.296] quick_restart\n", "#Bound 0.13s best:243274.296 next:[189781.728,243274.296] pseudo_costs\n", "#Bound 0.18s best:243274.296 next:[223973.897,243274.296] lb_tree_search\n", "#3 0.19s best:243250.13 next:[223973.897,243250.13] quick_restart_no_lp (fixed_bools=0/892)\n", "#4 0.26s best:243249.495 next:[223973.897,243249.495] quick_restart_no_lp (fixed_bools=0/917)\n", "#Bound 0.31s best:243249.495 next:[225201.873,243249.495] lb_tree_search\n", "#Bound 0.32s best:243249.495 next:[225413.966,243249.495] max_lp\n", "#5 0.39s best:243072.468 next:[225413.966,243072.468] rnd_cst_lns (d=7.07e-01 s=24 t=0.10 p=1.00 stall=1 h=base)\n", "#6 0.64s best:242841.823 next:[225413.966,242841.823] rins_lp_lns (d=7.07e-01 s=23 t=0.10 p=1.00 stall=0 h=base)\n", "#7 0.65s best:242664.161 next:[225413.966,242664.161] rins_lp_lns (d=7.07e-01 s=23 t=0.10 p=1.00 stall=0 h=base) [combined with: rnd_cst_lns (d=7.07e...]\n", "#Bound 0.84s best:242664.161 next:[225975.405,242664.161] lb_tree_search\n", "#Bound 0.99s best:242664.161 next:[226137.83,242664.161] max_lp\n", "#Bound 1.00s best:242664.161 next:[226696.357,242664.161] lb_tree_search\n", "#Bound 1.31s best:242664.161 next:[227141.98,242664.161] lb_tree_search\n", "#8 1.52s best:241069.113 next:[227141.98,241069.113] lb_relax_lns_bool_h (d=5.00e-01 s=36 t=0.50 p=0.00 stall=0 h=base)\n", "#Bound 1.80s best:241069.113 next:[227596.084,241069.113] lb_tree_search\n", "#Bound 2.10s best:241069.113 next:[227911.461,241069.113] lb_tree_search\n", "#Bound 2.84s best:241069.113 next:[228117.288,241069.113] lb_tree_search\n", "#Bound 3.02s best:241069.113 next:[228215.698,241069.113] lb_tree_search\n", "#Bound 3.05s best:241069.113 next:[228307.104,241069.113] lb_tree_search\n", "#Bound 3.89s best:241069.113 next:[228429.974,241069.113] lb_tree_search\n", "#Bound 4.01s best:241069.113 next:[228430.102,241069.113] lb_tree_search (nodes=5/5 rc=0 decisions=44 @root=14 restarts=0 lp_iters=[0, 0, 1'100, 193]) \n", "#9 4.13s best:240742.123 next:[228430.102,240742.123] graph_dec_lns (d=8.09e-01 s=98 t=0.10 p=0.62 stall=8 h=base)\n", "#Bound 4.98s best:240742.123 next:[228511.31,240742.123] lb_tree_search\n", "#Bound 5.04s best:240742.123 next:[228512.562,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=47 @root=16 restarts=0 lp_iters=[0, 0, 1'252, 193]) \n", "#Bound 5.15s best:240742.123 next:[228600.488,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=48 @root=16 restarts=0 lp_iters=[0, 0, 1'516, 193]) \n", "#Bound 5.16s best:240742.123 next:[228603.14,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=49 @root=16 restarts=0 lp_iters=[0, 0, 1'553, 193]) \n", "#Bound 5.22s best:240742.123 next:[228621.892,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=50 @root=16 restarts=0 lp_iters=[0, 0, 1'616, 193]) \n", "#Bound 5.26s best:240742.123 next:[228622.868,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=51 @root=16 restarts=0 lp_iters=[0, 0, 1'643, 193]) \n", "#Bound 5.30s best:240742.123 next:[228622.99,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=52 @root=16 restarts=0 lp_iters=[0, 0, 1'648, 193]) \n", "#Bound 5.43s best:240742.123 next:[228642.523,240742.123] lb_tree_search (nodes=5/5 rc=0 decisions=56 @root=16 restarts=0 lp_iters=[0, 0, 2'045, 193]) \n", "#Bound 5.87s best:240742.123 next:[228689.826,240742.123] lb_tree_search (nodes=9/9 rc=0 decisions=98 @root=16 restarts=0 lp_iters=[0, 0, 2'862, 373]) [skipped_logs=5]\n", "#Bound 6.99s best:240742.123 next:[228874.714,240742.123] lb_tree_search (nodes=17/17 rc=2 decisions=159 @root=16 restarts=0 lp_iters=[0, 0, 5'141, 971]) [skipped_logs=9]\n", "#Bound 8.00s best:240742.123 next:[228964.491,240742.123] lb_tree_search (nodes=28/28 rc=5 decisions=245 @root=16 restarts=0 lp_iters=[0, 0, 7'624, 1'348]) [skipped_logs=13]\n", "#Bound 8.84s best:240742.123 next:[228989.705,240742.123] lb_tree_search (nodes=31/31 rc=5 decisions=304 @root=16 restarts=0 lp_iters=[0, 0, 9'624, 1'449]) [skipped_logs=7]\n", "#Bound 9.97s best:240742.123 next:[229048.146,240742.123] lb_tree_search (nodes=37/37 rc=5 decisions=362 @root=16 restarts=0 lp_iters=[0, 0, 12'303, 1'850]) [skipped_logs=7]\n", "#Bound 10.95s best:240742.123 next:[229140.957,240742.123] lb_tree_search (nodes=46/46 rc=5 decisions=416 @root=16 restarts=0 lp_iters=[0, 0, 15'016, 2'760]) [skipped_logs=10]\n", "#Bound 11.96s best:240742.123 next:[229167.674,240742.123] lb_tree_search (nodes=54/54 rc=5 decisions=499 @root=16 restarts=0 lp_iters=[0, 0, 18'729, 3'255]) [skipped_logs=14]\n", "#Bound 12.95s best:240742.123 next:[229178.894,240742.123] lb_tree_search (nodes=60/60 rc=5 decisions=583 @root=16 restarts=0 lp_iters=[0, 0, 22'414, 3'679]) [skipped_logs=9]\n", "#10 13.45s best:240715.795 next:[229184.169,240715.795] rnd_cst_lns (d=7.82e-01 s=326 t=0.10 p=0.54 stall=9 h=base)\n", "#11 13.55s best:240715.16 next:[229184.169,240715.16] quick_restart_no_lp (fixed_bools=0/1163)\n", "#Bound 14.02s best:240715.16 next:[229188.86,240715.16] lb_tree_search (nodes=66/66 rc=5 decisions=663 @root=16 restarts=0 lp_iters=[0, 0, 26'538, 4'164]) [skipped_logs=8]\n", "#Bound 14.92s best:240715.16 next:[229201.028,240715.16] lb_tree_search (nodes=70/70 rc=5 decisions=732 @root=16 restarts=0 lp_iters=[0, 0, 29'880, 4'392]) [skipped_logs=11]\n", "#Bound 15.78s best:240715.16 next:[229232.501,240715.16] lb_tree_search (nodes=76/76 rc=5 decisions=805 @root=16 restarts=0 lp_iters=[0, 0, 33'372, 4'736]) [skipped_logs=7]\n", "#Bound 16.94s best:240715.16 next:[229258.733,240715.16] lb_tree_search (nodes=85/85 rc=5 decisions=907 @root=16 restarts=0 lp_iters=[0, 0, 37'879, 5'290]) [skipped_logs=11]\n", "#Bound 17.98s best:240715.16 next:[229283.658,240715.16] lb_tree_search (nodes=91/91 rc=5 decisions=984 @root=16 restarts=0 lp_iters=[0, 0, 41'848, 5'615]) [skipped_logs=10]\n", "#Bound 18.06s best:240715.16 next:[229289.285,240715.16] lb_tree_search (nodes=92/92 rc=5 decisions=991 @root=16 restarts=0 lp_iters=[0, 0, 42'281, 5'674]) [skipped_logs=1]\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [ 19.89s, 19.89s] 19.89s 0.00ns 19.89s 2 [ 3.54ms, 12.21s] 6.11s 6.10s 12.21s\n", " 'default_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [118.08ms, 5.85s] 2.98s 2.87s 5.97s\n", " 'feasibility_pump': 95 [ 65.79us, 102.05ms] 3.81ms 10.16ms 361.54ms 93 [369.41us, 65.46ms] 1.09ms 6.71ms 101.06ms\n", " 'fj': 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fj': 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random': 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_no_lp': 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_quick_restart_no_lp': 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'graph_arc_lns': 44 [ 12.19ms, 536.99ms] 246.47ms 164.00ms 10.84s 44 [ 94.67us, 100.18ms] 62.65ms 44.45ms 2.76s\n", " 'graph_cst_lns': 43 [ 16.79ms, 525.29ms] 236.64ms 174.11ms 10.18s 41 [ 3.16us, 100.13ms] 54.31ms 42.98ms 2.23s\n", " 'graph_dec_lns': 40 [ 2.03ms, 532.77ms] 243.22ms 190.38ms 9.73s 39 [ 10.00ns, 100.18ms] 53.98ms 46.87ms 2.11s\n", " 'graph_var_lns': 42 [ 7.72ms, 495.48ms] 236.37ms 175.81ms 9.93s 42 [ 42.00ns, 100.26ms] 57.62ms 46.31ms 2.42s\n", " 'lb_relax_lns': 9 [248.38ms, 1.98s] 1.09s 691.34ms 9.80s 9 [ 59.71ms, 556.91ms] 312.96ms 218.58ms 2.82s\n", " 'lb_tree_search': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 2 [210.17ms, 9.21s] 4.71s 4.50s 9.42s\n", " 'ls': 50 [169.74ms, 333.57ms] 193.79ms 25.58ms 9.69s 50 [100.01ms, 100.03ms] 100.01ms 5.47us 5.00s\n", " 'ls_lin': 50 [142.97ms, 229.88ms] 189.86ms 17.60ms 9.49s 50 [100.01ms, 100.03ms] 100.01ms 5.25us 5.00s\n", " 'max_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [233.21ms, 7.17s] 3.70s 3.47s 7.41s\n", " 'no_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 4.06ms, 6.11s] 3.06s 3.05s 6.12s\n", " 'objective_lb_search': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [120.92ms, 7.19s] 3.66s 3.54s 7.31s\n", " 'probing': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [124.04ms, 6.01s] 3.07s 2.94s 6.13s\n", " 'pseudo_costs': 1 [ 19.93s, 19.93s] 19.93s 0.00ns 19.93s 2 [ 38.75ms, 7.06s] 3.55s 3.51s 7.10s\n", " 'quick_restart': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [121.71ms, 6.20s] 3.16s 3.04s 6.33s\n", " 'quick_restart_no_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 4.06ms, 9.71s] 4.86s 4.85s 9.72s\n", " 'reduced_costs': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 43.21ms, 8.13s] 4.08s 4.04s 8.17s\n", " 'rins/rens': 42 [ 3.57ms, 494.03ms] 227.52ms 208.71ms 9.56s 28 [ 1.08us, 100.12ms] 74.50ms 40.67ms 2.09s\n", " 'rnd_cst_lns': 39 [ 12.04ms, 534.97ms] 254.73ms 187.37ms 9.93s 39 [ 10.00ns, 100.25ms] 54.74ms 45.60ms 2.14s\n", " 'rnd_var_lns': 37 [ 13.15ms, 570.25ms] 259.51ms 178.64ms 9.60s 37 [146.00ns, 100.33ms] 56.84ms 43.38ms 2.10s\n", "\n", "Search stats Bools Conflicts Branches Restarts BacktrackToRoot Backtrack BoolPropag IntegerPropag\n", " 'core': 879 355'918 652'593 249 3'626 357'395 5'269'135 14'624'816\n", " 'default_lp': 938 1'418 26'928 4 9'231 12'291 218'671 960'992\n", " 'fs_random': 0 0 0 0 0 0 0 0\n", " 'fs_random_no_lp': 0 0 0 0 0 0 0 0\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0 0 0\n", " 'lb_tree_search': 845 23 42'877 0 19'760 22'198 207'874 796'887\n", " 'max_lp': 845 689 41'932 6 13'532 16'819 279'364 1'377'556\n", " 'no_lp': 845 233'924 369'258 186 21'183 271'830 14'034'793 42'157'034\n", " 'objective_lb_search': 929 1'575 7'901 1 3'441 5'149 114'893 500'479\n", " 'probing': 866 11 2'106 0 1'775 1'786 13'431 45'700\n", " 'pseudo_costs': 845 712 52'883 11 20'368 24'058 306'651 1'525'883\n", " 'quick_restart': 900 183 59'310 10 22'034 26'651 339'410 1'595'448\n", " 'quick_restart_no_lp': 1'310 48'884 1'105'370 4'351 32'087 91'261 6'377'626 22'234'675\n", " 'reduced_costs': 846 1'213 26'483 5 10'428 12'347 120'973 622'018\n", "\n", "SAT formula Fixed Equiv Total VarLeft BinaryClauses PermanentClauses TemporaryClauses\n", " 'core': 0 0 879 879 188 1'839 11'265\n", " 'default_lp': 0 0 938 938 472 345 1'214\n", " 'fs_random': 0 0 0 0 0 0 0\n", " 'fs_random_no_lp': 0 0 0 0 0 0 0\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0 0\n", " 'lb_tree_search': 0 0 845 845 140 540 4\n", " 'max_lp': 0 0 845 845 140 540 593\n", " 'no_lp': 0 0 845 845 140 2'673 3'269\n", " 'objective_lb_search': 0 0 929 929 392 117 1'181\n", " 'probing': 0 0 866 866 476 95 11\n", " 'pseudo_costs': 0 0 845 845 140 514 633\n", " 'quick_restart': 0 0 900 900 350 539 136\n", " 'quick_restart_no_lp': 0 0 1'310 1'310 3'242 1'769 12'914\n", " 'reduced_costs': 0 0 846 846 142 105 1'159\n", "\n", "SAT stats ClassicMinim LitRemoved LitRemovedBinary LitLearned LitForgotten Subsumed\n", " 'core': 326'189 2'270'449 1'911'207 18'765'655 11'554'520 115'899\n", " 'default_lp': 1'088 30'219 55'356 134'445 0 160\n", " 'fs_random': 0 0 0 0 0 0\n", " 'fs_random_no_lp': 0 0 0 0 0 0\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0\n", " 'lb_tree_search': 12 27 203 321 0 16\n", " 'max_lp': 604 7'952 32'914 99'797 0 88\n", " 'no_lp': 228'792 2'354'541 221'740 19'150'167 1'655'871 207'609\n", " 'objective_lb_search': 1'510 116'831 18'632 66'118 0 351\n", " 'probing': 4 41 360 1'991 0 0\n", " 'pseudo_costs': 561 5'589 30'284 103'423 0 77\n", " 'quick_restart': 128 2'305 7'634 21'027 0 39\n", " 'quick_restart_no_lp': 41'101 892'843 1'046'519 4'861'358 2'783'242 8'102\n", " 'reduced_costs': 829 4'150 60'810 199'376 0 54\n", "\n", "Vivification Clauses Decisions LitTrue Subsumed LitRemoved DecisionReused Conflicts\n", " 'core': 0 0 0 0 0 0 0\n", " 'default_lp': 2'137 13'615 0 46 320 1'907 5\n", " 'fs_random': 0 0 0 0 0 0 0\n", " 'fs_random_no_lp': 0 0 0 0 0 0 0\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0 0\n", " 'lb_tree_search': 3'387 22'923 0 97 630 2'146 2\n", " 'max_lp': 4'427 25'997 0 97 634 5'109 2\n", " 'no_lp': 23'113 85'764 0 127 1'140 60'289 6\n", " 'objective_lb_search': 199 1'523 0 0 0 8 0\n", " 'probing': 0 0 0 0 0 0 0\n", " 'pseudo_costs': 4'853 29'865 0 64 417 4'467 2\n", " 'quick_restart': 5'614 34'906 0 101 694 5'410 5\n", " 'quick_restart_no_lp': 14'464 86'339 0 501 4'410 6'403 51\n", " 'reduced_costs': 982 7'685 0 1 6 0 0\n", "\n", "Clause deletion at_true l_and_not(l) to_binary sub_conflict sub_extra sub_decisions sub_eager sub_vivify sub_probing sub_inpro blocked eliminated forgotten promoted conflicts\n", " 'core': 0 0 0 112'618 2'312 0 3'281 0 0 199 0 0 224'956 810'835 355'918\n", " 'default_lp': 0 0 0 153 3 1 7 46 0 7 0 0 0 2'920 1'418\n", " 'fs_random': 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", " 'fs_random_no_lp': 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", " 'lb_tree_search': 0 0 0 16 0 1 0 97 0 0 0 0 0 6 23\n", " 'max_lp': 0 0 0 86 0 3 2 97 0 1 0 0 0 1'304 689\n", " 'no_lp': 0 0 0 207'244 138 2'524 365 127 0 11 0 0 17'887 473'261 233'924\n", " 'objective_lb_search': 0 0 0 334 0 21 17 0 0 0 0 0 0 3'187 1'575\n", " 'probing': 0 0 0 0 0 0 0 0 0 0 0 0 0 19 11\n", " 'pseudo_costs': 0 0 0 75 1 0 2 64 0 31 0 0 0 1'424 712\n", " 'quick_restart': 0 0 0 39 1 0 0 101 0 1 0 0 0 285 183\n", " 'quick_restart_no_lp': 0 0 4 7'504 155 43 598 501 32 115 0 0 25'445 99'146 48'884\n", " 'reduced_costs': 0 0 0 52 0 0 2 1 0 0 0 0 0 2'934 1'213\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 101'972 3'391 5'758 0 290\n", " 'lb_tree_search': 1 53'402 2'447 1'133 195 0\n", " 'max_lp': 1 77'968 3'186 3'117 241 77\n", " 'objective_lb_search': 1 136'226 1'940 5'615 1 47\n", " 'probing': 1 22'767 4'537 359 3 1\n", " 'pseudo_costs': 1 74'147 4'159 3'171 268 127\n", " 'quick_restart': 1 49'651 3'796 2'040 0 19\n", " 'reduced_costs': 1 124'894 2'764 3'428 562 181\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 852 rows, 1596 columns, 5402 entries\n", " 'lb_tree_search': 1341 rows, 1690 columns, 18019 entries\n", " 'max_lp': 1473 rows, 1690 columns, 16116 entries\n", " 'objective_lb_search': 1017 rows, 1596 columns, 6327 entries\n", " 'probing': 2671 rows, 1596 columns, 62512 entries\n", " 'pseudo_costs': 1431 rows, 1690 columns, 17390 entries\n", " 'quick_restart': 1594 rows, 1596 columns, 20103 entries\n", " 'reduced_costs': 947 rows, 1690 columns, 7846 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 0 6'030 0 5'620 0\n", " 'lb_tree_search': 0 0 1'328 0 34'595 0\n", " 'max_lp': 0 0 3'432 0 16'634 0\n", " 'objective_lb_search': 0 0 5'645 0 1'898 0\n", " 'probing': 0 11 350 0 61'026 0\n", " 'pseudo_costs': 0 0 3'525 0 20'957 0\n", " 'quick_restart': 0 7 2'047 0 25'274 0\n", " 'reduced_costs': 0 0 4'151 0 10'288 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strengthened Cuts/Call\n", " 'default_lp': 6'191 33 0 0 0 15 37 3'391/7'588\n", " 'lb_tree_search': 5'599 285 0 0 0 376 5 2'447/4'509\n", " 'max_lp': 6'338 169 0 0 0 151 1 3'186/6'302\n", " 'objective_lb_search': 4'740 17 0 0 0 2 18 1'940/4'735\n", " 'probing': 7'337 443 0 0 0 1'805 102 4'537/8'124\n", " 'pseudo_costs': 7'311 180 0 0 0 158 7 4'159/8'575\n", " 'quick_restart': 6'596 181 0 0 0 287 96 3'796/7'435\n", " 'reduced_costs': 5'916 65 0 0 0 29 11 2'764/5'361\n", "\n", "Lp Cut lb_tree_search default_lp max_lp quick_restart reduced_costs probing objective_lb_search pseudo_costs\n", " CG_FF: 5 21 15 17 12 19 9 37\n", " CG_K: 1 15 19 10 5 4 4 15\n", " CG_KL: - 3 - 5 - 2 3 4\n", " CG_R: 17 28 34 16 17 35 5 55\n", " CG_RB: 70 61 49 41 53 82 19 81\n", " CG_RBP: 7 21 25 23 5 50 6 30\n", " IB: 142 1'508 917 1'118 1'114 755 1'152 1'366\n", " MIR_1_FF: 109 125 105 248 88 254 53 172\n", " MIR_1_K: 1 54 20 76 6 64 36 40\n", " MIR_1_KL: 2 36 3 37 - 43 30 12\n", " MIR_1_R: 1 2 3 3 - 2 - 1\n", " MIR_1_RB: 49 72 69 131 49 135 29 95\n", " MIR_1_RBP: 10 52 14 122 16 146 22 40\n", " MIR_2_FF: 151 141 159 193 133 274 68 223\n", " MIR_2_K: 9 55 28 72 12 87 22 42\n", " MIR_2_KL: 2 17 3 20 4 34 8 13\n", " MIR_2_R: 5 14 8 10 5 16 4 15\n", " MIR_2_RB: 141 119 165 164 110 210 53 176\n", " MIR_2_RBP: 39 68 42 98 28 186 32 58\n", " MIR_3_FF: 176 109 162 112 132 160 49 166\n", " MIR_3_K: 26 58 32 72 25 77 26 35\n", " MIR_3_KL: 7 9 3 9 3 11 11 10\n", " MIR_3_R: 9 9 16 4 8 15 1 17\n", " MIR_3_RB: 149 90 155 85 125 138 40 154\n", " MIR_3_RBP: 56 46 44 85 36 111 14 66\n", " MIR_4_FF: 135 49 110 70 87 110 23 131\n", " MIR_4_K: 30 39 34 48 22 42 11 46\n", " MIR_4_KL: 3 - 1 4 4 9 3 8\n", " MIR_4_R: 9 7 6 5 9 11 - 7\n", " MIR_4_RB: 118 65 106 52 98 84 26 116\n", " MIR_4_RBP: 54 29 36 52 30 57 9 49\n", " MIR_5_FF: 109 42 86 48 53 57 4 81\n", " MIR_5_K: 24 25 30 34 13 34 4 38\n", " MIR_5_KL: 4 1 2 5 2 7 1 7\n", " MIR_5_R: 4 6 7 5 6 5 - 8\n", " MIR_5_RB: 94 42 69 34 56 53 12 65\n", " MIR_5_RBP: 38 22 28 40 11 49 - 41\n", " MIR_6_FF: 64 14 49 28 37 40 1 54\n", " MIR_6_K: 15 10 20 26 17 42 7 24\n", " MIR_6_KL: 16 4 10 10 8 15 - 13\n", " MIR_6_R: 2 6 9 1 1 2 - 3\n", " MIR_6_RB: 49 19 49 13 36 33 5 50\n", " MIR_6_RBP: 29 9 29 24 16 41 2 25\n", " ZERO_HALF_FF: 10 29 23 22 8 36 13 24\n", " ZERO_HALF_K: - 8 3 11 - 9 5 14\n", " ZERO_HALF_KL: - 3 1 3 1 5 - 1\n", " ZERO_HALF_R: 376 186 325 404 228 669 89 346\n", " ZERO_HALF_RB: 58 32 57 55 33 149 24 54\n", " ZERO_HALF_RBP: 22 11 6 31 2 68 5 31\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 5/44 45% 2.46e-01 0.10\n", " 'graph_cst_lns': 6/41 49% 5.84e-01 0.10\n", " 'graph_dec_lns': 2/39 54% 8.36e-01 0.10\n", " 'graph_var_lns': 5/42 48% 5.43e-01 0.10\n", " 'lb_relax_lns': 3/9 44% 3.80e-01 0.50\n", " 'rins/rens': 37/42 52% 6.60e-01 0.10\n", " 'rnd_cst_lns': 6/39 56% 8.62e-01 0.10\n", " 'rnd_var_lns': 1/37 54% 8.27e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'ls_lin_restart': 6 6 76'206 0 0 0 13'305 2'617'328\n", " 'ls_lin_restart_compound': 6 5 0 96'266 7'910 44'170 624 2'586'583\n", " 'ls_lin_restart_compound_perturb': 5 5 0 82'025 6'441 37'778 719 2'246'909\n", " 'ls_lin_restart_decay': 10 10 153'430 0 0 0 2'623 3'465'559\n", " 'ls_lin_restart_decay_compound': 11 10 0 145'012 24'961 59'987 391 4'313'270\n", " 'ls_lin_restart_decay_compound_perturb': 2 2 0 25'798 5'359 10'217 62 793'919\n", " 'ls_lin_restart_decay_perturb': 4 3 61'142 0 0 0 1'038 1'387'983\n", " 'ls_lin_restart_perturb': 6 6 78'736 0 0 0 13'795 2'754'127\n", " 'ls_restart': 6 6 77'973 0 0 0 10'539 2'821'313\n", " 'ls_restart_compound': 2 2 0 34'092 2'606 15'742 255 981'218\n", " 'ls_restart_compound_perturb': 8 7 0 121'288 10'962 55'139 748 3'456'196\n", " 'ls_restart_decay': 10 10 154'000 0 0 0 2'664 3'495'179\n", " 'ls_restart_decay_compound': 8 8 0 106'454 19'593 43'412 292 3'072'494\n", " 'ls_restart_decay_compound_perturb': 6 6 0 82'487 15'745 33'364 204 2'458'820\n", " 'ls_restart_decay_perturb': 6 4 92'024 0 0 0 1'441 2'107'052\n", " 'ls_restart_perturb': 4 4 52'151 0 0 0 10'184 1'840'218\n", "\n", "Solutions (11) Num Rank\n", " 'complete_hint': 2 [0,1]\n", " 'graph_cst_lns': 2 [1,2]\n", " 'graph_dec_lns': 2 [8,9]\n", " 'lb_relax_lns_bool_h': 2 [7,8]\n", " 'quick_restart_no_lp': 6 [2,11]\n", " 'rins_lp_lns': 4 [5,7]\n", " 'rnd_cst_lns': 4 [4,10]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 156\n", " 'max_lp': 2\n", " 'pseudo_costs': 1\n", " 'quick_restart': 1\n", "\n", "Solution repositories Added Queried Synchro\n", " 'alternative_path': 18 63 17\n", " 'best_solutions': 80 351 56\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 171 42 143\n", " 'pump': 0 0\n", "\n", "Clauses shared #Exported #Imported #BinaryRead #BinaryTotal\n", " 'core': 168 424 0 0\n", " 'default_lp': 5 265 0 0\n", " 'lb_tree_search': 0 540 0 0\n", " 'max_lp': 2 538 0 0\n", " 'no_lp': 359 223 0 0\n", " 'objective_lb_search': 0 0 0 0\n", " 'probing': 0 0 0 0\n", " 'pseudo_costs': 1 539 0 0\n", " 'quick_restart': 1 540 0 0\n", " 'quick_restart_no_lp': 141 420 0 0\n", " 'reduced_costs': 0 11 0 0\n", "\n", "LRAT_status: NA\n", "[Scaling] scaled_objective_bound: 229289 corrected_bound: 229289 delta: 2.15409e-06\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 240715.159901454\n", "best_bound: 229289.2848744611\n", "integers: 0\n", "booleans: 0\n", "conflicts: 0\n", "branches: 0\n", "propagations: 0\n", "integer_propagations: 0\n", "restarts: 0\n", "lp_iterations: 0\n", "walltime: 20.0234\n", "usertime: 20.0234\n", "deterministic_time: 114.643\n", "gap_integral: 1073.08\n", "solution_fingerprint: 0x91194cc2586fc39b\n", "\n" ] } ], "source": [ "res_milp = wfn.optimize(router=milp_router)" ] }, { "cell_type": "code", "execution_count": 23, "id": "c4d1f9b9", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'router': 'MILPRouter',\n", " 'capacity': 8,\n", " 'solver_name': 'ortools.cp_sat',\n", " 'mip_gap': 0.005,\n", " 'time_limit': 20,\n", " 'topology': ,\n", " 'feeder_route': ,\n", " 'feeder_limit': ,\n", " 'balanced': False,\n", " 'runtime': 20.031379,\n", " 'bound': 229289.28487446107,\n", " 'objective': 240715.159901454,\n", " 'relgap': 0.04746637075816307,\n", " 'termination': 'FEASIBLE'}" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.solution_info()" ] }, { "cell_type": "code", "execution_count": 24, "id": "acd659f9", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "240742.12313570912" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn.length()" ] }, { "cell_type": "code", "execution_count": 25, "id": "1569125c", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "Σλ = 240 742 m(+0) SS1: 12κ = 8, T = 95" ], "text/plain": [ "" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }