{
"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": [
"42.5 ms ± 9.89 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, '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": [
""
],
"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",
" 'feeders_exact': 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': 1192292722,\n",
" 'nbIter': 20000,\n",
" 'nbIterTraces': 500,\n",
" 'timeLimit': 1,\n",
" 'useSwapStar': True,\n",
" 'runtime': 1.000530305}"
]
},
"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": [
"243074.2848236982"
]
},
"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": [
""
],
"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"
],
"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: 0xfdc70ec361bce877)\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",
" 4.64e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 1.05e-02s 0.00e+00d [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n",
" 4.34e-05s 0.00e+00d [ExtractEncodingFromLinear] #potential_supersets=355 \n",
" 4.62e-04s 0.00e+00d [DetectDuplicateColumns] \n",
" 1.91e-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.000668215 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] [1.7987e-05s] clauses:375 literals:750 vars:750 one_side_vars:750 simple_definition:0 singleton_clauses:0\n",
"[SAT presolve] [3.5018e-05s] clauses:375 literals:750 vars:750 one_side_vars:750 simple_definition:0 singleton_clauses:0\n",
" 2.72e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n",
" 2.20e-02s 1.04e-02d [Probe] #probed=3'380 #new_binary_clauses=845 \n",
" 5.54e-04s 5.46e-04d [MaxClique] Merged 635 constraints with 1'926 literals into 330 constraints with 1'316 literals\n",
" 7.89e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 4.99e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n",
" 1.69e-03s 0.00e+00d [ProcessAtMostOneAndLinear] #num_changes=845 \n",
" 1.76e-04s 0.00e+00d [DetectDuplicateConstraints] \n",
" 1.62e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n",
" 2.87e-04s 1.46e-05d [DetectDominatedLinearConstraints] #relevant_constraints=193 #num_inclusions=96 \n",
" 3.35e-05s 0.00e+00d [DetectDifferentVariables] \n",
" 3.79e-03s 3.73e-04d [ProcessSetPPC] #relevant_constraints=427 #num_inclusions=425 \n",
" 1.78e-04s 0.00e+00d [TransformClausesToExactlyOne] #num_amos=330 \n",
" 6.31e-04s 0.00e+00d [DetectEncodedComplexDomains] \n",
" 1.71e-04s 0.00e+00d [FindAlmostIdenticalLinearConstraints] \n",
" 2.91e-04s 2.83e-04d [FindBigAtMostOneAndLinearOverlap] \n",
" 2.15e-04s 3.25e-04d [FindBigVerticalLinearOverlap] \n",
" 2.72e-05s 1.24e-05d [FindBigHorizontalLinearOverlap] #linears=179 \n",
" 1.28e-05s 0.00e+00d [MergeClauses] \n",
" 3.86e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 6.45e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n",
" 6.34e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 3.39e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n",
" 1.12e-04s 0.00e+00d [DetectDuplicateColumns] \n",
" 3.12e-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.000667768 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] [1.0851e-05s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n",
"[SAT presolve] [3.5888e-05s] clauses:70 literals:140 vars:140 one_side_vars:140 simple_definition:0 singleton_clauses:0\n",
" 2.21e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n",
" 9.34e-03s 3.44e-03d [Probe] #probed=1'690 \n",
" 3.75e-04s 3.69e-04d [MaxClique] \n",
" 4.25e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 3.80e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n",
" 2.08e-04s 0.00e+00d [ProcessAtMostOneAndLinear] \n",
" 4.09e-04s 0.00e+00d [DetectDuplicateConstraints] \n",
" 1.88e-04s 0.00e+00d [DetectDuplicateConstraintsWithDifferentEnforcements] \n",
" 2.59e-04s 1.10e-05d [DetectDominatedLinearConstraints] #relevant_constraints=192 #num_inclusions=95 \n",
" 3.87e-05s 0.00e+00d [DetectDifferentVariables] \n",
" 1.62e-04s 7.32e-06d [ProcessSetPPC] #relevant_constraints=426 \n",
" 1.66e-04s 0.00e+00d [TransformClausesToExactlyOne] #num_amos=330 \n",
" 7.96e-04s 0.00e+00d [DetectEncodedComplexDomains] \n",
" 4.36e-05s 0.00e+00d [FindAlmostIdenticalLinearConstraints] \n",
" 2.89e-04s 2.79e-04d [FindBigAtMostOneAndLinearOverlap] \n",
" 1.99e-04s 3.25e-04d [FindBigVerticalLinearOverlap] \n",
" 3.08e-05s 1.24e-05d [FindBigHorizontalLinearOverlap] #linears=179 \n",
" 1.22e-05s 0.00e+00d [MergeClauses] \n",
" 3.98e-04s 0.00e+00d [DetectDominanceRelations] \n",
" 3.08e-03s 0.00e+00d [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n",
" 5.66e-06s 0.00e+00d [MergeNoOverlap] \n",
" 6.21e-06s 0.00e+00d [MergeNoOverlap2D] \n",
" 3.14e-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: 0x2c18320fdb1eb53c)\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.000500931 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:242923.237 next:[160817.074,242923.237] 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",
"#Bound 0.13s best:242923.237 next:[162472.38,242923.237] am1_presolve (num_literals=750 num_am1=34 increase=1735714016 work_done=2720)\n",
"#Bound 0.13s best:242923.237 next:[188354.862,242923.237] default_lp\n",
"#Bound 0.13s best:242923.237 next:[189781.728,242923.237] reduced_costs\n",
"#Bound 0.18s best:242923.237 next:[223973.897,242923.237] lb_tree_search\n",
"#2 0.20s best:242907.625 next:[223973.897,242907.625] quick_restart_no_lp (fixed_bools=0/901)\n",
"#3 0.21s best:242906.99 next:[223973.897,242906.99] quick_restart_no_lp (fixed_bools=0/901)\n",
"#Bound 0.34s best:242906.99 next:[225413.966,242906.99] max_lp\n",
"#4 0.38s best:242073.91 next:[225413.966,242073.91] graph_var_lns (d=7.07e-01 s=24 t=0.10 p=1.00 stall=1 h=base)\n",
"#5 0.53s best:241885.435 next:[225413.966,241885.435] graph_arc_lns (d=5.00e-01 s=14 t=0.10 p=0.00 stall=0 h=base) [combined with: graph_var_lns (d=7.0...]\n",
"#6 0.62s best:241665.602 next:[225413.966,241665.602] graph_cst_lns (d=7.07e-01 s=25 t=0.10 p=1.00 stall=1 h=base)\n",
"#7 0.63s best:241477.127 next:[225413.966,241477.127] graph_cst_lns (d=7.07e-01 s=25 t=0.10 p=1.00 stall=1 h=base) [combined with: graph_arc_lns (d=5.0...]\n",
"#Bound 0.90s best:241477.127 next:[225975.405,241477.127] lb_tree_search\n",
"#Bound 0.91s best:241477.127 next:[226137.83,241477.127] max_lp\n",
"#Bound 1.05s best:241477.127 next:[226750.888,241477.127] lb_tree_search\n",
"#Bound 1.10s best:241477.127 next:[226769.281,241477.127] lb_tree_search (nodes=1/1 rc=0 decisions=55 @root=2 restarts=0 lp_iters=[0, 0, 68, 7]) \n",
"#Bound 1.11s best:241477.127 next:[226809.158,241477.127] max_lp\n",
"#Bound 1.29s best:241477.127 next:[227055.05,241477.127] lb_tree_search\n",
"#Bound 1.30s best:241477.127 next:[227055.22,241477.127] lb_tree_search\n",
"#Bound 1.33s best:241477.127 next:[227243.958,241477.127] max_lp\n",
"#Bound 1.41s best:241477.127 next:[227473.456,241477.127] max_lp\n",
"#Bound 1.47s best:241477.127 next:[227502.077,241477.127] max_lp\n",
"#Bound 1.55s best:241477.127 next:[227565.717,241477.127] lb_tree_search\n",
"#Bound 1.59s best:241477.127 next:[227567.568,241477.127] lb_tree_search (nodes=2/2 rc=0 decisions=73 @root=6 restarts=0 lp_iters=[0, 0, 200, 12]) \n",
"#8 1.63s best:240715.16 next:[227567.568,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 1.69s best:240715.16 next:[227717.228,240715.16] lb_tree_search\n",
"#Bound 1.70s best:240715.16 next:[227831.057,240715.16] lb_tree_search (nodes=2/2 rc=0 decisions=74 @root=6 restarts=0 lp_iters=[0, 0, 527, 12]) \n",
"#Bound 1.71s best:240715.16 next:[227836.523,240715.16] lb_tree_search\n",
"#Bound 2.25s best:240715.16 next:[227960.022,240715.16] max_lp\n",
"#Bound 2.30s best:240715.16 next:[228026.776,240715.16] lb_tree_search\n",
"#Bound 2.42s best:240715.16 next:[228088.08,240715.16] lb_tree_search (nodes=2/2 rc=0 decisions=78 @root=10 restarts=0 lp_iters=[0, 0, 730, 12]) [skipped_logs=3]\n",
"#Bound 3.42s best:240715.16 next:[228352.508,240715.16] lb_tree_search (nodes=2/2 rc=0 decisions=82 @root=12 restarts=0 lp_iters=[0, 0, 1'076, 12]) [skipped_logs=3]\n",
"#Bound 4.97s best:240715.16 next:[228607.596,240715.16] lb_tree_search (nodes=5/5 rc=1 decisions=149 @root=14 restarts=0 lp_iters=[0, 0, 2'002, 82]) [skipped_logs=8]\n",
"#Bound 6.00s best:240715.16 next:[228819.679,240715.16] lb_tree_search (nodes=12/12 rc=2 decisions=262 @root=14 restarts=0 lp_iters=[0, 0, 4'491, 323]) [skipped_logs=11]\n",
"#Bound 7.03s best:240715.16 next:[229025.048,240715.16] lb_tree_search (nodes=18/18 rc=2 decisions=330 @root=14 restarts=0 lp_iters=[0, 0, 6'712, 651]) [skipped_logs=11]\n",
"#Bound 7.99s best:240715.16 next:[229100.375,240715.16] lb_tree_search (nodes=27/27 rc=7 decisions=430 @root=14 restarts=0 lp_iters=[0, 0, 8'354, 1'062]) [skipped_logs=8]\n",
"#Bound 8.85s best:240715.16 next:[229180.74,240715.16] lb_tree_search (nodes=39/39 rc=8 decisions=546 @root=14 restarts=0 lp_iters=[0, 0, 9'780, 2'184]) [skipped_logs=7]\n",
"#Bound 9.88s best:240715.16 next:[229200.989,240715.16] lb_tree_search (nodes=47/47 rc=13 decisions=608 @root=14 restarts=0 lp_iters=[0, 0, 11'967, 2'255]) [skipped_logs=4]\n",
"#Bound 10.52s best:240715.16 next:[229227.749,240715.16] lb_tree_search (nodes=49/49 rc=13 decisions=654 @root=14 restarts=0 lp_iters=[0, 0, 13'477, 2'403]) [skipped_logs=4]\n",
"#Bound 12.00s best:240715.16 next:[229249.686,240715.16] lb_tree_search (nodes=49/49 rc=13 decisions=670 @root=16 restarts=0 lp_iters=[0, 0, 14'356, 2'403]) [skipped_logs=2]\n",
"#Bound 13.07s best:240715.16 next:[229281.793,240715.16] lb_tree_search (nodes=49/49 rc=14 decisions=714 @root=16 restarts=0 lp_iters=[0, 0, 16'940, 2'403]) [skipped_logs=6]\n",
"#Bound 13.91s best:240715.16 next:[229334.409,240715.16] lb_tree_search (nodes=50/50 rc=18 decisions=767 @root=16 restarts=0 lp_iters=[0, 0, 19'407, 2'682]) [skipped_logs=10]\n",
"#Bound 14.96s best:240715.16 next:[229361.736,240715.16] lb_tree_search (nodes=53/53 rc=19 decisions=856 @root=16 restarts=0 lp_iters=[0, 0, 22'350, 2'751]) [skipped_logs=5]\n",
"#Bound 16.00s best:240715.16 next:[229372.865,240715.16] lb_tree_search (nodes=55/55 rc=19 decisions=930 @root=16 restarts=0 lp_iters=[0, 0, 25'349, 3'021]) [skipped_logs=6]\n",
"#Bound 16.91s best:240715.16 next:[229408.359,240715.16] lb_tree_search (nodes=61/61 rc=22 decisions=989 @root=16 restarts=0 lp_iters=[0, 0, 28'042, 3'401]) [skipped_logs=10]\n",
"#Bound 17.01s best:240715.16 next:[229412.003,240715.16] lb_tree_search (nodes=61/61 rc=22 decisions=997 @root=16 restarts=0 lp_iters=[0, 0, 28'525, 3'401]) [skipped_logs=0]\n",
"\n",
"Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n",
" 'core': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [ 3.54ms, 9.49s] 4.75s 4.74s 9.49s\n",
" 'default_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [119.19ms, 4.60s] 2.36s 2.24s 4.72s\n",
" 'feasibility_pump': 92 [ 71.60us, 203.56ms] 5.06ms 20.83ms 465.58ms 88 [374.50us, 65.46ms] 1.13ms 6.90ms 99.14ms\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': 41 [826.00ns, 541.30ms] 223.72ms 192.67ms 9.17s 34 [ 40.25us, 100.21ms] 57.11ms 44.65ms 1.94s\n",
" 'graph_cst_lns': 26 [ 16.82ms, 1.15s] 368.47ms 262.22ms 9.58s 26 [ 10.42us, 100.18ms] 64.25ms 41.65ms 1.67s\n",
" 'graph_dec_lns': 35 [ 1.59ms, 896.72ms] 301.91ms 245.19ms 10.57s 31 [ 10.00ns, 100.14ms] 58.50ms 44.56ms 1.81s\n",
" 'graph_var_lns': 33 [ 7.91ms, 582.98ms] 279.18ms 201.79ms 9.21s 33 [ 10.00ns, 100.16ms] 58.10ms 45.82ms 1.92s\n",
" 'lb_relax_lns': 6 [403.57ms, 2.75s] 1.57s 804.28ms 9.40s 6 [103.74ms, 562.83ms] 407.59ms 211.51ms 2.45s\n",
" 'lb_tree_search': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [203.40ms, 7.59s] 3.90s 3.69s 7.79s\n",
" 'ls': 41 [116.35ms, 409.43ms] 222.45ms 61.41ms 9.12s 41 [ 57.67ms, 100.03ms] 98.98ms 6.53ms 4.06s\n",
" 'ls_lin': 38 [ 48.73ms, 511.01ms] 238.76ms 73.93ms 9.07s 38 [ 22.85ms, 100.02ms] 97.98ms 12.35ms 3.72s\n",
" 'max_lp': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [202.61ms, 7.52s] 3.86s 3.66s 7.72s\n",
" 'no_lp': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 4.18ms, 7.36s] 3.68s 3.68s 7.37s\n",
" 'objective_lb_search': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [125.81ms, 7.07s] 3.60s 3.47s 7.19s\n",
" 'probing': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [126.27ms, 4.83s] 2.48s 2.35s 4.96s\n",
" 'pseudo_costs': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 39.39ms, 4.51s] 2.28s 2.24s 4.55s\n",
" 'quick_restart': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [120.24ms, 6.12s] 3.12s 3.00s 6.24s\n",
" 'quick_restart_no_lp': 1 [ 19.92s, 19.92s] 19.92s 0.00ns 19.92s 2 [ 4.18ms, 8.51s] 4.26s 4.25s 8.51s\n",
" 'reduced_costs': 1 [ 19.91s, 19.91s] 19.91s 0.00ns 19.91s 2 [ 41.65ms, 6.38s] 3.21s 3.17s 6.42s\n",
" 'rins/rens': 29 [ 5.23ms, 1.10s] 357.45ms 304.14ms 10.37s 24 [332.18us, 100.12ms] 69.16ms 43.79ms 1.66s\n",
" 'rnd_cst_lns': 34 [ 11.93ms, 827.07ms] 355.84ms 224.51ms 12.10s 34 [136.00ns, 100.21ms] 65.38ms 41.44ms 2.22s\n",
" 'rnd_var_lns': 32 [ 11.73ms, 806.28ms] 309.91ms 237.65ms 9.92s 32 [146.00ns, 100.18ms] 55.82ms 45.89ms 1.79s\n",
"\n",
"Search stats Bools Conflicts Branches Restarts BacktrackToRoot Backtrack BoolPropag IntegerPropag\n",
" 'core': 879 294'875 620'647 323 5'540 299'354 4'654'881 13'144'334\n",
" 'default_lp': 942 1'782 12'436 2 5'171 7'337 163'768 676'405\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 16 48'145 0 23'255 25'195 196'043 671'555\n",
" 'max_lp': 845 294 32'149 3 13'115 14'384 155'069 754'679\n",
" 'no_lp': 845 93'952 305'215 900 35'438 131'805 9'231'958 29'673'774\n",
" 'objective_lb_search': 908 922 20'866 5 10'353 12'312 127'771 572'862\n",
" 'probing': 866 10 2'066 0 1'775 1'785 13'468 45'751\n",
" 'pseudo_costs': 845 1'532 25'568 5 10'699 12'969 162'245 790'738\n",
" 'quick_restart': 890 189 49'660 11 20'213 22'575 217'786 1'033'943\n",
" 'quick_restart_no_lp': 1'223 42'945 960'027 3'821 27'952 78'991 5'401'563 19'339'685\n",
" 'reduced_costs': 846 696 46'121 8 16'733 18'726 189'549 977'734\n",
"\n",
"SAT formula Fixed Equiv Total VarLeft BinaryClauses PermanentClauses TemporaryClauses\n",
" 'core': 0 0 879 879 188 1'437 9'339\n",
" 'default_lp': 0 0 942 942 528 117 1'586\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 304 5\n",
" 'max_lp': 0 0 845 845 140 301 240\n",
" 'no_lp': 0 0 845 845 140 377 7'667\n",
" 'objective_lb_search': 3 0 908 905 434 117 570\n",
" 'probing': 0 0 866 866 484 95 9\n",
" 'pseudo_costs': 0 0 845 845 140 181 1'349\n",
" 'quick_restart': 0 0 890 890 316 300 124\n",
" 'quick_restart_no_lp': 0 0 1'223 1'223 2'824 1'384 8'045\n",
" 'reduced_costs': 0 0 846 846 150 301 642\n",
"\n",
"SAT stats ClassicMinim LitRemoved LitRemovedBinary LitLearned LitForgotten Subsumed\n",
" 'core': 268'313 1'828'598 1'826'727 16'064'250 9'605'580 97'829\n",
" 'default_lp': 1'618 15'321 132'480 221'695 0 167\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': 6 13 93 307 0 11\n",
" 'max_lp': 250 5'104 9'721 28'842 0 45\n",
" 'no_lp': 86'218 2'856'898 1'406'241 7'205'909 3'045'969 43'735\n",
" 'objective_lb_search': 871 43'464 16'496 52'938 0 157\n",
" 'probing': 8 37 619 2'332 0 1\n",
" 'pseudo_costs': 1'315 15'479 143'000 265'258 0 178\n",
" 'quick_restart': 125 2'031 6'049 15'192 0 48\n",
" 'quick_restart_no_lp': 36'237 753'977 941'504 4'147'465 2'710'017 7'198\n",
" 'reduced_costs': 451 3'976 33'570 97'848 0 42\n",
"\n",
"Vivification Clauses Decisions LitTrue Subsumed LitRemoved DecisionReused Conflicts\n",
" 'core': 2'438 36'525 0 331 6'117 3'588 8\n",
" 'default_lp': 404 3'109 0 2 14 10 0\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'060 24'786 0 98 747 401 3\n",
" 'max_lp': 2'295 18'835 0 107 910 715 3\n",
" 'no_lp': 7'299 78'097 0 221 2'678 4'517 6\n",
" 'objective_lb_search': 1'045 8'111 0 1 10 3 1\n",
" 'probing': 0 0 0 0 0 0 0\n",
" 'pseudo_costs': 1'295 10'342 0 12 120 113 1\n",
" 'quick_restart': 3'434 28'144 0 114 987 894 6\n",
" 'quick_restart_no_lp': 10'889 71'509 0 479 4'472 3'519 61\n",
" 'reduced_costs': 2'843 23'401 0 109 948 752 7\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 94'936 1'747 2 2'893 331 0 197 0 0 184'273 675'232 294'875\n",
" 'default_lp': 0 0 0 163 1 0 4 2 0 1 0 0 0 3'802 1'782\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 11 0 0 0 98 0 0 0 0 0 5 16\n",
" 'max_lp': 0 0 0 44 1 0 1 107 0 1 0 0 0 558 294\n",
" 'no_lp': 0 0 0 42'520 266 291 1'215 221 0 113 0 0 41'637 211'607 93'952\n",
" 'objective_lb_search': 181 0 0 153 2 5 4 1 0 0 0 0 0 1'857 922\n",
" 'probing': 0 0 0 1 0 0 0 0 0 0 0 0 0 18 10\n",
" 'pseudo_costs': 0 0 0 167 2 0 11 12 0 0 0 0 0 3'393 1'532\n",
" 'quick_restart': 0 0 0 45 0 0 3 114 0 1 0 0 0 240 189\n",
" 'quick_restart_no_lp': 0 0 5 6'685 109 27 513 479 39 108 0 0 25'503 86'602 42'945\n",
" 'reduced_costs': 0 0 0 41 1 0 1 109 0 2 0 0 0 1'441 696\n",
"\n",
"Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n",
" 'default_lp': 1 109'010 2'176 6'400 1 76\n",
" 'lb_tree_search': 1 40'163 2'442 836 143 0\n",
" 'max_lp': 1 55'010 2'610 1'446 181 33\n",
" 'objective_lb_search': 1 99'320 2'981 3'673 0 48\n",
" 'probing': 1 20'683 4'409 329 0 0\n",
" 'pseudo_costs': 1 87'322 2'792 4'751 317 192\n",
" 'quick_restart': 1 47'913 3'833 1'716 2 23\n",
" 'reduced_costs': 1 78'141 3'216 2'320 323 156\n",
"\n",
"Lp dimension Final dimension of first component\n",
" 'default_lp': 850 rows, 1596 columns, 4828 entries\n",
" 'lb_tree_search': 1448 rows, 1690 columns, 19018 entries\n",
" 'max_lp': 1490 rows, 1690 columns, 18629 entries\n",
" 'objective_lb_search': 976 rows, 1596 columns, 8390 entries\n",
" 'probing': 2602 rows, 1596 columns, 56231 entries\n",
" 'pseudo_costs': 792 rows, 1690 columns, 5658 entries\n",
" 'quick_restart': 1567 rows, 1596 columns, 19384 entries\n",
" 'reduced_costs': 1443 rows, 1690 columns, 15647 entries\n",
"\n",
"Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n",
" 'default_lp': 0 0 6'460 0 2'137 0\n",
" 'lb_tree_search': 0 0 979 0 34'628 0\n",
" 'max_lp': 0 0 1'658 0 24'169 0\n",
" 'objective_lb_search': 0 0 3'712 0 7'356 0\n",
" 'probing': 0 2 315 0 53'783 0\n",
" 'pseudo_costs': 0 0 5'214 0 5'504 0\n",
" 'quick_restart': 0 0 1'728 0 23'374 0\n",
" 'reduced_costs': 0 0 2'753 0 17'865 0\n",
"\n",
"Lp pool Constraints Updates Simplif Merged Shortened Split Strengthened Cuts/Call\n",
" 'default_lp': 4'976 2 0 0 0 0 69 2'176/5'136\n",
" 'lb_tree_search': 5'594 350 0 0 0 509 3 2'442/4'486\n",
" 'max_lp': 5'762 264 0 0 0 278 0 2'610/4'675\n",
" 'objective_lb_search': 5'781 37 0 0 0 35 59 2'981/6'113\n",
" 'probing': 7'209 414 0 0 0 1'079 69 4'409/7'949\n",
" 'pseudo_costs': 5'944 28 0 0 0 13 2 2'792/6'011\n",
" 'quick_restart': 6'633 187 0 0 0 186 84 3'833/7'331\n",
" 'reduced_costs': 6'368 158 0 0 0 153 3 3'216/6'388\n",
"\n",
"Lp Cut default_lp reduced_costs pseudo_costs objective_lb_search max_lp quick_restart lb_tree_search probing\n",
" CG_FF: 13 19 30 16 9 15 2 25\n",
" CG_K: 11 6 20 11 1 5 1 9\n",
" CG_KL: 6 3 3 3 - 4 - 4\n",
" CG_R: 17 33 31 24 19 17 11 33\n",
" CG_RB: 29 62 53 62 40 64 47 68\n",
" CG_RBP: 12 22 28 22 5 22 3 36\n",
" IB: 1'245 1'143 1'486 1'075 441 1'074 180 765\n",
" MIR_1_FF: 58 98 69 143 107 240 115 296\n",
" MIR_1_K: 38 9 13 62 9 61 4 65\n",
" MIR_1_KL: 20 1 2 28 4 37 1 51\n",
" MIR_1_R: 1 2 1 1 - 6 1 5\n",
" MIR_1_RB: 21 57 42 98 61 126 51 128\n",
" MIR_1_RBP: 21 21 11 69 12 101 14 134\n",
" MIR_2_FF: 66 146 103 137 161 203 165 245\n",
" MIR_2_K: 35 17 12 64 13 73 6 83\n",
" MIR_2_KL: 11 3 2 22 3 23 5 26\n",
" MIR_2_R: 2 6 7 10 4 10 7 13\n",
" MIR_2_RB: 69 144 98 119 138 173 138 193\n",
" MIR_2_RBP: 34 36 24 70 44 108 32 148\n",
" MIR_3_FF: 46 130 89 80 148 108 174 165\n",
" MIR_3_K: 32 24 17 51 17 80 18 89\n",
" MIR_3_KL: 9 6 2 7 3 11 1 12\n",
" MIR_3_R: 5 13 11 3 7 5 5 11\n",
" MIR_3_RB: 49 120 93 94 142 119 156 144\n",
" MIR_3_RBP: 23 53 23 57 47 96 39 130\n",
" MIR_4_FF: 26 84 60 46 137 56 138 87\n",
" MIR_4_K: 15 14 14 36 29 42 33 57\n",
" MIR_4_KL: 6 5 - 2 1 6 3 6\n",
" MIR_4_R: 2 9 7 8 10 2 7 9\n",
" MIR_4_RB: 34 86 71 51 105 55 119 89\n",
" MIR_4_RBP: 16 28 11 26 47 56 57 99\n",
" MIR_5_FF: 11 64 19 19 74 48 89 64\n",
" MIR_5_K: 12 23 11 18 34 46 26 44\n",
" MIR_5_KL: - 8 1 2 - 4 4 4\n",
" MIR_5_R: 1 10 3 4 12 5 10 6\n",
" MIR_5_RB: 15 59 34 26 61 33 70 46\n",
" MIR_5_RBP: 4 30 9 19 43 38 30 41\n",
" MIR_6_FF: 5 45 23 13 49 24 53 39\n",
" MIR_6_K: 8 16 5 16 25 28 19 39\n",
" MIR_6_KL: 2 15 3 1 15 7 19 7\n",
" MIR_6_R: - 6 3 1 7 2 5 5\n",
" MIR_6_RB: 9 36 24 17 50 17 43 25\n",
" MIR_6_RBP: 3 22 8 20 42 30 35 32\n",
" ZERO_HALF_FF: 17 29 13 29 11 19 9 28\n",
" ZERO_HALF_K: 8 10 1 8 1 11 - 7\n",
" ZERO_HALF_KL: 3 2 - 1 - 2 1 4\n",
" ZERO_HALF_R: 89 353 162 221 341 402 414 647\n",
" ZERO_HALF_RB: 12 60 32 47 75 86 66 108\n",
" ZERO_HALF_RBP: 5 28 8 22 6 33 16 38\n",
"\n",
"LNS stats Improv/Calls Closed Difficulty TimeLimit\n",
" 'graph_arc_lns': 3/34 50% 4.06e-01 0.10\n",
" 'graph_cst_lns': 6/26 50% 6.59e-01 0.10\n",
" 'graph_dec_lns': 1/31 52% 7.68e-01 0.10\n",
" 'graph_var_lns': 3/33 48% 5.97e-01 0.10\n",
" 'lb_relax_lns': 3/6 33% 2.86e-01 0.50\n",
" 'rins/rens': 24/29 45% 3.03e-01 0.10\n",
" 'rnd_cst_lns': 3/34 47% 5.90e-01 0.10\n",
" 'rnd_var_lns': 3/32 50% 7.02e-01 0.10\n",
"\n",
"LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n",
" 'ls_lin_restart': 3 3 38'237 0 0 0 6'886 1'367'918\n",
" 'ls_lin_restart_compound': 5 4 0 65'963 6'145 29'906 335 1'867'830\n",
" 'ls_lin_restart_compound_perturb': 4 3 0 59'936 5'977 26'973 361 1'686'084\n",
" 'ls_lin_restart_decay': 2 2 30'954 0 0 0 532 716'237\n",
" 'ls_lin_restart_decay_compound': 3 3 0 39'558 5'416 17'061 121 1'225'603\n",
" 'ls_lin_restart_decay_compound_perturb': 6 5 0 83'554 14'596 34'469 122 2'717'370\n",
" 'ls_lin_restart_decay_perturb': 5 4 77'542 0 0 0 1'255 1'767'446\n",
" 'ls_lin_restart_perturb': 10 6 127'571 0 0 0 20'615 4'827'555\n",
" 'ls_restart': 4 3 51'287 0 0 0 10'921 1'890'001\n",
" 'ls_restart_compound': 4 1 0 53'834 4'771 24'529 57 1'691'864\n",
" 'ls_restart_compound_perturb': 7 6 0 109'599 10'880 49'333 646 3'096'374\n",
" 'ls_restart_decay': 4 4 61'623 0 0 0 1'060 1'396'051\n",
" 'ls_restart_decay_compound': 8 5 0 109'343 17'996 45'664 149 3'418'028\n",
" 'ls_restart_decay_compound_perturb': 5 4 0 66'405 11'536 27'422 124 1'997'744\n",
" 'ls_restart_decay_perturb': 4 3 61'998 0 0 0 1'036 1'408'946\n",
" 'ls_restart_perturb': 5 5 64'967 0 0 0 9'967 2'399'154\n",
"\n",
"Solutions (8) Num Rank\n",
" 'complete_hint': 2 [0,1]\n",
" 'graph_arc_lns': 2 [4,5]\n",
" 'graph_cst_lns': 4 [5,7]\n",
" 'graph_var_lns': 2 [3,4]\n",
" 'lb_relax_lns_int_h': 2 [7,8]\n",
" 'quick_restart_no_lp': 4 [1,3]\n",
"\n",
"Objective bounds Num\n",
" 'am1_presolve': 1\n",
" 'default_lp': 1\n",
" 'initial_domain': 1\n",
" 'lb_tree_search': 126\n",
" 'max_lp': 7\n",
" 'reduced_costs': 1\n",
"\n",
"Solution repositories Added Queried Synchro\n",
" 'alternative_path': 21 96 21\n",
" 'best_solutions': 68 222 46\n",
" 'fj solution hints': 0 0 0\n",
" 'lp solutions': 140 29 110\n",
" 'pump': 0 0\n",
"\n",
"Clauses shared #Exported #Imported #BinaryRead #BinaryTotal\n",
" 'core': 220 155 0 0\n",
" 'default_lp': 1 0 0 0\n",
" 'lb_tree_search': 0 307 0 0\n",
" 'max_lp': 0 306 0 0\n",
" 'no_lp': 47 261 0 0\n",
" 'objective_lb_search': 0 16 0 0\n",
" 'probing': 0 0 0 0\n",
" 'pseudo_costs': 0 95 0 0\n",
" 'quick_restart': 1 306 0 0\n",
" 'quick_restart_no_lp': 149 169 0 0\n",
" 'reduced_costs': 0 307 0 0\n",
"\n",
"LRAT_status: NA\n",
"[Scaling] scaled_objective_bound: 229412 corrected_bound: 229412 delta: 2.18779e-06\n",
"CpSolverResponse summary:\n",
"status: FEASIBLE\n",
"objective: 240715.159901454\n",
"best_bound: 229412.0033964992\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.0252\n",
"usertime: 20.0252\n",
"deterministic_time: 98.3159\n",
"gap_integral: 919.01\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.035444,\n",
" 'bound': 229412.0033964992,\n",
" 'objective': 240715.159901454,\n",
" 'relgap': 0.04695656272576343,\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": [
""
],
"text/plain": [
""
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wfn"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}