{ "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 `MILP` class.\n", "You must provide:\n", "\n", "* `solver_name`: the MILP solver to use (e.g., `'ortools'`, `'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', 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.9 ms ± 6.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop 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, 'iterations': 83}" ] }, "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": [ "264936.30102115136" ] }, "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": [ "Σλ = 264936 m(+1) SS1: 13κ = 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", " 'feeders_above_min': None,\n", " 'complete': False,\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': 406089763685306098,\n", " 'nbIter': 20000,\n", " 'nbIterTraces': 500,\n", " 'timeLimit': 1,\n", " 'useSwapStar': True,\n", " 'runtime': 1.0}" ] }, "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": [ "243082.83829893867" ] }, "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": [ "Σλ = 243083 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", " 2025-09-23T13:36:48.418293\n", " image/svg+xml\n", " \n", " \n", " Matplotlib v3.10.6, https://matplotlib.org/\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')\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": [ "Using warm start: the model is initialized with the provided solution S.\n", "\n", "\n", "Starting CP-SAT solver v9.14.6206\n", "Parameters: max_time_in_seconds: 20 log_search_progress: true relative_gap_limit: 0.005\n", "Setting number of workers to 16\n", "\n", "Initial optimization model '': (model_fingerprint: 0x8c8bfd2553670828)\n", "#Variables: 1'690 (#bools: 845 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", "#kAtMostOne: 635 (#literals: 1'926)\n", "#kLinear1: 1'690 (#enforced: 1'690)\n", "#kLinear3: 4\n", "#kLinearN: 284 (#terms: 4'213)\n", "\n", "Starting presolve at 0.01s\n", "The solution hint is complete and is feasible.\n", "[Scaling] Floating point objective has 845 terms with magnitude in [1409.66, 22631.9] average = 4594.28\n", "[Scaling] Objective coefficient relative error: 1.60816e-10\n", "[Scaling] Objective worst-case absolute error: 5.3597e-05\n", "[Scaling] Objective scaling factor: 2.09715e+06\n", " 6.44e-04s 0.00e+00d [DetectDominanceRelations] \n", " 1.53e-02s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 1.18e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=730 \n", " 4.47e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 7.18e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 6'328 nodes and 11'931 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0010796 dtime: 0.00115685\n", " 4.13e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 1.39e-02s 3.73e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=1'690 \n", " 7.75e-04s 3.79e-04d [MaxClique] Merged 635(1'926 literals) into 330(1'316 literals) at_most_ones. \n", " 6.37e-04s 0.00e+00d [DetectDominanceRelations] \n", " 4.74e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 6.94e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 8.53e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 5.78e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.00e-04s 1.43e-05d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=193 #num_inclusions=96 \n", " 6.64e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 9.04e-03s 3.72e-04d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=427 #num_inclusions=425 \n", " 1.16e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] \n", " 8.52e-04s 2.83e-04d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 5.90e-04s 3.25e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 1.05e-04s 1.24e-05d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=179 \n", " 4.13e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 7.00e-04s 0.00e+00d [DetectDominanceRelations] \n", " 9.15e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 5.07e-04s 0.00e+00d [DetectDominanceRelations] \n", " 6.08e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.67e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 4.32e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 5'717 nodes and 9'866 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0015244 dtime: 0.00104489\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] [0.000574s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0007491s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n", " 3.27e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 1.05e-02s 3.45e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=1'690 \n", " 5.17e-04s 3.69e-04d [MaxClique] \n", " 1.06e-03s 0.00e+00d [DetectDominanceRelations] \n", " 5.63e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 8.85e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 5.96e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 4.07e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 6.19e-04s 1.07e-05d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=192 #num_inclusions=95 \n", " 5.61e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 3.92e-04s 6.76e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=426 \n", " 8.20e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] \n", " 8.84e-04s 2.79e-04d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 5.40e-04s 3.25e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 8.56e-05s 1.24e-05d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=179 \n", " 4.16e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 6.71e-04s 0.00e+00d [DetectDominanceRelations] \n", " 6.90e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.36e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::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 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 1690 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 95 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 '': (model_fingerprint: 0x92e17b2da8d8fc2e)\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.0010637 dtime: 0.00104362\n", "\n", "Preloading model.\n", "#Bound 0.13s best:inf next:[160817.074,2309766.32] initial_domain\n", "#1 0.13s best:242931.791 next:[160817.074,242931.791] complete_hint\n", "#Model 0.14s var:1690/1690 constraints:2307/2307\n", "\n", "Starting search at 0.14s 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", "#Bound 0.20s best:242931.791 next:[162472.38,242931.791] am1_presolve (num_literals=750 num_am1=34 increase=3471428032 work_done=2720)\n", "#Bound 0.22s best:242931.791 next:[188354.862,242931.791] default_lp\n", "#Bound 0.22s best:242931.791 next:[189781.728,242931.791] pseudo_costs\n", "#Bound 0.26s best:242931.791 next:[189787.863,242931.791] reduced_costs\n", "#Bound 0.28s best:242931.791 next:[189886.17,242931.791] reduced_costs\n", "#2 0.29s best:242923.237 next:[189886.17,242923.237] quick_restart_no_lp (fixed_bools=0/888)\n", "#Bound 0.30s best:242923.237 next:[223973.897,242923.237] max_lp\n", "#3 0.32s best:242907.625 next:[223973.897,242907.625] quick_restart_no_lp (fixed_bools=0/894)\n", "#4 0.43s best:242499.317 next:[223973.897,242499.317] quick_restart_no_lp (fixed_bools=0/903)\n", "#Bound 0.46s best:242499.317 next:[225385.939,242499.317] max_lp\n", "#5 0.46s best:242498.683 next:[225385.939,242498.683] quick_restart_no_lp (fixed_bools=0/903)\n", "#Bound 0.48s best:242498.683 next:[225492.229,242498.683] lb_tree_search\n", "#6 0.48s best:242063.731 next:[225492.229,242063.731] rins_lp_lns (d=5.00e-01 s=23 t=0.10 p=0.00 stall=0 h=base)\n", "#7 0.49s best:241654.789 next:[225492.229,241654.789] rins_lp_lns (d=5.00e-01 s=23 t=0.10 p=0.00 stall=0 h=base) [combined with: quick_restart_no_lp...]\n", "#Bound 0.64s best:241654.789 next:[226110.959,241654.789] max_lp\n", "#Bound 0.67s best:241654.789 next:[226273.297,241654.789] lb_tree_search\n", "#8 0.85s best:241654.154 next:[226273.297,241654.154] quick_restart_no_lp (fixed_bools=0/933)\n", "#Bound 0.88s best:241654.154 next:[226518.351,241654.154] max_lp\n", "#Bound 0.92s best:241654.154 next:[226563.242,241654.154] lb_tree_search\n", "#9 1.02s best:241477.762 next:[226563.242,241477.762] rins_lp_lns (d=7.07e-01 s=29 t=0.10 p=1.00 stall=0 h=base)\n", "#10 1.03s best:241477.127 next:[226563.242,241477.127] rins_lp_lns (d=7.07e-01 s=29 t=0.10 p=1.00 stall=0 h=base) [combined with: quick_restart_no_lp...]\n", "#11 1.04s best:241101.331 next:[226563.242,241101.331] rnd_var_lns (d=8.14e-01 s=30 t=0.10 p=1.00 stall=2 h=base)\n", "#12 1.05s best:240923.669 next:[226563.242,240923.669] rnd_var_lns (d=8.14e-01 s=30 t=0.10 p=1.00 stall=2 h=base) [combined with: rins_lp_lns (d=7.07e...]\n", "#Bound 1.16s best:240923.669 next:[226957.188,240923.669] lb_tree_search\n", "#Bound 1.18s best:240923.669 next:[226990.815,240923.669] max_lp\n", "#Bound 1.52s best:240923.669 next:[227472.946,240923.669] max_lp\n", "#13 2.08s best:240715.16 next:[227472.946,240715.16] lb_relax_lns_int_h (d=5.00e-01 s=35 t=0.50 p=0.00 stall=0 h=base)\n", "#Bound 2.52s best:240715.16 next:[227789.346,240715.16] max_lp\n", "#Bound 4.40s best:240715.16 next:[228049.802,240715.16] max_lp\n", "#Bound 4.93s best:240715.16 next:[228173.016,240715.16] max_lp\n", "#Bound 6.31s best:240715.16 next:[228326.202,240715.16] max_lp\n", "#Bound 7.79s best:240715.16 next:[228434.497,240715.16] max_lp\n", "#Bound 9.43s best:240715.16 next:[228579.246,240715.16] max_lp\n", "#Bound 11.55s best:240715.16 next:[228611.358,240715.16] lb_tree_search (nodes=16/16 rc=2 decisions=156 @root=3 restarts=0 lp_iters=[0, 0, 3'067, 1'224]) \n", "#Bound 14.75s best:240715.16 next:[228643.236,240715.16] max_lp\n", "#Bound 17.51s best:240715.16 next:[228697.398,240715.16] lb_tree_search\n", "#Bound 19.41s best:240715.16 next:[228748.178,240715.16] lb_tree_search\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [ 19.86s, 19.86s] 19.86s 0.00ns 19.86s 1 [ 12.32s, 12.32s] 12.32s 0.00ns 12.32s\n", " 'default_lp': 1 [ 19.86s, 19.86s] 19.86s 0.00ns 19.86s 1 [ 3.27s, 3.27s] 3.27s 0.00ns 3.27s\n", " 'feasibility_pump': 87 [ 77.00us, 688.72ms] 94.89ms 203.32ms 8.26s 16 [163.16ms, 322.49ms] 229.30ms 42.80ms 3.67s\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': 33 [ 21.00ms, 1.20s] 273.48ms 228.71ms 9.02s 33 [ 97.09us, 100.48ms] 57.77ms 44.76ms 1.91s\n", " 'graph_cst_lns': 34 [ 12.00ms, 534.33ms] 285.17ms 179.81ms 9.70s 34 [ 10.00ns, 100.25ms] 62.09ms 44.29ms 2.11s\n", " 'graph_dec_lns': 34 [ 13.08ms, 959.71ms] 270.27ms 245.18ms 9.19s 34 [ 10.00ns, 100.30ms] 50.71ms 49.38ms 1.72s\n", " 'graph_var_lns': 39 [ 17.41ms, 698.12ms] 242.43ms 190.08ms 9.45s 39 [ 10.00ns, 100.23ms] 53.79ms 46.08ms 2.10s\n", " 'lb_relax_lns': 7 [680.19ms, 2.02s] 1.28s 509.74ms 8.94s 7 [167.35ms, 557.21ms] 358.76ms 176.91ms 2.51s\n", " 'lb_tree_search': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 2.38s, 2.38s] 2.38s 0.00ns 2.38s\n", " 'ls': 40 [184.82ms, 293.91ms] 216.54ms 22.33ms 8.66s 40 [ 68.00ms, 100.02ms] 99.21ms 5.00ms 3.97s\n", " 'ls_lin': 41 [177.04ms, 295.13ms] 208.66ms 24.97ms 8.55s 41 [ 94.92ms, 100.05ms] 99.89ms 786.57us 4.10s\n", " 'max_lp': 1 [ 19.86s, 19.86s] 19.86s 0.00ns 19.86s 1 [ 3.76s, 3.76s] 3.76s 0.00ns 3.76s\n", " 'no_lp': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 8.76s, 8.76s] 8.76s 0.00ns 8.76s\n", " 'objective_lb_search': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 6.35s, 6.35s] 6.35s 0.00ns 6.35s\n", " 'probing': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 1.42s, 1.42s] 1.42s 0.00ns 1.42s\n", " 'pseudo_costs': 1 [ 19.85s, 19.85s] 19.85s 0.00ns 19.85s 1 [ 4.70s, 4.70s] 4.70s 0.00ns 4.70s\n", " 'quick_restart': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 5.44s, 5.44s] 5.44s 0.00ns 5.44s\n", " 'quick_restart_no_lp': 1 [ 19.85s, 19.85s] 19.85s 0.00ns 19.85s 1 [ 8.91s, 8.91s] 8.91s 0.00ns 8.91s\n", " 'reduced_costs': 1 [ 19.90s, 19.90s] 19.90s 0.00ns 19.90s 1 [ 6.03s, 6.03s] 6.03s 0.00ns 6.03s\n", " 'rins/rens': 34 [ 1.50ms, 513.31ms] 259.48ms 199.16ms 8.82s 26 [ 5.61us, 100.20ms] 74.96ms 39.92ms 1.95s\n", " 'rnd_cst_lns': 34 [ 17.38ms, 969.74ms] 263.79ms 237.42ms 8.97s 30 [114.00ns, 100.38ms] 53.59ms 45.26ms 1.61s\n", " 'rnd_var_lns': 28 [ 24.42ms, 985.05ms] 358.78ms 256.97ms 10.05s 28 [182.00ns, 100.31ms] 63.04ms 42.66ms 1.77s\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 879 259'736 565'400 23'197 3'973'876 11'536'604\n", " 'default_lp': 929 1'066 12'082 5'156 100'141 410'934\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': 845 0 14'984 8'655 63'514 196'282\n", " 'max_lp': 845 243 6'058 3'432 35'522 151'875\n", " 'no_lp': 845 133'542 318'985 24'846 8'884'105 29'057'923\n", " 'objective_lb_search': 885 702 13'177 6'857 76'319 318'571\n", " 'probing': 866 10 2'074 1'775 13'686 46'606\n", " 'pseudo_costs': 845 1'220 12'775 5'174 97'083 440'561\n", " 'quick_restart': 893 117 31'951 17'381 137'496 591'224\n", " 'quick_restart_no_lp': 1'227 41'505 922'898 29'430 4'827'624 17'823'688\n", " 'reduced_costs': 848 597 33'804 15'622 136'030 671'803\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 247'944 2'710'816 17'487'283 15'459'542 2'216 7'771 81'762 0 586 8'933 1'598\n", " 'default_lp': 1'015 59'754 155'471 0 2 386 3'018 0 0 0 0\n", " 'fs_random': 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\n", " 'fs_random_quick_restart_no_lp': 0 0 0 0 0 0 0 0 0 0 0\n", " 'lb_tree_search': 0 0 0 0 0 760 6'000 0 0 0 0\n", " 'max_lp': 228 12'736 46'020 0 1 190 1'500 0 0 0 0\n", " 'no_lp': 127'549 2'432'152 10'682'341 9'384'584 1'178 3'907 40'791 0 247 4'387 677\n", " 'objective_lb_search': 677 40'042 29'710 0 0 587 4'637 0 1 13 4\n", " 'probing': 10 576 3'086 0 0 0 0 0 0 0 0\n", " 'pseudo_costs': 1'138 56'843 161'874 0 4 381 3'003 0 1 4 0\n", " 'quick_restart': 107 4'570 11'111 0 0 1'739 13'581 0 5 22 3\n", " 'quick_restart_no_lp': 38'365 1'417'459 4'177'244 2'298'883 205 11'919 76'718 0 1'280 12'151 812\n", " 'reduced_costs': 556 18'404 99'069 0 0 1'523 12'006 0 0 0 0\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 63'564 3'188 4'463 0 90\n", " 'lb_tree_search': 1 10'923 2'815 252 12 0\n", " 'max_lp': 1 26'900 2'788 1'146 47 27\n", " 'objective_lb_search': 1 75'624 3'426 2'377 1 24\n", " 'probing': 1 9'465 5'806 240 0 1\n", " 'pseudo_costs': 1 89'573 2'684 3'525 445 272\n", " 'quick_restart': 1 41'791 4'175 1'198 0 6\n", " 'reduced_costs': 1 72'547 3'775 2'078 262 108\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 888 rows, 1596 columns, 5324 entries\n", " 'lb_tree_search': 2228 rows, 1690 columns, 41979 entries\n", " 'max_lp': 974 rows, 1690 columns, 11927 entries\n", " 'objective_lb_search': 1011 rows, 1596 columns, 8460 entries\n", " 'probing': 2646 rows, 1596 columns, 44392 entries\n", " 'pseudo_costs': 927 rows, 1690 columns, 5698 entries\n", " 'quick_restart': 1358 rows, 1596 columns, 15183 entries\n", " 'reduced_costs': 1576 rows, 1690 columns, 16003 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 1 4'535 0 5'293 0\n", " 'lb_tree_search': 0 0 264 0 55'311 0\n", " 'max_lp': 0 0 1'220 0 38'641 0\n", " 'objective_lb_search': 0 0 2'391 0 11'340 0\n", " 'probing': 0 12 232 0 59'981 0\n", " 'pseudo_costs': 0 0 4'173 0 4'642 0\n", " 'quick_restart': 0 0 1'195 0 24'046 0\n", " 'reduced_costs': 0 0 2'429 0 15'983 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 5'988 18 0 0 0 13 85 3'188/7'494\n", " 'lb_tree_search': 5'967 524 0 0 0 903 39 2'815/5'225\n", " 'max_lp': 5'940 342 0 0 0 604 23 2'788/5'311\n", " 'objective_lb_search': 6'226 75 0 0 0 18 113 3'426/7'190\n", " 'probing': 8'606 427 0 0 0 424 188 5'806/11'667\n", " 'pseudo_costs': 5'836 24 0 0 0 12 45 2'684/5'842\n", " 'quick_restart': 6'975 249 0 0 0 193 126 4'175/8'271\n", " 'reduced_costs': 6'927 160 0 0 0 97 88 3'775/7'376\n", "\n", "Lp Cut default_lp max_lp pseudo_costs quick_restart reduced_costs lb_tree_search probing objective_lb_search\n", " CG_FF: 32 8 26 29 33 5 33 33\n", " CG_K: 17 5 13 16 11 1 21 20\n", " CG_KL: 4 - 3 4 3 - 5 5\n", " CG_R: 51 33 33 50 47 21 84 43\n", " CG_RB: 91 66 70 103 113 53 142 92\n", " CG_RBP: 47 19 21 47 25 8 74 52\n", " IB: 1'245 198 1'292 968 1'145 1 738 910\n", " MIR_1_FF: 139 135 55 227 129 147 354 177\n", " MIR_1_K: 48 5 17 70 22 1 94 56\n", " MIR_1_KL: 25 - 7 34 9 - 44 21\n", " MIR_1_R: 1 - 1 3 - - 12 1\n", " MIR_1_RB: 79 40 30 121 65 57 225 98\n", " MIR_1_RBP: 41 9 11 89 21 13 188 70\n", " MIR_2_FF: 131 168 80 230 158 202 356 141\n", " MIR_2_K: 70 9 23 85 35 11 104 76\n", " MIR_2_KL: 22 - 11 23 12 5 27 22\n", " MIR_2_R: 7 4 7 15 9 8 22 9\n", " MIR_2_RB: 101 162 86 162 162 188 279 143\n", " MIR_2_RBP: 47 33 25 103 52 35 203 99\n", " MIR_3_FF: 102 193 76 149 160 206 227 117\n", " MIR_3_K: 58 28 27 80 41 20 126 77\n", " MIR_3_KL: 12 - 9 12 16 1 18 9\n", " MIR_3_R: 8 8 12 10 18 9 12 10\n", " MIR_3_RB: 99 185 92 137 168 200 187 102\n", " MIR_3_RBP: 48 53 18 97 46 60 166 82\n", " MIR_4_FF: 54 148 45 92 129 171 142 77\n", " MIR_4_K: 45 43 26 59 38 35 75 51\n", " MIR_4_KL: 3 - 5 5 5 2 8 6\n", " MIR_4_R: 6 12 8 8 11 5 10 7\n", " MIR_4_RB: 60 139 72 85 140 140 111 74\n", " MIR_4_RBP: 27 57 17 75 40 64 78 32\n", " MIR_5_FF: 35 118 20 53 82 120 100 38\n", " MIR_5_K: 24 32 15 36 23 35 87 45\n", " MIR_5_KL: 2 1 3 3 1 6 11 5\n", " MIR_5_R: 3 11 6 6 7 10 8 6\n", " MIR_5_RB: 31 92 44 41 92 85 64 36\n", " MIR_5_RBP: 9 37 8 48 24 41 86 28\n", " MIR_6_FF: 14 71 26 35 56 79 43 40\n", " MIR_6_K: 17 28 17 30 15 26 48 30\n", " MIR_6_KL: 3 21 11 7 22 22 16 4\n", " MIR_6_R: - 7 7 3 2 8 4 4\n", " MIR_6_RB: 15 48 31 17 47 48 27 23\n", " MIR_6_RBP: 6 41 17 28 31 44 63 23\n", " ZERO_HALF_FF: 39 8 21 48 45 7 21 40\n", " ZERO_HALF_K: 12 2 11 12 5 - 16 11\n", " ZERO_HALF_KL: 3 - 3 4 1 - 1 3\n", " ZERO_HALF_R: 198 435 184 473 358 512 830 280\n", " ZERO_HALF_RB: 42 64 29 108 76 89 137 65\n", " ZERO_HALF_RBP: 15 12 13 35 25 14 79 33\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 3/33 48% 3.43e-01 0.10\n", " 'graph_cst_lns': 5/34 50% 6.58e-01 0.10\n", " 'graph_dec_lns': 5/34 50% 7.14e-01 0.10\n", " 'graph_var_lns': 4/39 49% 6.05e-01 0.10\n", " 'lb_relax_lns': 3/7 43% 3.48e-01 0.50\n", " 'rins/rens': 31/33 45% 3.75e-01 0.10\n", " 'rnd_cst_lns': 2/30 53% 7.65e-01 0.10\n", " 'rnd_var_lns': 4/28 54% 8.10e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'ls_lin_restart': 10 5 124'692 0 0 0 23'072 4'912'338\n", " 'ls_lin_restart_compound': 7 7 0 112'485 8'739 51'864 844 3'206'204\n", " 'ls_lin_restart_compound_perturb': 5 5 0 73'611 6'892 33'349 507 2'152'883\n", " 'ls_lin_restart_decay': 5 3 77'347 0 0 0 1'249 1'765'993\n", " 'ls_lin_restart_decay_compound_perturb': 4 3 0 53'495 8'782 22'353 93 1'557'018\n", " 'ls_lin_restart_decay_perturb': 6 4 93'542 0 0 0 1'500 2'157'277\n", " 'ls_lin_restart_perturb': 4 4 52'694 0 0 0 7'860 1'924'036\n", " 'ls_restart': 3 2 38'881 0 0 0 5'923 1'413'726\n", " 'ls_restart_compound': 9 6 0 145'891 14'046 65'906 675 4'148'495\n", " 'ls_restart_compound_perturb': 5 5 0 83'847 7'673 38'082 563 2'249'684\n", " 'ls_restart_decay': 3 3 46'555 0 0 0 784 1'060'799\n", " 'ls_restart_decay_compound': 6 4 0 75'154 12'297 31'415 136 2'602'984\n", " 'ls_restart_decay_compound_perturb': 5 3 0 61'529 10'198 25'660 110 1'832'280\n", " 'ls_restart_decay_perturb': 7 6 108'030 0 0 0 1'878 2'430'435\n", " 'ls_restart_perturb': 2 2 26'046 0 0 0 4'833 936'592\n", "\n", "Solutions (13) Num Rank\n", " 'complete_hint': 1 [1,1]\n", " 'lb_relax_lns_int_h': 1 [13,13]\n", " 'quick_restart_no_lp': 5 [2,8]\n", " 'rins_lp_lns': 4 [6,10]\n", " 'rnd_var_lns': 2 [11,12]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'default_lp': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 7\n", " 'max_lp': 13\n", " 'pseudo_costs': 1\n", " 'reduced_costs': 2\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 73 570 48\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 124 20 103\n", " 'pump': 321 14\n", "\n", "[Scaling] scaled_objective_bound: 228748 corrected_bound: 228748 delta: -1.01302e-06\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 240715.1599014539\n", "best_bound: 228748.1782036421\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.158\n", "usertime: 20.158\n", "deterministic_time: 90.7637\n", "gap_integral: 853.326\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',\n", " 'topology': ,\n", " 'feeder_route': ,\n", " 'feeder_limit': ,\n", " 'max_feeders': 0,\n", " 'runtime': 20.1580118,\n", " 'bound': 228748.1782036421,\n", " 'objective': 240715.1599014539,\n", " 'relgap': 0.0497142834822325,\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": [ "240866.20757545892" ] }, "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": [ "Σλ = 240866 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 }