{ "cells": [ { "cell_type": "markdown", "id": "b977ea38-7154-4788-b4bb-382e8aed7d54", "metadata": {}, "source": [ "# ModelOptions vs SolverOptions" ] }, { "cell_type": "markdown", "id": "28f9c4f4", "metadata": {}, "source": [ "\n", "The distinction between **`ModelOptions`** and **`SolverOptions`** is essential when working with `OptiWindNet`.\n", "This notebook presents a clear and structured explanation of their roles and differences:\n", "\n", "- **`ModelOptions`** define *how the optimization problem is formulated*, including structural assumptions and model features such as topology type, feeder constraints, and balancing requirements.\n", "- **`SolverOptions`** configure *how the underlying solver behaves during execution*, controlling aspects like time limits, optimality gaps, and so on.\n", "\n", "Understanding this separation helps ensure that models are both correctly formulated and efficiently solved." ] }, { "cell_type": "markdown", "id": "1a483051", "metadata": {}, "source": [ "## 🔧 What is `ModelOptions`?" ] }, { "cell_type": "markdown", "id": "a4e73dde", "metadata": {}, "source": [ "`ModelOptions` is a configuration object or dictionary that **controls how the mathematical model is built and behaves**, regardless of the solver used. These options are typically **high-level**, problem-specific settings that:\n", "\n", "* Affect the **structure** of the model (e.g., topology type)\n", "* Enable or disable **features** (e.g., balancing constraints)\n", "* Influence **heuristic/metaheuristic behavior** if used\n", "\n", "#### ✅ Parameters in `ModelOptions`:\n", "\n", "| Parameter | Description |\n", "| -------------- | --------------------------------------------------------------------------- |\n", "| `topology` | Controls whether the solution allows \"radial\" or \"branched\" subtrees |\n", "| `feeder_route` | Determines if feeder paths must be \"straight\" or may be \"segmented\" |\n", "| `feeder_limit` | Specifies limits on the number of feeders used in the solution |\n", "| `balanced` | Whether subtree loads must be balanced |\n", "| `max_feeders` | Required when `feeder_limit=\"specified\"` to indicate the max number allowed |\n", "\n", "These options **change the formulation** of the problem before it is handed to the solver." ] }, { "cell_type": "markdown", "id": "3c81fc32", "metadata": {}, "source": [ "### Capability of different routers\n", "\n", "| Router | Topology | Feeder Route | Feeder Limit |\n", "|------------------|-----------------------------------------------------------------------|-------------------------------------------------------------------|------------------------------------------------------------------|\n", "| **EWRouter** | Not user-controllable | Controllable via `feeder_route` parameter | Not user controllable |\n", "| **HGSRouter** | Always produces *radial* topology | Not user-controllable | Controllable via `feeder_limit` parameter |\n", "| **MILPRouter** | Controllable via `topology` parameter in `ModelOptions` | Controllable via `feeder_route` parameter in `ModelOptions` | Controllable via `feeder_limit` parameter in `ModelOptions` |\n" ] }, { "cell_type": "markdown", "id": "f5b1226e", "metadata": {}, "source": [ "Import required functions" ] }, { "cell_type": "code", "execution_count": 1, "id": "23c1c992-a563-4f2d-bbc8-cf0884e5b275", "metadata": {}, "outputs": [], "source": [ "from optiwindnet.api import WindFarmNetwork, EWRouter, HGSRouter, MILPRouter, ModelOptions" ] }, { "cell_type": "code", "execution_count": 2, "id": "2dfff35b", "metadata": {}, "outputs": [], "source": [ "# Display figures as SVG in Jupyter notebooks\n", "%config InlineBackend.figure_formats = ['svg']" ] }, { "cell_type": "markdown", "id": "400a768f", "metadata": {}, "source": [ "Access ModelOptions help" ] }, { "cell_type": "code", "execution_count": 3, "id": "3f47e430", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "topology in {\"radial\", \"branched\"} default: branched\n", " Set the topology of subtrees in the solution.\n", "\n", "feeder_route in {\"straight\", \"segmented\"} default: segmented\n", " If feeder routes must be \"straight\" or can be detoured (\"segmented\").\n", "\n", "feeder_limit in {\"unlimited\", \"specified\", \"minimum\", \"min_plus1\", \"min_plus2\", \"min_plus3\"} default: unlimited\n", " Whether to limit the maximum number of feeders, if set to \"specified\", additional kwarg \"max_feeders\" must be given.\n", "\n", "balanced [bool] default: False\n", " Whether to enforce balanced subtrees (subtree loads differ at most by one unit).\n", "\n", "max_feeders [int] default: 0\n", " Maximum number of feeders (used only if )\n", "\n" ] } ], "source": [ "ModelOptions.help()" ] }, { "cell_type": "markdown", "id": "63bcacd1", "metadata": {}, "source": [ "Optimize an examplary location" ] }, { "cell_type": "code", "execution_count": 4, "id": "52de1352", "metadata": {}, "outputs": [], "source": [ "wfn = WindFarmNetwork.from_pbf(filepath='data/DTU_letters.osm.pbf', cables=[(2, 1500.0), (5, 1800.0), (7, 2000.0)])" ] }, { "cell_type": "code", "execution_count": 5, "id": "2a81cdd4-7be8-4da3-9b94-9799c6f1760b", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "" ], "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wfn" ] }, { "cell_type": "markdown", "id": "93654f2e", "metadata": {}, "source": [ "### EWRouter" ] }, { "cell_type": "markdown", "id": "f069d5a6", "metadata": {}, "source": [ "* This router does not accept `ModelOptions` as an argument.\n", "* The optional EWRouter() parameter `feeder_route` can be set to `'segmented'` (default) or `'straight'`." ] }, { "cell_type": "markdown", "id": "85410628", "metadata": {}, "source": [ "Example using `feeder_route='segmented'`" ] }, { "cell_type": "code", "execution_count": 6, "id": "743daf67", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "3173818 €Σλ = 1820.2 m(+2) [-1]: 8κ = 7, T = 40" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "terse = wfn.optimize(router=EWRouter())\n", "wfn" ] }, { "cell_type": "markdown", "id": "0a81e407-4795-47e0-9224-4229390e8f6d", "metadata": {}, "source": [ "Example using `feeder_route='straight'`" ] }, { "cell_type": "code", "execution_count": 7, "id": "97b48109", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "2919740 €Σλ = 1707.1 m(+3) [-1]: 9κ = 7, T = 40" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "terse = wfn.optimize(router=EWRouter(feeder_route='straight'))\n", "wfn" ] }, { "cell_type": "markdown", "id": "d13e0b0a", "metadata": {}, "source": [ "### HGSRouter" ] }, { "cell_type": "markdown", "id": "55014908", "metadata": {}, "source": [ "`HGSRouter` does not support `ModelOptions` in its current format. Instead, it accepts key configuration options, such as `feeder_limit` and `balanced`, as individual arguments passed directly to the router.\n", "\n", "* Default values:\n", "\n", " * `balanced = False`\n", " * `feeder_limit` is flexible and generally favors minimizing total cable length:\n", "\n", " * For locations with one substation, `feeder_limit` can be adjusted.\n", " * For locations with multiple substations, the `feeder_limit` argument is *ignored*, and the number of feeders is fixed to the minimum required.\n", " * Other `ModelOptions` parameters, such as `topology` (HGSRouter always generates *radial topologies*) and `feeder_route`, are not currently supported." ] }, { "cell_type": "code", "execution_count": 8, "id": "9cb85bdc", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "2772364 €Σλ = 1596.2 m(+1) [-1]: 7κ = 7, T = 40" ], "text/plain": [ "" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "hgs_router = HGSRouter(time_limit=2)\n", "terse = wfn.optimize(router=hgs_router)\n", "wfn" ] }, { "cell_type": "markdown", "id": "40b4d6b9", "metadata": {}, "source": [ "Set the `feeder_limit` lower than the possible minimum." ] }, { "cell_type": "code", "execution_count": 9, "id": "e7fdc36f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Vehicle number (0) too low for feasibilty with capacity (7). Setting to 6.\n" ] }, { "data": { "image/svg+xml": [ "2847584 €Σλ = 1612.3 m(+0) [-1]: 6κ = 7, T = 40" ], "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "hgs_router2 = HGSRouter(time_limit=2, feeder_limit=0)\n", "terse = wfn.optimize(router=hgs_router2)\n", "wfn" ] }, { "cell_type": "markdown", "id": "a60216b5", "metadata": {}, "source": [ "### MILP routers" ] }, { "cell_type": "markdown", "id": "daf1e8c9-a661-4204-9a20-ad463ff44630", "metadata": {}, "source": [ "`MILPRouter` is able to control all settings in `ModelOption`.\n", "\n", "In this notebook, we run optimization with two sets of ModelOptions for comparison:\n", "\n", "\n", "| Model Option | Set 1 | Set 2 |\n", "| -------------- | ----------- | ----------- |\n", "| **topology** | `branched` | `radial` |\n", "| **feeder_limit** | `unlimited` | `minimum` |\n", "| **feeder_route** | `segmented` | `straight` |" ] }, { "cell_type": "markdown", "id": "37d5c26c-1c83-4eae-85cb-7a33af4a3510", "metadata": {}, "source": [ "With `MILP`, we observe the following behavior across different `ModelOptions` settings:" ] }, { "cell_type": "markdown", "id": "fc1a0431-3117-4e30-bd22-1d403604af29", "metadata": {}, "source": [ "#### First MILP Run (`model_options1`)" ] }, { "cell_type": "code", "execution_count": 10, "id": "a1b6225f-356d-4f01-b26f-fb56c79f1fec", "metadata": {}, "outputs": [], "source": [ "model_options1 = ModelOptions(\n", " topology='branched',\n", " feeder_limit='unlimited',\n", " feeder_route='segmented',\n", ")" ] }, { "cell_type": "markdown", "id": "40ea1822-7fba-4655-a684-8d410dedaaf7", "metadata": {}, "source": [ " The solver constructs a **branched** network structure without applying any limit on the number of feeders. The feeder routes follow a **segmented** (piecewise-straight) pattern, as specified. All aspects of the network are consistent with the given `ModelOptions`." ] }, { "cell_type": "markdown", "id": "23b508d7", "metadata": {}, "source": [ " This solution can also serve as a **valid warm start** for subsequent optimizations." ] }, { "cell_type": "code", "execution_count": 11, "id": "8f5d36d9-9f1a-4080-84e8-e4e57a62215b", "metadata": {}, "outputs": [], "source": [ "milp_router = MILPRouter(\n", " solver_name='ortools',\n", " time_limit=10,\n", " mip_gap=0.01,\n", " model_options=model_options1,\n", " verbose=True,\n", ")" ] }, { "cell_type": "code", "execution_count": 12, "id": "35cdbf99", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ ">>> No solution is available for warmstarting! <<<\n", "\n", "\n", "Starting CP-SAT solver v9.14.6206\n", "Parameters: max_time_in_seconds: 10 log_search_progress: true relative_gap_limit: 0.01\n", "Setting number of workers to 16\n", "\n", "Initial optimization model '': (model_fingerprint: 0x6c7cfc6ee6d2919b)\n", "#Variables: 708 (#bools: 354 in floating point objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 262 (#literals: 776)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 122 (#terms: 1'767)\n", "\n", "Starting presolve at 0.00s\n", "[Scaling] Floating point objective has 354 terms with magnitude in [18.5198, 233.655] average = 64.9611\n", "[Scaling] Objective coefficient relative error: 2.56462e-08\n", "[Scaling] Objective worst-case absolute error: 8.40207e-05\n", "[Scaling] Objective scaling factor: 524288\n", " 3.95e-04s 0.00e+00d [DetectDominanceRelations] \n", " 1.16e-02s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 1.03e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=302 \n", " 2.91e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 5.52e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'653 nodes and 4'971 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.000944 dtime: 0.00048184\n", " 2.91e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.94e-03s 1.38e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 5.45e-04s 1.49e-04d [MaxClique] Merged 262(776 literals) into 142(536 literals) at_most_ones. \n", " 3.28e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.53e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 3.70e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 6.43e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 2.30e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 5.42e-04s 5.98e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=83 #num_inclusions=41 \n", " 3.28e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.71e-03s 6.97e-05d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=184 #num_inclusions=182 \n", " 6.50e-05s 1.65e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=3 \n", " 3.25e-04s 9.42e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 2.43e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 6.81e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 2.19e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.98e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.45e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.20e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.30e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.18e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 1.74e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0003513 dtime: 0.00043606\n", "[SAT presolve] num removable Booleans: 0 / 354\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0003464s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0004729s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", " 1.24e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 5.21e-03s 1.27e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 7.29e-04s 1.45e-04d [MaxClique] \n", " 2.21e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.17e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.09e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 5.33e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 2.35e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 3.18e-04s 4.48e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=82 #num_inclusions=40 \n", " 3.36e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 4.48e-04s 2.79e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=183 \n", " 4.06e-05s 1.10e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2 \n", " 7.67e-04s 9.14e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 4.80e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 5.39e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 1.94e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.39e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.33e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 3.46e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=2'948 #tight_variables=354 #tight_constraints=40 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 81 times.\n", " - rule 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 708 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 40 times.\n", " - rule 'linear: positive equal one' was applied 40 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 40 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 40 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 39 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 354 times.\n", " - rule 'variables: detect half reified value encoding' was applied 708 times.\n", "\n", "Presolved optimization model '': (model_fingerprint: 0xeabc314b52e95923)\n", "#Variables: 708 (#bools: 314 in objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 105 (#literals: 462)\n", "#kBoolAnd: 37 (#enforced: 37) (#literals: 74)\n", "#kExactlyOne: 40 (#literals: 354)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 81 (#terms: 1'059)\n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0004188 dtime: 0.00043662\n", "\n", "Preloading model.\n", "#Bound 0.08s best:inf next:[1364.00132,11449.6914] initial_domain\n", "#Model 0.08s var:708/708 constraints:972/972\n", "\n", "Starting search at 0.08s 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", "#1 0.09s best:4616.39576 next:[1364.00132,4616.39576] fj_restart(batch:1 lin{mvs:84 evals:975} #w_updates:1 #perturb:0)\n", "#Bound 0.10s best:4616.39576 next:[1377.09321,4616.39576] am1_presolve (num_literals=314 num_am1=11 increase=6863922 work_done=1181)\n", "#2 0.10s best:4450.69732 next:[1377.09321,4450.69731] rnd_var_lns (d=5.00e-01 s=16 t=0.10 p=0.00 stall=0 h=base) [hint] (fixed_bools=0/354)\n", "#3 0.11s best:4299.27872 next:[1377.09321,4299.27872] rnd_cst_lns (d=5.00e-01 s=17 t=0.10 p=0.00 stall=0 h=base) (fixed_bools=0/354)\n", "#Bound 0.11s best:4299.27872 next:[1439.63944,4299.27872] quick_restart\n", "#Bound 0.11s best:4299.27872 next:[1446.52179,4299.27872] pseudo_costs\n", "#4 0.12s best:4297.18794 next:[1446.52179,4297.18794] quick_restart_no_lp (fixed_bools=0/355)\n", "#5 0.12s best:2092.49918 next:[1446.52179,2092.49918] no_lp (fixed_bools=0/354)\n", "#Bound 0.12s best:2092.49918 next:[1657.8143,2092.49918] lb_tree_search\n", "#6 0.13s best:2075.21845 next:[1657.8143,2075.21845] quick_restart_no_lp (fixed_bools=0/357)\n", "#7 0.14s best:2059.79637 next:[1657.8143,2059.79637] quick_restart_no_lp (fixed_bools=0/357)\n", "#8 0.15s best:2048.92263 next:[1657.8143,2048.92263] rnd_var_lns (d=7.07e-01 s=25 t=0.10 p=1.00 stall=0 h=base) [combined with: quick_restart_no_lp...] (fixed_bools=0/354)\n", "#9 0.16s best:2002.33159 next:[1657.8143,2002.33159] graph_var_lns (d=7.07e-01 s=27 t=0.10 p=1.00 stall=0 h=base) (fixed_bools=0/354)\n", "#10 0.16s best:1986.90951 next:[1657.8143,1986.90951] graph_var_lns (d=7.07e-01 s=27 t=0.10 p=1.00 stall=0 h=base) [combined with: quick_restart_no_lp...] (fixed_bools=0/354)\n", "#11 0.17s best:1985.54253 next:[1657.8143,1985.54253] quick_restart_no_lp (fixed_bools=0/360)\n", "#12 0.18s best:1981.34673 next:[1657.8143,1981.34673] ls_restart_compound_perturb(batch:1 lin{mvs:0 evals:10'979} gen{mvs:1'117 evals:0} comp{mvs:63 btracks:527} #w_updates:19 #perturb:0) (fixed_bools=0/354)\n", "#Bound 0.19s best:1981.34673 next:[1669.59325,1981.34673] max_lp\n", "#Bound 0.19s best:1981.34673 next:[1671.54486,1981.34673] lb_tree_search\n", "#13 0.21s best:1978.70352 next:[1671.54486,1978.70351] no_lp (fixed_bools=0/354)\n", "#14 0.22s best:1978.56265 next:[1671.54486,1978.56265] quick_restart_no_lp (fixed_bools=0/364)\n", "#15 0.25s best:1964.05789 next:[1671.54486,1964.05789] quick_restart_no_lp (fixed_bools=0/369)\n", "#16 0.26s best:1963.13534 next:[1671.54486,1963.13534] quick_restart_no_lp (fixed_bools=0/369)\n", "#17 0.27s best:1961.75032 next:[1671.54486,1961.75032] quick_restart_no_lp (fixed_bools=0/369)\n", "#18 0.28s best:1961.60946 next:[1671.54486,1961.60946] quick_restart_no_lp (fixed_bools=0/375)\n", "#19 0.28s best:1946.91943 next:[1671.54486,1946.91943] graph_cst_lns (d=7.07e-01 s=29 t=0.10 p=1.00 stall=0 h=base) (fixed_bools=0/354)\n", "#20 0.31s best:1938.81994 next:[1671.54486,1938.81994] quick_restart_no_lp (fixed_bools=0/376)\n", "#21 0.32s best:1891.63488 next:[1671.54486,1891.63487] lb_relax_lns_bool_h (d=5.00e-01 s=22 t=0.50 p=0.00 stall=0 h=base) (fixed_bools=0/354)\n", "#Bound 0.33s best:1891.63488 next:[1682.19732,1891.63487] lb_tree_search\n", "#22 0.33s best:1855.81769 next:[1682.19732,1855.81768] rins_pump_lns (d=5.00e-01 s=34 t=0.10 p=0.00 stall=0 h=base) (fixed_bools=0/354)\n", "#23 0.38s best:1855.51168 next:[1682.19732,1855.51168] reduced_costs (fixed_bools=0/355)\n", "#24 0.39s best:1848.38584 next:[1682.19732,1848.38583] quick_restart_no_lp (fixed_bools=0/389)\n", "#25 0.40s best:1831.9096 next:[1682.19732,1831.9096] quick_restart_no_lp (fixed_bools=0/389)\n", "#26 0.41s best:1831.46468 next:[1682.19732,1831.46468] quick_restart_no_lp (fixed_bools=0/389)\n", "#27 0.47s best:1829.24949 next:[1682.19732,1829.24949] quick_restart_no_lp (fixed_bools=0/389)\n", "#28 0.56s best:1797.50895 next:[1682.19732,1797.50895] rnd_cst_lns (d=8.14e-01 s=36 t=0.10 p=1.00 stall=0 h=base) (fixed_bools=0/354)\n", "#Bound 0.68s best:1797.50895 next:[1690.42996,1797.50895] lb_tree_search\n", "#29 0.83s best:1795.34453 next:[1690.42996,1795.34453] quick_restart_no_lp (fixed_bools=0/397)\n", "#30 0.86s best:1789.4341 next:[1690.42996,1789.4341] quick_restart_no_lp (fixed_bools=1/398)\n", "#Model 0.92s var:706/708 constraints:969/972\n", "#Bound 0.97s best:1789.4341 next:[1695.59008,1789.4341] max_lp\n", "#Bound 1.36s best:1789.4341 next:[1698.12335,1789.4341] max_lp\n", "#Model 1.44s var:696/708 constraints:958/972\n", "#31 1.64s best:1782.67486 next:[1698.12335,1782.67485] graph_arc_lns (d=7.87e-01 s=61 t=0.10 p=0.75 stall=2 h=base) (fixed_bools=0/354)\n", "#Bound 1.78s best:1782.67486 next:[1698.12362,1782.67485] objective_lb_search\n", "#Bound 1.89s best:1782.67486 next:[1702.95867,1782.67485] lb_tree_search\n", "#Bound 2.34s best:1782.67486 next:[1704.92189,1782.67485] lb_tree_search\n", "#32 2.41s best:1759.76521 next:[1704.92189,1759.76521] graph_var_lns (d=8.12e-01 s=81 t=0.10 p=0.67 stall=3 h=base) (fixed_bools=0/354)\n", "#Model 2.41s var:694/708 constraints:956/972\n", "#Bound 2.76s best:1759.76521 next:[1704.95448,1759.76521] max_lp\n", "#Bound 2.79s best:1759.76521 next:[1706.13276,1759.76521] lb_tree_search\n", "#Model 3.02s var:692/708 constraints:954/972\n", "#Bound 3.21s best:1759.76521 next:[1707.15847,1759.76521] max_lp\n", "#Bound 3.28s best:1759.76521 next:[1707.26495,1759.76521] lb_tree_search\n", "#Model 3.32s var:658/708 constraints:919/972\n", "#Bound 3.71s best:1759.76521 next:[1708.50497,1759.76521] max_lp\n", "#Bound 3.78s best:1759.76521 next:[1709.12895,1759.76521] lb_tree_search\n", "#Model 3.81s var:648/708 constraints:908/972\n", "#Bound 4.24s best:1759.76521 next:[1710.12029,1759.76521] max_lp\n", "#Bound 4.32s best:1759.76521 next:[1710.89007,1759.76521] lb_tree_search\n", "#Model 4.37s var:646/708 constraints:906/972\n", "#33 4.64s best:1758.41439 next:[1710.89007,1758.41439] reduced_costs (fixed_bools=25/362)\n", "#Bound 4.71s best:1758.41439 next:[1713.66487,1758.41439] max_lp\n", "#Model 4.86s var:642/708 constraints:902/972\n", "#Bound 5.27s best:1758.41439 next:[1714.78519,1758.41439] max_lp\n", "#Model 5.49s var:640/708 constraints:900/972\n", "#Bound 5.86s best:1758.41439 next:[1716.33669,1758.41439] max_lp\n", "#Model 6.12s var:638/708 constraints:897/972\n", "#Bound 6.38s best:1758.41439 next:[1716.68325,1758.41439] max_lp\n", "#Model 6.72s var:630/708 constraints:888/972\n", "#Bound 6.94s best:1758.41439 next:[1717.35876,1758.41439] max_lp\n", "#Model 7.01s var:622/708 constraints:880/972\n", "#Bound 7.20s best:1758.41439 next:[1717.4777,1758.41439] objective_lb_search\n", "#Model 7.67s var:620/708 constraints:878/972\n", "#Model 7.73s var:616/708 constraints:873/972\n", "#Bound 8.92s best:1758.41439 next:[1717.69736,1758.41439] lb_tree_search\n", "#Model 8.93s var:612/708 constraints:869/972\n", "#Bound 9.51s best:1758.41439 next:[1717.93562,1758.41439] lb_tree_search\n", "#Bound 9.69s best:1758.41439 next:[1722.13693,1758.41439] objective_lb_search [skipped_logs=0]\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [ 9.97s, 9.97s] 9.97s 0.00ns 9.97s 1 [ 8.11s, 8.11s] 8.11s 0.00ns 8.11s\n", " 'default_lp': 1 [ 9.92s, 9.92s] 9.92s 0.00ns 9.92s 1 [ 2.93s, 2.93s] 2.93s 0.00ns 2.93s\n", " 'feasibility_pump': 42 [ 51.70us, 218.44ms] 91.81ms 38.64ms 3.86s 40 [ 18.23ms, 90.49ms] 36.75ms 14.42ms 1.47s\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': 1 [ 11.32ms, 11.32ms] 11.32ms 0.00ns 11.32ms 1 [234.76us, 234.76us] 234.76us 0.00ns 234.76us\n", " 'fs_random': 1 [ 13.25ms, 13.25ms] 13.25ms 0.00ns 13.25ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_no_lp': 1 [ 13.11ms, 13.11ms] 13.11ms 0.00ns 13.11ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_quick_restart_no_lp': 1 [ 13.28ms, 13.28ms] 13.28ms 0.00ns 13.28ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'graph_arc_lns': 19 [ 18.06ms, 420.24ms] 227.61ms 156.37ms 4.32s 19 [115.29us, 100.16ms] 57.68ms 45.05ms 1.10s\n", " 'graph_cst_lns': 17 [ 26.26ms, 670.48ms] 285.07ms 197.90ms 4.85s 17 [225.97us, 100.24ms] 63.49ms 42.87ms 1.08s\n", " 'graph_dec_lns': 18 [922.60us, 1.03s] 244.81ms 308.18ms 4.41s 14 [ 10.00ns, 100.22ms] 60.23ms 43.58ms 843.21ms\n", " 'graph_var_lns': 29 [ 14.76ms, 436.72ms] 151.40ms 155.03ms 4.39s 21 [118.58us, 100.08ms] 50.04ms 46.40ms 1.05s\n", " 'lb_relax_lns': 6 [116.11ms, 1.55s] 658.60ms 545.93ms 3.95s 6 [ 16.60ms, 520.09ms] 227.11ms 221.59ms 1.36s\n", " 'lb_tree_search': 1 [ 9.94s, 9.94s] 9.94s 0.00ns 9.94s 1 [562.44ms, 562.44ms] 562.44ms 0.00ns 562.44ms\n", " 'ls': 18 [ 9.65ms, 265.43ms] 212.73ms 73.01ms 3.83s 17 [ 5.02ms, 100.01ms] 94.06ms 22.31ms 1.60s\n", " 'ls_lin': 18 [ 18.27ms, 370.42ms] 214.95ms 71.76ms 3.87s 18 [ 6.23ms, 100.02ms] 90.96ms 25.92ms 1.64s\n", " 'max_lp': 1 [ 9.94s, 9.94s] 9.94s 0.00ns 9.94s 1 [ 2.95s, 2.95s] 2.95s 0.00ns 2.95s\n", " 'no_lp': 1 [ 9.92s, 9.92s] 9.92s 0.00ns 9.92s 1 [ 5.02s, 5.02s] 5.02s 0.00ns 5.02s\n", " 'objective_lb_search': 1 [ 9.91s, 9.91s] 9.91s 0.00ns 9.91s 1 [ 3.14s, 3.14s] 3.14s 0.00ns 3.14s\n", " 'probing': 1 [ 9.94s, 9.94s] 9.94s 0.00ns 9.94s 1 [921.17ms, 921.17ms] 921.17ms 0.00ns 921.17ms\n", " 'pseudo_costs': 1 [ 9.92s, 9.92s] 9.92s 0.00ns 9.92s 1 [ 2.48s, 2.48s] 2.48s 0.00ns 2.48s\n", " 'quick_restart': 1 [ 9.91s, 9.91s] 9.91s 0.00ns 9.91s 1 [ 2.87s, 2.87s] 2.87s 0.00ns 2.87s\n", " 'quick_restart_no_lp': 1 [ 9.92s, 9.92s] 9.92s 0.00ns 9.92s 1 [ 5.90s, 5.90s] 5.90s 0.00ns 5.90s\n", " 'reduced_costs': 1 [ 9.92s, 9.92s] 9.92s 0.00ns 9.92s 1 [ 3.07s, 3.07s] 3.07s 0.00ns 3.07s\n", " 'rins/rens': 18 [ 16.92ms, 449.88ms] 268.42ms 146.93ms 4.83s 18 [146.71us, 100.05ms] 71.22ms 40.74ms 1.28s\n", " 'rnd_cst_lns': 19 [ 16.28ms, 1.53s] 283.48ms 332.39ms 5.39s 19 [ 1.73us, 100.36ms] 53.60ms 45.93ms 1.02s\n", " 'rnd_var_lns': 17 [ 12.04ms, 1.55s] 354.15ms 412.70ms 6.02s 17 [613.00ns, 101.09ms] 53.63ms 45.06ms 911.68ms\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 403 106'057 294'280 10'313 2'276'971 5'354'618\n", " 'default_lp': 392 951 12'139 4'816 75'511 360'109\n", " 'fs_random': 354 0 0 0 0 1\n", " 'fs_random_no_lp': 354 0 16 16 82 299\n", " 'fs_random_quick_restart_no_lp': 354 0 0 0 0 1\n", " 'lb_tree_search': 354 0 16'805 8'708 57'535 153'435\n", " 'max_lp': 354 129 3'536 1'956 16'429 81'063\n", " 'no_lp': 354 72'466 150'246 8'948 3'400'207 12'074'012\n", " 'objective_lb_search': 369 233 10'314 5'250 42'902 215'440\n", " 'probing': 375 0 792 792 5'437 17'773\n", " 'pseudo_costs': 354 846 9'417 4'141 52'241 270'407\n", " 'quick_restart': 370 133 17'259 8'065 65'365 336'098\n", " 'quick_restart_no_lp': 471 40'566 405'568 17'468 2'463'214 9'020'623\n", " 'reduced_costs': 362 408 10'052 4'050 41'198 214'512\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 96'344 1'067'685 4'841'408 4'028'227 1'737 6'952 108'184 0 2'018 47'336 1'114\n", " 'default_lp': 863 18'831 40'142 0 3 645 4'396 0 5 40 12\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 1'040 7'520 0 0 0 0\n", " 'max_lp': 114 1'331 4'713 0 0 160 1'162 0 0 0 0\n", " 'no_lp': 66'228 1'039'065 2'947'966 2'332'739 888 4'296 34'054 0 693 8'255 1'183\n", " 'objective_lb_search': 213 4'977 2'703 0 9 573 4'361 0 0 1 0\n", " 'probing': 0 0 0 0 0 0 0 0 0 0 0\n", " 'pseudo_costs': 787 26'306 54'672 0 2 400 3'062 0 0 0 0\n", " 'quick_restart': 118 2'536 4'528 0 1 1'028 7'443 0 3 18 14\n", " 'quick_restart_no_lp': 35'258 606'133 1'781'078 933'335 463 8'935 65'747 0 1'375 14'593 729\n", " 'reduced_costs': 343 8'951 14'652 0 1 496 3'276 0 13 113 20\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 70'764 1'774 3'473 0 136\n", " 'fs_random': 1 0 0 0 0 0\n", " 'lb_tree_search': 1 2'400 1'290 55 1 0\n", " 'max_lp': 1 16'009 1'246 366 90 25\n", " 'objective_lb_search': 1 28'383 1'984 867 0 16\n", " 'probing': 1 4'488 2'549 91 0 0\n", " 'pseudo_costs': 1 43'806 1'593 2'189 406 140\n", " 'quick_restart': 1 24'016 1'825 990 0 11\n", " 'reduced_costs': 1 36'403 1'705 868 300 90\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 647 rows, 669 columns, 5549 entries\n", " 'fs_random': 0 rows, 669 columns, 0 entries\n", " 'lb_tree_search': 1910 rows, 708 columns, 32717 entries\n", " 'max_lp': 1079 rows, 708 columns, 25562 entries\n", " 'objective_lb_search': 800 rows, 669 columns, 12317 entries\n", " 'probing': 1564 rows, 669 columns, 38912 entries\n", " 'pseudo_costs': 511 rows, 708 columns, 4430 entries\n", " 'quick_restart': 841 rows, 669 columns, 14640 entries\n", " 'reduced_costs': 1045 rows, 708 columns, 24088 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 3 3'592 0 7'892 0\n", " 'fs_random': 0 0 0 0 0 0\n", " 'lb_tree_search': 0 2 56 0 51'149 0\n", " 'max_lp': 0 9 479 0 38'236 0\n", " 'objective_lb_search': 0 0 878 0 30'879 0\n", " 'probing': 0 1 84 0 46'192 0\n", " 'pseudo_costs': 0 0 2'724 0 15'939 0\n", " 'quick_restart': 0 0 996 0 27'721 0\n", " 'reduced_costs': 0 3 1'249 0 24'261 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 2'946 117 1'921 0 1'414 22 68 1'774/3'617\n", " 'fs_random': 1'172 0 0 0 0 0 0 0/0\n", " 'lb_tree_search': 2'616 798 4'665 0 3'136 266 21 1'290/2'317\n", " 'max_lp': 2'572 653 3'842 0 2'857 196 13 1'246/2'204\n", " 'objective_lb_search': 3'156 583 2'590 0 2'414 63 38 1'984/3'678\n", " 'probing': 3'721 672 526 0 532 92 101 2'549/4'994\n", " 'pseudo_costs': 2'919 297 601 0 556 11 8 1'593/2'996\n", " 'quick_restart': 2'997 556 3'539 0 2'915 96 72 1'825/3'493\n", " 'reduced_costs': 3'031 463 2'654 0 1'915 137 21 1'705/3'261\n", "\n", "Lp Cut default_lp quick_restart reduced_costs pseudo_costs objective_lb_search max_lp lb_tree_search probing\n", " CG_FF: 28 20 10 14 18 7 6 46\n", " CG_K: 7 6 7 8 5 5 5 14\n", " CG_KL: 6 2 2 8 - - - 2\n", " CG_R: 39 39 29 17 39 9 8 41\n", " CG_RB: 79 63 63 39 76 27 19 89\n", " CG_RBP: 33 28 18 15 30 8 3 47\n", " Clique: - - - - - 1 - -\n", " IB: 643 464 423 574 387 8 - 348\n", " MIR_1_FF: 64 99 86 57 112 63 90 162\n", " MIR_1_K: 15 27 3 4 28 4 3 24\n", " MIR_1_KL: 5 9 4 6 17 7 5 14\n", " MIR_1_R: 1 1 - 1 5 2 4 5\n", " MIR_1_RB: 30 26 21 19 48 18 12 72\n", " MIR_1_RBP: 18 26 8 9 31 18 2 51\n", " MIR_2_FF: 75 101 72 52 121 85 86 143\n", " MIR_2_K: 25 27 15 12 44 13 11 46\n", " MIR_2_KL: 4 13 10 8 24 14 14 15\n", " MIR_2_R: 4 4 2 2 11 4 5 15\n", " MIR_2_RB: 44 37 57 31 70 52 46 107\n", " MIR_2_RBP: 31 31 19 10 31 19 15 42\n", " MIR_3_FF: 65 57 64 61 88 88 91 91\n", " MIR_3_K: 22 27 21 18 37 19 20 48\n", " MIR_3_KL: 5 12 9 12 10 10 12 11\n", " MIR_3_R: 3 5 9 1 7 10 4 16\n", " MIR_3_RB: 40 26 49 34 27 39 36 45\n", " MIR_3_RBP: 30 29 17 13 30 26 32 39\n", " MIR_4_FF: 33 25 38 29 41 49 51 53\n", " MIR_4_K: 24 35 24 18 20 28 19 37\n", " MIR_4_KL: 15 12 15 10 8 13 14 14\n", " MIR_4_R: 4 3 2 4 4 1 4 3\n", " MIR_4_RB: 19 19 29 26 28 29 27 26\n", " MIR_4_RBP: 17 41 33 22 23 44 44 43\n", " MIR_5_FF: 20 23 18 24 22 45 46 53\n", " MIR_5_K: 19 28 16 27 36 29 30 41\n", " MIR_5_KL: 12 3 13 9 11 9 10 14\n", " MIR_5_R: - 4 3 - 3 3 2 -\n", " MIR_5_RB: 13 16 25 16 17 28 22 34\n", " MIR_5_RBP: 16 31 25 16 33 39 50 57\n", " MIR_6_FF: 17 18 25 21 20 37 30 44\n", " MIR_6_K: 17 28 13 16 20 22 32 21\n", " MIR_6_KL: 10 4 10 8 10 10 11 6\n", " MIR_6_R: 1 1 1 - 1 2 6 4\n", " MIR_6_RB: 12 11 18 15 7 18 19 16\n", " MIR_6_RBP: 16 31 24 18 31 39 49 39\n", " ZERO_HALF_FF: 21 18 17 13 19 8 7 29\n", " ZERO_HALF_K: 2 4 3 2 2 - 1 6\n", " ZERO_HALF_KL: 1 1 - 3 2 - 1 3\n", " ZERO_HALF_R: 147 248 286 201 279 190 223 387\n", " ZERO_HALF_RB: 16 30 38 37 26 29 46 54\n", " ZERO_HALF_RBP: 6 12 11 33 25 18 17 32\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 4/19 53% 7.17e-01 0.10\n", " 'graph_cst_lns': 2/17 47% 6.66e-01 0.10\n", " 'graph_dec_lns': 0/14 50% 7.33e-01 0.10\n", " 'graph_var_lns': 5/21 52% 7.70e-01 0.10\n", " 'lb_relax_lns': 2/6 50% 5.29e-01 0.50\n", " 'rins/rens': 3/18 44% 5.10e-01 0.10\n", " 'rnd_cst_lns': 3/19 53% 7.87e-01 0.10\n", " 'rnd_var_lns': 4/17 53% 8.18e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'fj_restart': 1 1 84 0 0 0 1 1'247\n", " 'ls_lin_restart': 4 4 73'535 0 0 0 69'998 2'044'730\n", " 'ls_lin_restart_compound': 1 1 0 23'601 1'672 10'963 180 538'987\n", " 'ls_lin_restart_compound_perturb': 2 2 0 32'409 2'282 15'061 287 659'780\n", " 'ls_lin_restart_decay_compound': 3 3 0 65'777 10'391 27'685 130 1'441'718\n", " 'ls_lin_restart_decay_compound_perturb': 2 2 0 46'324 7'708 19'298 100 1'066'260\n", " 'ls_lin_restart_decay_perturb': 3 3 68'635 0 0 0 3'231 1'230'647\n", " 'ls_lin_restart_perturb': 3 3 38'171 0 0 0 39'916 1'179'124\n", " 'ls_restart_compound': 2 2 0 49'343 3'738 22'801 361 1'006'843\n", " 'ls_restart_compound_perturb': 2 2 0 25'652 2'043 11'803 197 533'980\n", " 'ls_restart_decay': 2 2 21'738 0 0 0 940 409'114\n", " 'ls_restart_decay_compound': 4 4 0 89'201 14'855 37'163 177 1'955'407\n", " 'ls_restart_decay_compound_perturb': 4 4 0 85'193 13'353 35'912 168 1'993'232\n", " 'ls_restart_decay_perturb': 2 2 46'134 0 0 0 2'094 829'069\n", " 'ls_restart_perturb': 2 2 33'982 0 0 0 31'158 1'007'366\n", "\n", "Solutions (33) Num Rank\n", " 'fj_restart': 1 [1,1]\n", " 'graph_arc_lns': 1 [31,31]\n", " 'graph_cst_lns': 1 [19,19]\n", " 'graph_var_lns': 3 [9,32]\n", " 'lb_relax_lns_bool_h': 1 [21,21]\n", " 'ls_restart_compound_perturb': 1 [12,12]\n", " 'no_lp': 2 [5,13]\n", " 'quick_restart_no_lp': 16 [4,30]\n", " 'reduced_costs': 2 [23,33]\n", " 'rins_pump_lns': 1 [22,22]\n", " 'rnd_cst_lns': 2 [3,28]\n", " 'rnd_var_lns': 2 [2,8]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 12\n", " 'max_lp': 12\n", " 'objective_lb_search': 3\n", " 'pseudo_costs': 1\n", " 'quick_restart': 1\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 67 336 56\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 49 10 38\n", " 'pump': 641 8\n", "\n", "Improving bounds shared Num Sym\n", " 'default_lp': 1 0\n", " 'lb_tree_search': 61 0\n", " 'max_lp': 21 0\n", " 'pseudo_costs': 2 0\n", " 'quick_restart': 4 0\n", " 'quick_restart_no_lp': 3 0\n", " 'reduced_costs': 12 0\n", "\n", "Clauses shared Num\n", " 'core': 1\n", " 'no_lp': 1\n", " 'probing': 5\n", " 'quick_restart': 1\n", " 'quick_restart_no_lp': 5\n", "\n", "[Scaling] scaled_objective_bound: 1722.14 corrected_bound: 1722.14 delta: -2.1888e-07\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 1758.414392514855\n", "best_bound: 1722.136932591927\n", "integers: 688\n", "booleans: 354\n", "conflicts: 0\n", "branches: 16\n", "propagations: 82\n", "integer_propagations: 299\n", "restarts: 16\n", "lp_iterations: 0\n", "walltime: 10.0993\n", "usertime: 10.0993\n", "deterministic_time: 51.3056\n", "gap_integral: 190.811\n", "solution_fingerprint: 0x40238ccd9cfcdeef\n", "\n" ] }, { "data": { "image/svg+xml": [ "2948229 €Σλ = 1760.7 m(+1) [-1]: 9κ = 5, T = 40" ], "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# lower cable capacities to cleary observe the difference between runs\n", "wfn = WindFarmNetwork.from_pbf(\n", " filepath='data/DTU_letters.osm.pbf',\n", " cables=[(2, 1500.0), (5, 1800.0)],\n", ")\n", "terse = wfn.optimize(router=milp_router)\n", "wfn" ] }, { "cell_type": "markdown", "id": "07bc4f8f-cc78-429c-b96d-f831139a4501", "metadata": {}, "source": [ "#### Second MILP Run (`model_options2`)" ] }, { "cell_type": "code", "execution_count": 13, "id": "51ca7ec4-e786-4a25-a4b3-f47d1d560406", "metadata": {}, "outputs": [], "source": [ "model_options2 = ModelOptions(\n", " topology='radial',\n", " feeder_limit='minimum',\n", " feeder_route='straight',\n", ")" ] }, { "cell_type": "markdown", "id": "3c4f6470", "metadata": {}, "source": [ " The solver produces a strictly **radial** network, restricting the number of feeders to the minimum required given the number or turbines and maximum cable capacity. The `feeder_route='straight'` tells the solver to avoid blocking any feeder route with cables which tends to produce more **straight-line connections**, although the feeder routes may still have bends due to the exclusion zones.\n", "\n", " > Note: with this setting, neither EWRouter nor HGSRouter could secure warmstarting of the model." ] }, { "cell_type": "code", "execution_count": 14, "id": "bb30a0ea", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "3059755 €Σλ = 1807.1 m(+0) [-1]: 8κ = 5, T = 40" ], "text/plain": [ "" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router2 = MILPRouter(\n", " solver_name='ortools',\n", " time_limit=10,\n", " mip_gap=0.01,\n", " model_options=model_options2\n", ")\n", "terse = wfn.optimize(router=milp_router2)\n", "wfn" ] }, { "cell_type": "markdown", "id": "d974eed7", "metadata": {}, "source": [ "#### Summary\n", "\n", "The `MILP` router strictly adheres to all provided `ModelOptions`:\n", "\n", "* It guarantees enforcement of topology (`branched` vs. `radial`).\n", "* It respects feeder constraints (`unlimited` vs. `minimum`).\n", "* It conforms to the required routing structure (`segmented` vs. `straight`)." ] }, { "cell_type": "markdown", "id": "152f34e2", "metadata": {}, "source": [ "#### Warmstarting of MILP routers\n", "Warmstarter Compatibility with different `ModelOptions` setting is summarized in table below.\n", "\n", "| **Model Option** | **Value** | **Warmstarter** |\n", "|------------------|---------------|------------------|\n", "| **Feeder limit** | Unlimited | ✅ all works |\n", "| | Minimum | only HGSRouter |\n", "| **Feeder route** | Straight | ✅ all works |\n", "| | Segmented | ✅ all works |\n", "| **Topology** | Branched | ✅ all works |\n", "| | Radial | only HGSRouter |\n", "\n", "\n", "In the following section, a few examples are run to further illustrate this table.\n" ] }, { "cell_type": "markdown", "id": "3cab3a78-52f4-4855-a710-beeb4fcac07c", "metadata": {}, "source": [ "Example 1:" ] }, { "cell_type": "code", "execution_count": 15, "id": "80f16f4c-af16-4ac8-8220-f9438e18aee0", "metadata": { "scrolled": true }, "outputs": [], "source": [ "model_options = ModelOptions(\n", " topology='branched',\n", " feeder_limit='unlimited',\n", " feeder_route='segmented',\n", ")" ] }, { "cell_type": "code", "execution_count": 16, "id": "25b28f0c-2563-459c-bd07-fa8c94a0ebf8", "metadata": {}, "outputs": [], "source": [ "milp_router = MILPRouter(\n", " solver_name='ortools',\n", " time_limit=1,\n", " mip_gap=0.01,\n", " model_options=model_options,\n", " verbose=True\n", ")" ] }, { "cell_type": "markdown", "id": "dd65e655", "metadata": {}, "source": [ "Either EWRouter or HGSRouter can be used to warmstart." ] }, { "cell_type": "code", "execution_count": 17, "id": "003714e7-bf75-4cda-ae19-58c74e126c75", "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: 1 log_search_progress: true relative_gap_limit: 0.01\n", "Setting number of workers to 16\n", "\n", "Initial optimization model '': (model_fingerprint: 0x7950fb95aaeccb26)\n", "#Variables: 708 (#bools: 354 in floating point objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 262 (#literals: 776)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 122 (#terms: 1'767)\n", "\n", "Starting presolve at 0.00s\n", "The solution hint is complete and is feasible.\n", "[Scaling] Floating point objective has 354 terms with magnitude in [18.5198, 233.655] average = 64.9611\n", "[Scaling] Objective coefficient relative error: 2.56462e-08\n", "[Scaling] Objective worst-case absolute error: 8.40207e-05\n", "[Scaling] Objective scaling factor: 524288\n", " 3.51e-04s 0.00e+00d [DetectDominanceRelations] \n", " 9.90e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 7.45e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=302 \n", " 4.62e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 2.22e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'653 nodes and 4'971 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0007306 dtime: 0.00048184\n", " 3.16e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 8.90e-03s 1.38e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 1.07e-03s 1.49e-04d [MaxClique] Merged 262(776 literals) into 142(536 literals) at_most_ones. \n", " 2.07e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.12e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 4.02e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 1.86e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 1.66e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.62e-04s 5.98e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=83 #num_inclusions=41 \n", " 3.11e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.41e-03s 6.97e-05d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=184 #num_inclusions=182 \n", " 4.18e-05s 1.65e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=3 \n", " 2.04e-04s 9.42e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 1.67e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 3.79e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 1.76e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 1.99e-04s 0.00e+00d [DetectDominanceRelations] \n", " 1.69e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 3.82e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.12e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.35e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 2.07e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0006007 dtime: 0.00043606\n", "[SAT presolve] num removable Booleans: 0 / 354\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.000465s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0006324s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", " 2.82e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.46e-03s 1.27e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 9.30e-04s 1.45e-04d [MaxClique] \n", " 3.33e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.36e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.47e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 2.71e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 5.54e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.48e-04s 4.48e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=82 #num_inclusions=40 \n", " 2.65e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.63e-04s 2.79e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=183 \n", " 3.63e-05s 1.10e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2 \n", " 2.64e-04s 9.14e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 2.06e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 3.97e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 1.93e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.86e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.37e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 3.90e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=2'948 #tight_variables=354 #tight_constraints=40 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 81 times.\n", " - rule 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 708 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 40 times.\n", " - rule 'linear: positive equal one' was applied 40 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 40 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 40 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 39 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 354 times.\n", " - rule 'variables: detect half reified value encoding' was applied 708 times.\n", "\n", "Presolved optimization model '': (model_fingerprint: 0xa5c10887ee45216)\n", "#Variables: 708 (#bools: 314 in objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 105 (#literals: 462)\n", "#kBoolAnd: 37 (#enforced: 37) (#literals: 74)\n", "#kExactlyOne: 40 (#literals: 354)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 81 (#terms: 1'059)\n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0004514 dtime: 0.00043662\n", "\n", "Preloading model.\n", "#Bound 0.07s best:inf next:[1364.00132,11449.6914] initial_domain\n", "#1 0.07s best:1812.72623 next:[1364.00132,1812.72623] complete_hint\n", "#Model 0.08s var:708/708 constraints:972/972\n", "\n", "Starting search at 0.08s 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.10s best:1812.72623 next:[1377.09321,1812.72623] am1_presolve (num_literals=314 num_am1=11 increase=6863922 work_done=1181)\n", "#2 0.10s best:1806.84914 next:[1377.09321,1806.84914] quick_restart_no_lp [hint] (fixed_bools=0/354)\n", "#Bound 0.11s best:1806.84914 next:[1446.52179,1806.84914] pseudo_costs\n", "#Bound 0.12s best:1806.84914 next:[1657.8143,1806.84914] max_lp\n", "#3 0.13s best:1804.44445 next:[1657.8143,1804.44445] quick_restart_no_lp (fixed_bools=0/359)\n", "#4 0.14s best:1803.94659 next:[1657.8143,1803.94659] quick_restart_no_lp (fixed_bools=0/369)\n", "#5 0.15s best:1803.51688 next:[1657.8143,1803.51687] quick_restart_no_lp (fixed_bools=0/370)\n", "#6 0.20s best:1764.91917 next:[1657.8143,1764.91917] graph_arc_lns (d=5.00e-01 s=14 t=0.10 p=0.00 stall=0 h=base)\n", "#Bound 0.21s best:1764.91917 next:[1669.59325,1764.91917] max_lp\n", "#Bound 0.21s best:1764.91917 next:[1671.54486,1764.91917] lb_tree_search\n", "#7 0.34s best:1758.41439 next:[1671.54486,1758.41439] quick_restart_no_lp (fixed_bools=0/379)\n", "#Bound 0.35s best:1758.41439 next:[1681.46046,1758.41439] max_lp\n", "#Bound 0.36s best:1758.41439 next:[1682.19732,1758.41439] lb_tree_search\n", "#Bound 0.63s best:1758.41439 next:[1684.40247,1758.41439] reduced_costs\n", "#Model 0.64s var:706/708 constraints:969/972\n", "#Bound 0.73s best:1758.41439 next:[1690.42996,1758.41439] lb_tree_search\n", "#Bound 0.78s best:1758.41439 next:[1692.34924,1758.41439] reduced_costs\n", "#Model 0.79s var:694/708 constraints:956/972\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [921.03ms, 921.03ms] 921.03ms 0.00ns 921.03ms 1 [392.91ms, 392.91ms] 392.91ms 0.00ns 392.91ms\n", " 'default_lp': 1 [920.69ms, 920.69ms] 920.69ms 0.00ns 920.69ms 1 [ 29.72ms, 29.72ms] 29.72ms 0.00ns 29.72ms\n", " 'feasibility_pump': 4 [ 57.50us, 217.40ms] 88.24ms 89.97ms 352.98ms 2 [ 50.45ms, 90.49ms] 70.47ms 20.02ms 140.94ms\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': 3 [ 88.93ms, 361.62ms] 192.14ms 120.78ms 576.43ms 3 [ 9.42ms, 100.04ms] 41.16ms 41.68ms 123.47ms\n", " 'graph_cst_lns': 3 [ 15.27ms, 383.41ms] 163.26ms 158.72ms 489.79ms 3 [ 11.42us, 100.02ms] 38.29ms 44.06ms 114.87ms\n", " 'graph_dec_lns': 4 [ 4.73ms, 128.94ms] 45.46ms 49.32ms 181.84ms 4 [ 10.00ns, 15.42ms] 3.98ms 6.61ms 15.90ms\n", " 'graph_var_lns': 3 [ 9.61ms, 425.30ms] 168.15ms 183.48ms 504.44ms 3 [ 2.36us, 100.03ms] 35.01ms 46.02ms 105.02ms\n", " 'lb_relax_lns': 2 [243.33ms, 309.31ms] 276.32ms 32.99ms 552.65ms 2 [ 44.50ms, 46.68ms] 45.59ms 1.09ms 91.18ms\n", " 'lb_tree_search': 1 [919.15ms, 919.15ms] 919.15ms 0.00ns 919.15ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'ls': 2 [219.73ms, 270.61ms] 245.17ms 25.44ms 490.33ms 2 [100.00ms, 100.01ms] 100.01ms 1.56us 200.01ms\n", " 'ls_lin': 2 [221.20ms, 228.82ms] 225.01ms 3.81ms 450.02ms 2 [100.00ms, 100.01ms] 100.01ms 1.08us 200.01ms\n", " 'max_lp': 1 [920.40ms, 920.40ms] 920.40ms 0.00ns 920.40ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'no_lp': 1 [920.25ms, 920.25ms] 920.25ms 0.00ns 920.25ms 1 [267.28ms, 267.28ms] 267.28ms 0.00ns 267.28ms\n", " 'objective_lb_search': 1 [918.12ms, 918.12ms] 918.12ms 0.00ns 918.12ms 1 [ 30.96ms, 30.96ms] 30.96ms 0.00ns 30.96ms\n", " 'probing': 1 [919.00ms, 919.00ms] 919.00ms 0.00ns 919.00ms 1 [ 42.10ms, 42.10ms] 42.10ms 0.00ns 42.10ms\n", " 'pseudo_costs': 1 [915.78ms, 915.78ms] 915.78ms 0.00ns 915.78ms 1 [ 78.70ms, 78.70ms] 78.70ms 0.00ns 78.70ms\n", " 'quick_restart': 1 [919.62ms, 919.62ms] 919.62ms 0.00ns 919.62ms 1 [ 31.00ms, 31.00ms] 31.00ms 0.00ns 31.00ms\n", " 'quick_restart_no_lp': 1 [919.65ms, 919.65ms] 919.65ms 0.00ns 919.65ms 1 [257.33ms, 257.33ms] 257.33ms 0.00ns 257.33ms\n", " 'reduced_costs': 1 [919.29ms, 919.29ms] 919.29ms 0.00ns 919.29ms 1 [ 41.89ms, 41.89ms] 41.89ms 0.00ns 41.89ms\n", " 'rins/rens': 4 [ 6.78ms, 248.69ms] 85.68ms 97.38ms 342.73ms 3 [987.00ns, 48.22ms] 18.32ms 21.32ms 54.97ms\n", " 'rnd_cst_lns': 5 [ 12.82ms, 139.50ms] 59.76ms 43.55ms 298.79ms 5 [302.00ns, 26.07ms] 6.83ms 9.85ms 34.14ms\n", " 'rnd_var_lns': 4 [ 9.06ms, 243.26ms] 81.54ms 94.09ms 326.15ms 4 [ 10.00ns, 47.27ms] 12.60ms 20.04ms 50.38ms\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 365 11'694 40'137 2'687 249'886 682'169\n", " 'default_lp': 354 10 869 709 4'743 16'384\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': 354 0 708 708 4'438 14'937\n", " 'max_lp': 354 0 708 708 4'450 14'987\n", " 'no_lp': 354 7'475 17'684 2'958 366'138 1'274'930\n", " 'objective_lb_search': 355 10 869 709 4'744 16'392\n", " 'probing': 355 10 873 713 4'763 16'475\n", " 'pseudo_costs': 354 14 945 709 5'068 18'760\n", " 'quick_restart': 354 10 869 709 4'742 16'383\n", " 'quick_restart_no_lp': 395 4'309 47'010 4'131 253'207 1'023'548\n", " 'reduced_costs': 354 10 863 709 4'764 17'015\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 10'631 88'453 456'551 194'535 157 676 7'067 0 96 1'660 86\n", " 'default_lp': 10 167 1'222 0 0 0 0 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 0 0 0 0 0 0\n", " 'max_lp': 0 0 0 0 0 0 0 0 0 0 0\n", " 'no_lp': 6'726 104'037 333'142 0 81 319 2'512 0 14 172 33\n", " 'objective_lb_search': 10 166 1'261 0 0 0 0 0 0 0 0\n", " 'probing': 10 170 1'266 0 0 0 0 0 0 0 0\n", " 'pseudo_costs': 14 284 1'709 0 0 0 0 0 0 0 0\n", " 'quick_restart': 10 164 1'250 0 0 0 0 0 0 0 0\n", " 'quick_restart_no_lp': 3'671 61'655 195'834 0 80 706 4'970 0 80 766 21\n", " 'reduced_costs': 10 218 1'451 0 0 0 0 0 0 0 0\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 1'834 1'143 140 0 0\n", " 'lb_tree_search': 1 666 616 8 0 0\n", " 'max_lp': 1 680 616 9 0 0\n", " 'objective_lb_search': 1 1'876 1'183 138 0 0\n", " 'probing': 1 2'053 1'089 140 0 0\n", " 'pseudo_costs': 1 2'316 984 154 12 2\n", " 'quick_restart': 1 1'887 1'161 136 0 0\n", " 'reduced_costs': 1 1'930 1'040 90 11 0\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 847 rows, 669 columns, 7309 entries\n", " 'lb_tree_search': 1486 rows, 708 columns, 9237 entries\n", " 'max_lp': 1446 rows, 708 columns, 8521 entries\n", " 'objective_lb_search': 853 rows, 669 columns, 7279 entries\n", " 'probing': 823 rows, 669 columns, 7310 entries\n", " 'pseudo_costs': 880 rows, 708 columns, 7033 entries\n", " 'quick_restart': 793 rows, 669 columns, 5956 entries\n", " 'reduced_costs': 877 rows, 708 columns, 8891 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 0 133 0 5'308 0\n", " 'lb_tree_search': 0 0 8 0 6'418 0\n", " 'max_lp': 0 0 9 0 6'731 0\n", " 'objective_lb_search': 0 1 133 0 5'272 0\n", " 'probing': 0 0 136 0 4'653 0\n", " 'pseudo_costs': 0 0 163 0 3'986 0\n", " 'quick_restart': 0 0 131 0 4'211 0\n", " 'reduced_costs': 0 0 96 0 6'480 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 2'315 62 46 0 47 2 4 1'143/2'274\n", " 'lb_tree_search': 1'942 74 0 0 0 8 1 616/1'092\n", " 'max_lp': 1'942 102 382 0 356 7 0 616/1'081\n", " 'objective_lb_search': 2'355 45 95 0 95 1 35 1'183/2'361\n", " 'probing': 2'261 57 0 0 0 7 21 1'089/2'211\n", " 'pseudo_costs': 2'310 46 176 0 176 1 15 984/1'904\n", " 'quick_restart': 2'333 30 76 0 76 1 41 1'161/2'242\n", " 'reduced_costs': 2'366 100 551 0 505 6 7 1'040/1'864\n", "\n", "Lp Cut pseudo_costs default_lp max_lp quick_restart reduced_costs lb_tree_search probing objective_lb_search\n", " CG_FF: 18 15 7 22 12 6 16 16\n", " CG_K: 7 13 5 5 5 5 6 7\n", " CG_KL: 1 4 - - 1 - 3 4\n", " CG_R: 21 23 6 32 22 8 35 30\n", " CG_RB: 45 58 19 50 61 19 79 59\n", " CG_RBP: 6 21 3 32 17 3 37 21\n", " Clique: - - - - 1 - - -\n", " IB: 340 317 - 309 340 - 308 334\n", " MIR_1_FF: 28 37 20 47 33 25 31 59\n", " MIR_1_K: 3 9 1 13 2 - 11 16\n", " MIR_1_KL: 2 5 2 8 3 2 7 8\n", " MIR_1_R: - - 1 1 - - - 1\n", " MIR_1_RB: 18 18 13 16 13 7 22 21\n", " MIR_1_RBP: - 10 1 13 2 - 16 10\n", " MIR_2_FF: 37 68 42 49 50 38 52 48\n", " MIR_2_K: 6 28 3 17 2 2 18 23\n", " MIR_2_KL: 2 4 2 3 2 2 2 1\n", " MIR_2_R: 2 1 3 3 2 3 6 3\n", " MIR_2_RB: 33 42 37 36 32 36 27 31\n", " MIR_2_RBP: 4 17 1 18 5 3 20 19\n", " MIR_3_FF: 49 42 52 41 39 45 34 29\n", " MIR_3_K: 15 26 10 25 21 10 20 31\n", " MIR_3_KL: 8 10 6 8 10 4 5 8\n", " MIR_3_R: 8 3 5 - 5 3 - 1\n", " MIR_3_RB: 30 24 33 22 25 28 13 17\n", " MIR_3_RBP: 12 15 13 13 5 8 21 10\n", " MIR_4_FF: 16 32 34 24 44 31 21 26\n", " MIR_4_K: 24 27 18 24 22 15 13 25\n", " MIR_4_KL: 9 6 11 14 8 9 6 9\n", " MIR_4_R: - 2 1 3 2 4 - -\n", " MIR_4_RB: 15 18 21 19 19 24 21 11\n", " MIR_4_RBP: 8 24 15 15 6 15 15 21\n", " MIR_5_FF: 24 9 26 26 15 27 24 19\n", " MIR_5_K: 14 10 9 19 17 16 14 26\n", " MIR_5_KL: 9 4 1 10 11 7 3 11\n", " MIR_5_R: 1 3 2 3 1 1 - 2\n", " MIR_5_RB: 19 10 26 13 12 16 12 13\n", " MIR_5_RBP: 3 9 13 14 9 15 6 14\n", " MIR_6_FF: 15 12 20 20 13 17 14 15\n", " MIR_6_K: 9 12 13 19 16 19 15 18\n", " MIR_6_KL: 4 3 7 6 14 9 8 4\n", " MIR_6_R: 1 1 3 1 3 5 - -\n", " MIR_6_RB: 10 6 16 19 15 17 8 9\n", " MIR_6_RBP: 5 8 11 15 12 20 15 11\n", " ZERO_HALF_FF: 12 18 5 16 4 5 13 24\n", " ZERO_HALF_K: 1 6 - 5 - 1 3 11\n", " ZERO_HALF_KL: - 2 - - - 1 - 3\n", " ZERO_HALF_R: 77 92 58 74 72 66 68 91\n", " ZERO_HALF_RB: 8 13 17 16 12 14 11 10\n", " ZERO_HALF_RBP: 5 6 4 3 3 5 10 3\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 1/3 67% 7.21e-01 0.10\n", " 'graph_cst_lns': 0/3 67% 7.21e-01 0.10\n", " 'graph_dec_lns': 0/4 75% 8.21e-01 0.10\n", " 'graph_var_lns': 1/3 67% 7.21e-01 0.10\n", " 'lb_relax_lns': 1/2 50% 5.38e-01 0.50\n", " 'rins/rens': 3/4 75% 8.21e-01 0.10\n", " 'rnd_cst_lns': 1/5 80% 8.80e-01 0.10\n", " 'rnd_var_lns': 0/4 75% 8.21e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'ls_lin_restart': 1 1 17'672 0 0 0 10'390 551'904\n", " 'ls_lin_restart_perturb': 1 1 16'909 0 0 0 6'662 564'344\n", " 'ls_restart_decay': 1 1 21'071 0 0 0 798 402'357\n", " 'ls_restart_decay_compound': 1 1 0 22'556 3'166 9'695 38 524'213\n", "\n", "Solutions (7) Num Rank\n", " 'complete_hint': 1 [1,1]\n", " 'graph_arc_lns': 1 [6,6]\n", " 'quick_restart_no_lp': 5 [2,7]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 3\n", " 'max_lp': 3\n", " 'pseudo_costs': 1\n", " 'reduced_costs': 2\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 14 61 11\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 2 4 1\n", " 'pump': 15 0\n", "\n", "Improving bounds shared Num Sym\n", " 'max_lp': 2 0\n", " 'pseudo_costs': 14 0\n", " 'reduced_costs': 10 0\n", "\n", "Clauses shared Num\n", " 'probing': 2\n", " 'quick_restart_no_lp': 1\n", "\n", "[Scaling] scaled_objective_bound: 1692.35 corrected_bound: 1692.35 delta: -2.40366e-07\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 1758.414392514855\n", "best_bound: 1692.349237682382\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: 1.0493\n", "usertime: 1.0493\n", "deterministic_time: 2.30624\n", "gap_integral: 9.83721\n", "solution_fingerprint: 0x40238ccd9cfcdeef\n", "\n" ] } ], "source": [ "wfn.optimize(router=EWRouter())\n", "terse = wfn.optimize(router=milp_router)" ] }, { "cell_type": "markdown", "id": "26129483", "metadata": {}, "source": [ "Example 2:" ] }, { "cell_type": "code", "execution_count": 18, "id": "0c4d440a-fca2-4f9a-a8e4-0b033ab8c2af", "metadata": { "scrolled": true }, "outputs": [], "source": [ "model_options = ModelOptions(\n", " topology='radial',\n", " feeder_limit='unlimited',\n", " feeder_route='segmented',\n", ")" ] }, { "cell_type": "code", "execution_count": 19, "id": "ea20c923-1c34-44c3-8aac-74869fddcea5", "metadata": {}, "outputs": [], "source": [ "milp_router = MILPRouter(\n", " solver_name='ortools',\n", " time_limit=1,\n", " mip_gap=0.01,\n", " model_options=model_options,\n", " verbose=True\n", ")" ] }, { "cell_type": "markdown", "id": "54186f22-018d-4e10-a75d-2949b77e12fc", "metadata": {}, "source": [ "Now the solution by EWRouter is not a feasible warmstart." ] }, { "cell_type": "code", "execution_count": 20, "id": "6ee86e45", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Warning: No warmstarting (even though a solution is available) due to the following reason(s):\n", " - branched network incompatible with model option: topology=\"radial\"\n", "\n", "\n", "Starting CP-SAT solver v9.14.6206\n", "Parameters: max_time_in_seconds: 1 log_search_progress: true relative_gap_limit: 0.01\n", "Setting number of workers to 16\n", "\n", "Initial optimization model '': (model_fingerprint: 0x97202364a81551af)\n", "#Variables: 708 (#bools: 354 in floating point objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 262 (#literals: 776)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 2\n", "#kLinearN: 161 (#terms: 2'078)\n", "\n", "Starting presolve at 0.00s\n", "The solution hint is complete, but it is infeasible! we will try to repair it.\n", "[Scaling] Floating point objective has 354 terms with magnitude in [18.5198, 233.655] average = 64.9611\n", "[Scaling] Objective coefficient relative error: 2.56462e-08\n", "[Scaling] Objective worst-case absolute error: 8.40207e-05\n", "[Scaling] Objective scaling factor: 524288\n", " 3.19e-04s 0.00e+00d [DetectDominanceRelations] \n", " 6.98e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 6.75e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=342 \n", " 4.58e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 5.42e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'693 nodes and 5'285 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0012306 dtime: 0.00049342\n", " 1.98e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 6.83e-03s 1.42e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 1.11e-03s 3.14e-04d [MaxClique] Merged 302(1'090 literals) into 182(850 literals) at_most_ones. \n", " 1.89e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.19e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 4.73e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 1.72e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 1.51e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.84e-04s 5.98e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=83 #num_inclusions=41 \n", " 2.71e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.33e-03s 8.54e-05d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=224 #num_inclusions=222 \n", " 3.84e-05s 1.65e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=3 \n", " 2.40e-04s 1.03e-04d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 6.44e-04s 1.08e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 6.45e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 1.94e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.31e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.25e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.14e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.17e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 6.88e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 1.82e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'452 nodes and 4'451 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0003896 dtime: 0.00044784\n", "[SAT presolve] num removable Booleans: 0 / 354\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0004931s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0006789s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", " 2.88e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.28e-03s 1.26e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 7.04e-04s 3.09e-04d [MaxClique] \n", " 2.46e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.76e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.37e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 3.43e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 1.94e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.95e-04s 4.48e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=82 #num_inclusions=40 \n", " 4.38e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.75e-04s 3.74e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=223 \n", " 5.46e-05s 1.10e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2 \n", " 2.49e-04s 9.83e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 3.36e-04s 1.08e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 4.00e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 2.81e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.01e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.17e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 4.59e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=2'948 #tight_variables=354 #tight_constraints=40 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 81 times.\n", " - rule 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 708 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 40 times.\n", " - rule 'linear: positive at most one' was applied 40 times.\n", " - rule 'linear: positive equal one' was applied 40 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 40 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 40 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 39 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 354 times.\n", " - rule 'variables: detect half reified value encoding' was applied 708 times.\n", "\n", "Presolved optimization model '': (model_fingerprint: 0x90d5ed6cc244e3d4)\n", "#Variables: 708 (#bools: 314 in objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 145 (#literals: 776)\n", "#kBoolAnd: 37 (#enforced: 37) (#literals: 74)\n", "#kExactlyOne: 40 (#literals: 354)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 81 (#terms: 1'059)\n", "[Symmetry] Graph for symmetry has 2'452 nodes and 4'451 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0005778 dtime: 0.00044838\n", "\n", "Preloading model.\n", "#Bound 0.07s best:inf next:[1364.00132,11449.6914] initial_domain\n", "The solution hint is complete, but it is infeasible! we will try to repair it.\n", "#Model 0.07s var:708/708 constraints:1012/1012\n", "\n", "Starting search at 0.08s 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", "#1 0.09s best:2301.15557 next:[1364.00132,2301.15557] fj_restart(batch:1 lin{mvs:733 evals:10'249} #w_updates:288 #perturb:0)\n", "#Bound 0.10s best:2301.15557 next:[1396.24224,2301.15557] am1_presolve (num_literals=314 num_am1=12 increase=16903528 work_done=1733)\n", "#Bound 0.11s best:2301.15557 next:[1471.69595,2301.15557] pseudo_costs\n", "#Bound 0.12s best:2301.15557 next:[1474.02698,2301.15557] pseudo_costs\n", "#2 0.12s best:2236.66269 next:[1474.02698,2236.66269] graph_var_lns (d=5.00e-01 s=18 t=0.10 p=0.00 stall=0 h=base) (fixed_bools=0/354)\n", "#Bound 0.13s best:2236.66269 next:[1672.91324,2236.66269] max_lp\n", "#3 0.13s best:2236.37384 next:[1672.91324,2236.37383] quick_restart_no_lp (fixed_bools=0/369)\n", "#4 0.13s best:2235.55551 next:[1672.91324,2235.55551] quick_restart_no_lp (fixed_bools=0/370)\n", "#5 0.13s best:2216.78526 next:[1672.91324,2216.78526] ls_lin_restart_perturb(batch:1 lin{mvs:728 evals:12'010} #w_updates:360 #perturb:0) (fixed_bools=0/354)\n", "#6 0.14s best:2216.4964 next:[1672.91324,2216.4964] ls_lin_restart_perturb(batch:1 lin{mvs:728 evals:12'010} #w_updates:360 #perturb:0) [combined with: quick_restart_no_lp...] (fixed_bools=0/354)\n", "#7 0.14s best:2150.46829 next:[1672.91324,2150.46828] rnd_var_lns (d=7.07e-01 s=25 t=0.10 p=1.00 stall=1 h=base) (fixed_bools=0/354)\n", "#8 0.15s best:2135.63545 next:[1672.91324,2135.63545] no_lp (fixed_bools=0/354)\n", "#9 0.15s best:2078.04167 next:[1672.91324,2078.04167] rnd_cst_lns (d=7.07e-01 s=26 t=0.10 p=1.00 stall=1 h=base) (fixed_bools=0/354)\n", "#10 0.16s best:2073.02135 next:[1672.91324,2073.02135] quick_restart_no_lp (fixed_bools=0/376)\n", "#11 0.18s best:1946.15536 next:[1672.91324,1946.15535] quick_restart_no_lp (fixed_bools=0/376)\n", "#Bound 0.19s best:1946.15536 next:[1686.50504,1946.15535] max_lp\n", "#Bound 0.19s best:1946.15536 next:[1687.43262,1946.15535] lb_tree_search\n", "#12 0.20s best:1935.16002 next:[1687.43262,1935.16002] quick_restart_no_lp (fixed_bools=0/378)\n", "#13 0.21s best:1934.87116 next:[1687.43262,1934.87116] quick_restart_no_lp (fixed_bools=0/378)\n", "#14 0.22s best:1924.80119 next:[1687.43262,1924.80119] quick_restart_no_lp (fixed_bools=0/379)\n", "#15 0.26s best:1922.97009 next:[1687.43262,1922.97009] quick_restart_no_lp (fixed_bools=0/381)\n", "#16 0.26s best:1849.93425 next:[1687.43262,1849.93425] rnd_var_lns (d=8.14e-01 s=33 t=0.10 p=1.00 stall=0 h=base) (fixed_bools=0/354)\n", "#Bound 0.27s best:1849.93425 next:[1693.97098,1849.93425] max_lp\n", "#17 0.27s best:1838.03318 next:[1693.97098,1838.03317] rnd_var_lns (d=8.14e-01 s=33 t=0.10 p=1.00 stall=0 h=base) [combined with: quick_restart_no_lp...] (fixed_bools=0/354)\n", "#18 0.27s best:1813.24723 next:[1693.97098,1813.24723] lb_relax_lns_bool_h (d=5.00e-01 s=22 t=0.50 p=0.00 stall=0 h=base) (fixed_bools=0/354)\n", "#19 0.28s best:1789.70585 next:[1693.97098,1789.70585] quick_restart_no_lp (fixed_bools=0/384)\n", "#20 0.29s best:1789.26092 next:[1693.97098,1789.26092] quick_restart_no_lp (fixed_bools=0/384)\n", "#21 0.32s best:1772.78469 next:[1693.97098,1772.78469] quick_restart_no_lp (fixed_bools=0/384)\n", "#Bound 0.43s best:1772.78469 next:[1699.862,1772.78469] lb_tree_search\n", "#Bound 0.45s best:1772.78469 next:[1704.49612,1772.78469] max_lp\n", "#Bound 0.73s best:1772.78469 next:[1713.1057,1772.78469] max_lp\n", "#Model 0.86s var:690/708 constraints:991/1012\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [929.20ms, 929.20ms] 929.20ms 0.00ns 929.20ms 1 [395.92ms, 395.92ms] 395.92ms 0.00ns 395.92ms\n", " 'default_lp': 1 [920.06ms, 920.06ms] 920.06ms 0.00ns 920.06ms 1 [ 38.98ms, 38.98ms] 38.98ms 0.00ns 38.98ms\n", " 'feasibility_pump': 5 [ 72.00us, 141.62ms] 52.25ms 60.02ms 261.27ms 2 [ 49.66ms, 55.81ms] 52.73ms 3.08ms 105.46ms\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': 1 [ 11.34ms, 11.34ms] 11.34ms 0.00ns 11.34ms 1 [ 2.33ms, 2.33ms] 2.33ms 0.00ns 2.33ms\n", " 'fs_random': 1 [ 12.60ms, 12.60ms] 12.60ms 0.00ns 12.60ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_no_lp': 1 [ 13.13ms, 13.13ms] 13.13ms 0.00ns 13.13ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'fs_random_quick_restart_no_lp': 1 [ 12.20ms, 12.20ms] 12.20ms 0.00ns 12.20ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'graph_arc_lns': 5 [ 9.21ms, 352.63ms] 91.14ms 131.41ms 455.71ms 4 [145.24us, 100.01ms] 25.99ms 42.76ms 103.96ms\n", " 'graph_cst_lns': 4 [ 24.97ms, 247.28ms] 85.31ms 93.60ms 341.24ms 4 [ 53.18us, 55.54ms] 14.69ms 23.59ms 58.76ms\n", " 'graph_dec_lns': 4 [ 5.62ms, 205.60ms] 107.28ms 97.56ms 429.11ms 4 [ 10.00ns, 46.66ms] 21.48ms 21.64ms 85.92ms\n", " 'graph_var_lns': 5 [ 10.02ms, 218.81ms] 78.47ms 77.60ms 392.34ms 4 [332.92us, 51.40ms] 18.22ms 20.33ms 72.86ms\n", " 'lb_relax_lns': 2 [167.49ms, 731.72ms] 449.60ms 282.12ms 899.21ms 2 [ 23.41ms, 243.13ms] 133.27ms 109.86ms 266.53ms\n", " 'lb_tree_search': 1 [916.14ms, 916.14ms] 916.14ms 0.00ns 916.14ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'ls': 2 [204.62ms, 250.44ms] 227.53ms 22.91ms 455.06ms 2 [100.01ms, 100.01ms] 100.01ms 925.00ns 200.02ms\n", " 'ls_lin': 4 [ 14.15ms, 210.27ms] 105.70ms 88.94ms 422.81ms 4 [ 4.13ms, 100.00ms] 49.11ms 44.63ms 196.42ms\n", " 'max_lp': 1 [928.86ms, 928.86ms] 928.86ms 0.00ns 928.86ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'no_lp': 1 [956.08ms, 956.08ms] 956.08ms 0.00ns 956.08ms 1 [369.09ms, 369.09ms] 369.09ms 0.00ns 369.09ms\n", " 'objective_lb_search': 1 [916.29ms, 916.29ms] 916.29ms 0.00ns 916.29ms 1 [ 74.02ms, 74.02ms] 74.02ms 0.00ns 74.02ms\n", " 'probing': 1 [926.85ms, 926.85ms] 926.85ms 0.00ns 926.85ms 1 [ 46.89ms, 46.89ms] 46.89ms 0.00ns 46.89ms\n", " 'pseudo_costs': 1 [927.39ms, 927.39ms] 927.39ms 0.00ns 927.39ms 1 [ 31.79ms, 31.79ms] 31.79ms 0.00ns 31.79ms\n", " 'quick_restart': 1 [919.60ms, 919.60ms] 919.60ms 0.00ns 919.60ms 1 [ 34.14ms, 34.14ms] 34.14ms 0.00ns 34.14ms\n", " 'quick_restart_no_lp': 1 [927.91ms, 927.91ms] 927.91ms 0.00ns 927.91ms 1 [304.63ms, 304.63ms] 304.63ms 0.00ns 304.63ms\n", " 'reduced_costs': 1 [928.35ms, 928.35ms] 928.35ms 0.00ns 928.35ms 1 [ 99.69ms, 99.69ms] 99.69ms 0.00ns 99.69ms\n", " 'rins/rens': 5 [ 6.61ms, 368.47ms] 86.50ms 141.38ms 432.48ms 3 [329.00ns, 100.01ms] 34.02ms 46.67ms 102.07ms\n", " 'rnd_cst_lns': 5 [ 11.06ms, 159.99ms] 51.81ms 55.57ms 259.06ms 4 [ 10.00ns, 37.04ms] 9.99ms 15.64ms 39.97ms\n", " 'rnd_var_lns': 5 [ 8.73ms, 81.57ms] 43.87ms 26.69ms 219.37ms 5 [ 10.00ns, 9.29ms] 3.36ms 3.71ms 16.79ms\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 366 10'928 24'955 1'484 453'923 890'188\n", " 'default_lp': 354 10 816 709 7'130 18'163\n", " 'fs_random': 354 0 2 2 14 36\n", " 'fs_random_no_lp': 354 0 158 158 1'720 4'177\n", " 'fs_random_quick_restart_no_lp': 354 0 82 82 827 1'993\n", " 'lb_tree_search': 354 0 808 708 6'944 18'011\n", " 'max_lp': 354 0 708 708 6'758 17'265\n", " 'no_lp': 354 7'469 16'493 3'570 407'250 1'307'135\n", " 'objective_lb_search': 355 11 824 709 7'363 19'146\n", " 'probing': 355 11 818 713 7'204 18'432\n", " 'pseudo_costs': 354 13 816 709 7'176 19'230\n", " 'quick_restart': 354 10 816 709 7'129 18'159\n", " 'quick_restart_no_lp': 399 4'164 47'795 5'073 300'942 1'060'258\n", " 'reduced_costs': 359 26 977 709 7'733 22'658\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 9'756 152'866 601'354 264'527 115 104 684 0 0 0 0\n", " 'default_lp': 10 216 783 0 0 0 0 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 0 0 0 0 0 0\n", " 'max_lp': 0 0 0 0 0 0 0 0 0 0 0\n", " 'no_lp': 6'880 93'214 395'137 0 89 344 2'365 0 28 265 7\n", " 'objective_lb_search': 11 130 628 0 0 0 0 0 0 0 0\n", " 'probing': 11 209 970 0 0 0 0 0 0 0 0\n", " 'pseudo_costs': 13 348 1'761 0 0 0 0 0 0 0 0\n", " 'quick_restart': 10 211 787 0 0 0 0 0 0 0 0\n", " 'quick_restart_no_lp': 3'344 64'249 200'940 0 83 977 6'844 0 154 1'417 35\n", " 'reduced_costs': 24 796 2'309 0 0 0 0 0 0 0 0\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 2'144 1'141 127 0 1\n", " 'fs_random': 1 0 0 0 0 0\n", " 'lb_tree_search': 1 1'315 573 72 1 0\n", " 'max_lp': 1 795 631 10 0 0\n", " 'objective_lb_search': 1 2'495 1'184 136 0 1\n", " 'probing': 1 2'102 1'224 121 0 0\n", " 'pseudo_costs': 1 1'942 1'120 102 7 0\n", " 'quick_restart': 1 2'007 1'190 120 0 1\n", " 'reduced_costs': 1 3'301 1'037 150 19 6\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 861 rows, 669 columns, 7446 entries\n", " 'fs_random': 0 rows, 669 columns, 0 entries\n", " 'lb_tree_search': 1583 rows, 708 columns, 10070 entries\n", " 'max_lp': 1579 rows, 708 columns, 10396 entries\n", " 'objective_lb_search': 899 rows, 669 columns, 8644 entries\n", " 'probing': 867 rows, 669 columns, 7531 entries\n", " 'pseudo_costs': 877 rows, 708 columns, 7166 entries\n", " 'quick_restart': 835 rows, 669 columns, 7580 entries\n", " 'reduced_costs': 892 rows, 708 columns, 7245 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 0 125 0 5'274 0\n", " 'fs_random': 0 0 0 0 0 0\n", " 'lb_tree_search': 0 0 73 0 6'254 0\n", " 'max_lp': 0 0 10 0 8'553 0\n", " 'objective_lb_search': 0 0 130 0 5'521 0\n", " 'probing': 0 0 116 0 4'713 0\n", " 'pseudo_costs': 0 0 104 0 7'309 0\n", " 'quick_restart': 0 0 116 0 4'656 0\n", " 'reduced_costs': 0 0 172 0 4'559 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 2'353 64 39 0 45 1 42 1'141/2'236\n", " 'fs_random': 1'212 0 0 0 0 0 0 0/0\n", " 'lb_tree_search': 1'939 64 0 0 0 17 0 573/974\n", " 'max_lp': 1'997 106 0 0 0 37 0 631/1'152\n", " 'objective_lb_search': 2'396 49 51 0 51 0 49 1'184/2'239\n", " 'probing': 2'436 36 0 0 0 28 56 1'224/2'450\n", " 'pseudo_costs': 2'486 88 160 0 166 4 6 1'120/2'106\n", " 'quick_restart': 2'401 49 49 1 73 3 72 1'190/2'304\n", " 'reduced_costs': 2'403 55 237 0 237 11 12 1'037/1'882\n", "\n", "Lp Cut default_lp quick_restart lb_tree_search objective_lb_search max_lp reduced_costs pseudo_costs probing\n", " CG_FF: 22 22 10 26 10 13 10 22\n", " CG_K: 9 11 6 9 5 4 4 9\n", " CG_KL: 2 6 3 4 2 2 - 3\n", " CG_R: 16 24 8 33 9 28 23 37\n", " CG_RB: 54 55 24 67 27 50 63 51\n", " CG_RBP: 23 18 9 22 1 10 9 20\n", " Clique: - - 4 - 6 2 5 -\n", " IB: 311 328 - 315 - 374 353 313\n", " MIR_1_FF: 47 46 15 43 22 28 49 50\n", " MIR_1_K: 26 15 - 14 - 2 9 19\n", " MIR_1_KL: 9 11 - 8 1 2 7 12\n", " MIR_1_R: 3 - - - - - - 1\n", " MIR_1_RB: 21 27 5 31 8 11 25 25\n", " MIR_1_RBP: 13 23 - 16 1 5 1 10\n", " MIR_2_FF: 61 67 30 57 39 34 57 52\n", " MIR_2_K: 25 22 3 21 1 7 6 18\n", " MIR_2_KL: 3 1 - 6 1 1 3 5\n", " MIR_2_R: 2 3 2 4 2 2 2 4\n", " MIR_2_RB: 53 43 30 44 37 33 47 44\n", " MIR_2_RBP: 17 27 2 16 1 8 10 33\n", " MIR_3_FF: 41 33 45 41 38 40 37 39\n", " MIR_3_K: 30 16 5 19 5 9 6 21\n", " MIR_3_KL: 2 2 2 3 7 4 2 4\n", " MIR_3_R: 5 1 2 1 2 6 1 1\n", " MIR_3_RB: 30 35 28 31 32 34 34 22\n", " MIR_3_RBP: 17 15 4 9 4 4 4 20\n", " MIR_4_FF: 26 34 41 30 43 31 35 30\n", " MIR_4_K: 16 19 7 14 7 9 10 16\n", " MIR_4_KL: 4 5 8 4 5 4 7 3\n", " MIR_4_R: - 2 1 2 2 4 3 1\n", " MIR_4_RB: 18 24 32 17 26 17 22 19\n", " MIR_4_RBP: 8 12 12 8 3 4 11 13\n", " MIR_5_FF: 24 22 24 20 22 18 24 27\n", " MIR_5_K: 18 14 12 19 15 15 9 22\n", " MIR_5_KL: 6 7 8 5 10 4 7 9\n", " MIR_5_R: 1 1 1 - 2 1 2 1\n", " MIR_5_RB: 10 15 16 4 23 19 20 7\n", " MIR_5_RBP: 8 9 5 12 11 3 12 19\n", " MIR_6_FF: 15 18 15 18 18 21 15 19\n", " MIR_6_K: 5 11 14 23 17 14 12 10\n", " MIR_6_KL: 2 8 7 4 10 9 2 7\n", " MIR_6_R: 2 - 2 - 1 - 2 -\n", " MIR_6_RB: 9 10 12 11 15 12 16 5\n", " MIR_6_RBP: 7 14 12 13 16 7 9 11\n", " ZERO_HALF_FF: 16 17 7 12 9 16 11 31\n", " ZERO_HALF_K: 3 2 - - - 8 3 8\n", " ZERO_HALF_KL: - - - 2 - 1 3 1\n", " ZERO_HALF_R: 84 75 78 105 95 92 100 105\n", " ZERO_HALF_RB: 13 16 14 16 12 12 12 14\n", " ZERO_HALF_RBP: 4 4 8 5 8 3 6 11\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 1/4 75% 7.87e-01 0.10\n", " 'graph_cst_lns': 1/4 75% 8.21e-01 0.10\n", " 'graph_dec_lns': 0/4 75% 8.21e-01 0.10\n", " 'graph_var_lns': 2/4 100% 9.14e-01 0.10\n", " 'lb_relax_lns': 2/2 50% 5.38e-01 0.50\n", " 'rins/rens': 4/4 75% 8.08e-01 0.10\n", " 'rnd_cst_lns': 1/4 100% 9.14e-01 0.10\n", " 'rnd_var_lns': 2/5 80% 8.80e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'fj_restart': 1 1 733 0 0 0 288 12'593\n", " 'ls_lin_restart': 1 1 14'817 0 0 0 6'111 465'415\n", " 'ls_lin_restart_compound_perturb': 1 1 0 1'074 60 507 20 20'843\n", " 'ls_lin_restart_decay': 1 1 21'764 0 0 0 912 403'774\n", " 'ls_lin_restart_perturb': 1 1 728 0 0 0 360 14'850\n", " 'ls_restart_compound': 1 1 0 24'039 1'479 11'276 166 514'316\n", " 'ls_restart_decay': 1 1 20'199 0 0 0 837 325'057\n", "\n", "Solutions (21) Num Rank\n", " 'fj_restart': 1 [1,1]\n", " 'graph_var_lns': 1 [2,2]\n", " 'lb_relax_lns_bool_h': 1 [18,18]\n", " 'ls_lin_restart_perturb': 2 [5,6]\n", " 'no_lp': 1 [8,8]\n", " 'quick_restart_no_lp': 11 [3,21]\n", " 'rnd_cst_lns': 1 [9,9]\n", " 'rnd_var_lns': 3 [7,17]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 2\n", " 'max_lp': 5\n", " 'pseudo_costs': 2\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 30 80 27\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 4 2 4\n", " 'pump': 22 3\n", "\n", "Improving bounds shared Num Sym\n", " 'pseudo_costs': 2 0\n", " 'reduced_costs': 18 0\n", "\n", "Clauses shared Num\n", " 'no_lp': 1\n", " 'quick_restart_no_lp': 1\n", "\n", "[Scaling] scaled_objective_bound: 1713.11 corrected_bound: 1713.11 delta: -2.25394e-07\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 1772.784689880071\n", "best_bound: 1713.105699764579\n", "integers: 688\n", "booleans: 354\n", "conflicts: 0\n", "branches: 158\n", "propagations: 1720\n", "integer_propagations: 4177\n", "restarts: 158\n", "lp_iterations: 0\n", "walltime: 1.07355\n", "usertime: 1.07355\n", "deterministic_time: 2.65008\n", "gap_integral: 11.0704\n", "solution_fingerprint: 0xeb65a853690a6e06\n", "\n" ] } ], "source": [ "wfn.optimize(router=EWRouter())\n", "terse = wfn.optimize(router=milp_router)" ] }, { "cell_type": "markdown", "id": "3848d9aa-f9ab-4760-a1f2-778720b6c940", "metadata": {}, "source": [ "But the solution by HGSRouter can warmstart the MILPRouter." ] }, { "cell_type": "code", "execution_count": 21, "id": "e2799499", "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: 1 log_search_progress: true relative_gap_limit: 0.01\n", "Setting number of workers to 16\n", "\n", "Initial optimization model '': (model_fingerprint: 0x95d7734e903987ec)\n", "#Variables: 708 (#bools: 354 in floating point objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 262 (#literals: 776)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 2\n", "#kLinearN: 161 (#terms: 2'078)\n", "\n", "Starting presolve at 0.00s\n", "The solution hint is complete and is feasible.\n", "[Scaling] Floating point objective has 354 terms with magnitude in [18.5198, 233.655] average = 64.9611\n", "[Scaling] Objective coefficient relative error: 2.56462e-08\n", "[Scaling] Objective worst-case absolute error: 8.40207e-05\n", "[Scaling] Objective scaling factor: 524288\n", " 2.33e-04s 0.00e+00d [DetectDominanceRelations] \n", " 5.09e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 4.87e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=342 \n", " 2.81e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 2.48e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'693 nodes and 5'285 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0005808 dtime: 0.00049342\n", " 1.58e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 5.85e-03s 1.42e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 9.11e-04s 3.14e-04d [MaxClique] Merged 302(1'090 literals) into 182(850 literals) at_most_ones. \n", " 2.13e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.59e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 4.92e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 2.08e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 1.59e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 5.93e-04s 5.98e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=83 #num_inclusions=41 \n", " 3.13e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.31e-03s 8.54e-05d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=224 #num_inclusions=222 \n", " 6.55e-05s 1.65e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=3 \n", " 3.56e-04s 1.03e-04d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 8.48e-04s 1.08e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 8.51e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 2.73e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 5.20e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.41e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 1.91e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.28e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.10e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 2.64e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'452 nodes and 4'451 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0004023 dtime: 0.00044784\n", "[SAT presolve] num removable Booleans: 0 / 354\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0003996s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.000564s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", " 1.87e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 4.36e-03s 1.26e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 3.72e-04s 3.09e-04d [MaxClique] \n", " 2.33e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.55e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.17e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 1.68e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 1.59e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 2.00e-04s 4.48e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=82 #num_inclusions=40 \n", " 2.31e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.65e-04s 3.74e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=223 \n", " 3.07e-05s 1.10e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2 \n", " 2.68e-04s 9.83e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 2.58e-04s 1.08e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 8.29e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 2.02e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.27e-04s 0.00e+00d [DetectDominanceRelations] \n", " 1.90e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.72e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=2'948 #tight_variables=354 #tight_constraints=40 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 81 times.\n", " - rule 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 708 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 40 times.\n", " - rule 'linear: positive at most one' was applied 40 times.\n", " - rule 'linear: positive equal one' was applied 40 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 40 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 40 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 39 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 354 times.\n", " - rule 'variables: detect half reified value encoding' was applied 708 times.\n", "\n", "Presolved optimization model '': (model_fingerprint: 0x66ed27a27b183cb9)\n", "#Variables: 708 (#bools: 314 in objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 145 (#literals: 776)\n", "#kBoolAnd: 37 (#enforced: 37) (#literals: 74)\n", "#kExactlyOne: 40 (#literals: 354)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 81 (#terms: 1'059)\n", "[Symmetry] Graph for symmetry has 2'452 nodes and 4'451 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.000447 dtime: 0.00044838\n", "\n", "Preloading model.\n", "#Bound 0.06s best:inf next:[1364.00132,11449.6914] initial_domain\n", "#1 0.06s best:1765.33376 next:[1364.00132,1765.33376] complete_hint\n", "#Model 0.06s var:708/708 constraints:1012/1012\n", "\n", "Starting search at 0.07s 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.09s best:1765.33376 next:[1396.24224,1765.33376] am1_presolve (num_literals=314 num_am1=12 increase=16903528 work_done=1733)\n", "#Bound 0.09s best:1765.33376 next:[1464.8136,1765.33376] default_lp\n", "#Bound 0.10s best:1765.33376 next:[1471.69595,1765.33376] reduced_costs\n", "#Bound 0.11s best:1765.33376 next:[1474.02698,1765.33376] pseudo_costs\n", "#Bound 0.11s best:1765.33376 next:[1672.91324,1765.33376] max_lp\n", "#Bound 0.17s best:1765.33376 next:[1687.43262,1765.33376] lb_tree_search\n", "#Bound 0.24s best:1765.33376 next:[1693.87095,1765.33376] lb_tree_search\n", "#Bound 0.25s best:1765.33376 next:[1693.97098,1765.33376] max_lp\n", "#Model 0.32s var:706/708 constraints:1009/1012\n", "#Bound 0.37s best:1765.33376 next:[1699.862,1765.33376] lb_tree_search\n", "#Bound 0.41s best:1765.33376 next:[1704.75863,1765.33376] max_lp\n", "#Model 0.66s var:696/708 constraints:998/1012\n", "#Bound 0.68s best:1765.33376 next:[1711.31128,1765.33376] max_lp\n", "#Bound 0.99s best:1765.33376 next:[1716.75353,1765.33376] max_lp\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [931.90ms, 931.90ms] 931.90ms 0.00ns 931.90ms 1 [522.04ms, 522.04ms] 522.04ms 0.00ns 522.04ms\n", " 'default_lp': 1 [932.55ms, 932.55ms] 932.55ms 0.00ns 932.55ms 1 [ 45.41ms, 45.41ms] 45.41ms 0.00ns 45.41ms\n", " 'feasibility_pump': 4 [ 7.98ms, 150.25ms] 96.16ms 53.90ms 384.66ms 3 [ 36.62ms, 55.81ms] 47.36ms 8.00ms 142.08ms\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': 3 [ 28.87ms, 357.89ms] 146.63ms 149.71ms 439.88ms 3 [715.55us, 100.07ms] 35.39ms 45.78ms 106.16ms\n", " 'graph_cst_lns': 5 [ 21.95ms, 151.84ms] 67.29ms 48.05ms 336.45ms 5 [ 98.96us, 28.56ms] 8.72ms 11.30ms 43.61ms\n", " 'graph_dec_lns': 4 [ 1.00ms, 11.08ms] 4.45ms 4.08ms 17.81ms 2 [ 10.00ns, 486.00ns] 248.00ns 238.00ns 496.00ns\n", " 'graph_var_lns': 5 [ 6.42ms, 266.30ms] 93.48ms 90.43ms 467.40ms 5 [ 10.00ns, 73.43ms] 18.08ms 27.94ms 90.40ms\n", " 'lb_relax_lns': 2 [207.35ms, 632.68ms] 420.02ms 212.67ms 840.03ms 2 [ 28.79ms, 224.99ms] 126.89ms 98.10ms 253.78ms\n", " 'lb_tree_search': 1 [929.42ms, 929.42ms] 929.42ms 0.00ns 929.42ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'ls': 2 [223.57ms, 261.41ms] 242.49ms 18.92ms 484.98ms 2 [100.01ms, 100.01ms] 100.01ms 12.50ns 200.02ms\n", " 'ls_lin': 2 [193.86ms, 215.02ms] 204.44ms 10.58ms 408.88ms 2 [100.00ms, 100.01ms] 100.01ms 2.73us 200.01ms\n", " 'max_lp': 1 [931.40ms, 931.40ms] 931.40ms 0.00ns 931.40ms 0 [ 0.00ns, 0.00ns] 0.00ns 0.00ns 0.00ns\n", " 'no_lp': 1 [931.55ms, 931.55ms] 931.55ms 0.00ns 931.55ms 1 [334.52ms, 334.52ms] 334.52ms 0.00ns 334.52ms\n", " 'objective_lb_search': 1 [928.20ms, 928.20ms] 928.20ms 0.00ns 928.20ms 1 [ 32.09ms, 32.09ms] 32.09ms 0.00ns 32.09ms\n", " 'probing': 1 [928.49ms, 928.49ms] 928.49ms 0.00ns 928.49ms 1 [ 41.64ms, 41.64ms] 41.64ms 0.00ns 41.64ms\n", " 'pseudo_costs': 1 [930.53ms, 930.53ms] 930.53ms 0.00ns 930.53ms 1 [ 34.75ms, 34.75ms] 34.75ms 0.00ns 34.75ms\n", " 'quick_restart': 1 [930.92ms, 930.92ms] 930.92ms 0.00ns 930.92ms 1 [ 35.35ms, 35.35ms] 35.35ms 0.00ns 35.35ms\n", " 'quick_restart_no_lp': 1 [927.49ms, 927.49ms] 927.49ms 0.00ns 927.49ms 1 [321.45ms, 321.45ms] 321.45ms 0.00ns 321.45ms\n", " 'reduced_costs': 1 [932.37ms, 932.37ms] 932.37ms 0.00ns 932.37ms 1 [ 48.84ms, 48.84ms] 48.84ms 0.00ns 48.84ms\n", " 'rins/rens': 4 [ 10.57ms, 366.79ms] 120.28ms 143.40ms 481.13ms 4 [ 10.00ns, 100.03ms] 26.87ms 42.28ms 107.48ms\n", " 'rnd_cst_lns': 5 [ 9.27ms, 207.90ms] 76.67ms 71.77ms 383.37ms 5 [134.00ns, 44.70ms] 12.78ms 17.09ms 63.90ms\n", " 'rnd_var_lns': 5 [ 8.15ms, 247.77ms] 75.00ms 88.94ms 375.02ms 5 [ 10.00ns, 54.55ms] 12.71ms 21.11ms 63.54ms\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 366 10'705 26'739 1'514 379'324 811'628\n", " 'default_lp': 354 11 789 709 7'216 18'803\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': 354 0 708 708 6'764 17'276\n", " 'max_lp': 354 0 708 708 6'792 17'379\n", " 'no_lp': 354 9'314 19'594 3'009 442'924 1'467'969\n", " 'objective_lb_search': 355 13 790 709 7'240 18'989\n", " 'probing': 355 15 796 713 7'355 19'438\n", " 'pseudo_costs': 354 16 782 709 7'302 20'017\n", " 'quick_restart': 354 12 789 709 7'252 18'970\n", " 'quick_restart_no_lp': 385 4'547 47'826 4'580 306'435 1'123'949\n", " 'reduced_costs': 354 11 784 709 7'233 19'679\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 9'791 230'569 737'433 307'493 84 104 684 0 0 0 0\n", " 'default_lp': 11 396 1'140 0 0 0 0 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 0 0 0 0 0 0\n", " 'max_lp': 0 0 0 0 0 0 0 0 0 0 0\n", " 'no_lp': 8'372 90'127 441'300 0 164 357 2'593 0 26 211 18\n", " 'objective_lb_search': 13 450 1'421 0 0 0 0 0 0 0 0\n", " 'probing': 15 621 1'513 0 0 0 0 0 0 0 0\n", " 'pseudo_costs': 16 873 1'755 0 0 0 0 0 0 0 0\n", " 'quick_restart': 12 504 1'259 0 0 0 0 0 0 0 0\n", " 'quick_restart_no_lp': 3'676 72'767 213'314 0 87 1'061 7'407 0 150 1'408 100\n", " 'reduced_costs': 10 463 1'223 0 0 0 0 0 0 0 0\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 2'088 1'371 106 0 0\n", " 'lb_tree_search': 1 731 654 10 0 0\n", " 'max_lp': 1 972 675 13 0 0\n", " 'objective_lb_search': 1 1'864 1'039 110 0 0\n", " 'probing': 1 2'105 1'263 113 0 0\n", " 'pseudo_costs': 1 1'999 1'091 88 8 1\n", " 'quick_restart': 1 1'925 1'124 108 0 0\n", " 'reduced_costs': 1 2'230 1'077 78 10 1\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 882 rows, 669 columns, 8396 entries\n", " 'lb_tree_search': 1556 rows, 708 columns, 9681 entries\n", " 'max_lp': 1518 rows, 708 columns, 10707 entries\n", " 'objective_lb_search': 814 rows, 669 columns, 7185 entries\n", " 'probing': 813 rows, 669 columns, 6255 entries\n", " 'pseudo_costs': 883 rows, 708 columns, 7310 entries\n", " 'quick_restart': 821 rows, 669 columns, 7047 entries\n", " 'reduced_costs': 912 rows, 708 columns, 9389 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 0 103 0 6'674 0\n", " 'lb_tree_search': 0 0 10 0 8'521 0\n", " 'max_lp': 0 0 13 0 8'644 0\n", " 'objective_lb_search': 0 0 103 0 5'916 0\n", " 'probing': 0 0 108 0 4'271 0\n", " 'pseudo_costs': 0 0 92 0 7'666 0\n", " 'quick_restart': 0 0 103 0 5'762 0\n", " 'reduced_costs': 0 0 86 0 7'464 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 2'583 66 378 0 323 12 57 1'371/2'555\n", " 'lb_tree_search': 2'020 103 116 0 119 19 4 654/1'115\n", " 'max_lp': 2'041 134 1'249 0 1'091 33 10 675/1'249\n", " 'objective_lb_search': 2'251 64 158 0 120 16 42 1'039/1'919\n", " 'probing': 2'475 46 225 0 183 12 56 1'263/2'530\n", " 'pseudo_costs': 2'457 100 912 0 734 14 10 1'091/2'030\n", " 'quick_restart': 2'336 49 269 0 230 12 51 1'124/2'209\n", " 'reduced_costs': 2'443 97 1'069 0 870 27 13 1'077/1'856\n", "\n", "Lp Cut default_lp max_lp quick_restart reduced_costs pseudo_costs lb_tree_search probing objective_lb_search\n", " CG_FF: 25 10 17 19 3 10 26 21\n", " CG_K: 13 5 9 9 - 6 11 11\n", " CG_KL: - 2 5 - - 3 6 1\n", " CG_R: 21 9 20 30 17 8 38 26\n", " CG_RB: 57 33 35 66 53 24 48 51\n", " CG_RBP: 16 1 11 22 7 9 28 18\n", " Clique: - 6 - 2 6 6 - -\n", " IB: 314 - 315 356 346 - 336 305\n", " MIR_1_FF: 53 18 53 28 41 20 52 38\n", " MIR_1_K: 22 - 19 4 6 - 22 10\n", " MIR_1_KL: 10 - 6 2 2 - 12 8\n", " MIR_1_R: - - 1 - 1 1 - -\n", " MIR_1_RB: 29 6 15 15 16 7 18 22\n", " MIR_1_RBP: 16 1 14 1 4 1 13 8\n", " MIR_2_FF: 91 33 68 46 47 38 65 44\n", " MIR_2_K: 25 3 15 2 6 4 22 19\n", " MIR_2_KL: 13 1 3 3 2 1 6 5\n", " MIR_2_R: 10 2 4 1 2 3 4 1\n", " MIR_2_RB: 49 39 42 41 32 33 45 44\n", " MIR_2_RBP: 35 2 12 2 5 8 27 13\n", " MIR_3_FF: 67 37 42 46 55 49 50 33\n", " MIR_3_K: 26 7 26 7 12 6 29 18\n", " MIR_3_KL: 4 4 2 3 1 4 - 4\n", " MIR_3_R: 2 3 5 4 5 2 4 2\n", " MIR_3_RB: 37 35 29 31 30 28 35 30\n", " MIR_3_RBP: 32 3 11 3 5 6 18 8\n", " MIR_4_FF: 33 43 27 29 32 47 33 12\n", " MIR_4_K: 12 5 15 6 15 7 14 11\n", " MIR_4_KL: 8 7 1 1 6 10 5 3\n", " MIR_4_R: 2 2 1 3 2 1 2 1\n", " MIR_4_RB: 20 27 21 24 29 34 17 10\n", " MIR_4_RBP: 15 6 5 5 12 12 14 5\n", " MIR_5_FF: 29 24 23 19 21 28 28 17\n", " MIR_5_K: 22 19 25 15 14 13 14 19\n", " MIR_5_KL: 7 13 8 5 5 11 5 9\n", " MIR_5_R: 6 2 - 2 1 1 3 -\n", " MIR_5_RB: 11 27 9 11 13 16 6 7\n", " MIR_5_RBP: 15 14 12 4 18 8 12 12\n", " MIR_6_FF: 27 19 13 11 26 17 15 20\n", " MIR_6_K: 13 24 10 7 10 17 20 16\n", " MIR_6_KL: 5 13 4 4 9 7 6 6\n", " MIR_6_R: 2 2 - 1 1 2 2 1\n", " MIR_6_RB: 8 23 2 21 18 13 10 5\n", " MIR_6_RBP: 10 17 15 5 15 15 18 9\n", " ZERO_HALF_FF: 17 10 20 15 17 7 18 15\n", " ZERO_HALF_K: 7 - 3 2 2 - 8 6\n", " ZERO_HALF_KL: 1 1 - - 1 - 1 2\n", " ZERO_HALF_R: 104 96 98 117 92 88 74 88\n", " ZERO_HALF_RB: 19 14 22 23 23 15 18 18\n", " ZERO_HALF_RBP: 11 7 11 4 5 8 5 7\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 0/3 67% 7.21e-01 0.10\n", " 'graph_cst_lns': 0/5 80% 8.80e-01 0.10\n", " 'graph_dec_lns': 0/2 100% 8.14e-01 0.10\n", " 'graph_var_lns': 0/5 80% 8.80e-01 0.10\n", " 'lb_relax_lns': 0/2 50% 5.38e-01 0.50\n", " 'rins/rens': 0/4 75% 8.21e-01 0.10\n", " 'rnd_cst_lns': 0/5 80% 8.80e-01 0.10\n", " 'rnd_var_lns': 0/5 80% 8.80e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'ls_lin_restart_decay': 1 1 21'865 0 0 0 949 408'369\n", " 'ls_lin_restart_perturb': 1 1 17'431 0 0 0 14'819 445'043\n", " 'ls_restart_decay': 1 1 21'141 0 0 0 824 406'476\n", " 'ls_restart_decay_compound_perturb': 1 1 0 21'944 4'189 8'877 51 522'947\n", "\n", "Solutions (1) Num Rank\n", " 'complete_hint': 1 [1,1]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'default_lp': 1\n", " 'initial_domain': 1\n", " 'lb_tree_search': 3\n", " 'max_lp': 5\n", " 'pseudo_costs': 1\n", " 'reduced_costs': 1\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 2 73 2\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 0 0 0\n", " 'pump': 37 4\n", "\n", "Improving bounds shared Num Sym\n", " 'default_lp': 4 0\n", " 'max_lp': 55 0\n", " 'objective_lb_search': 10 0\n", " 'pseudo_costs': 2 0\n", " 'quick_restart': 2 0\n", "\n", "Clauses shared Num\n", " 'probing': 29\n", " 'quick_restart_no_lp': 1\n", "\n", "[Scaling] scaled_objective_bound: 1716.75 corrected_bound: 1716.75 delta: -2.22763e-07\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 1765.333758348828\n", "best_bound: 1716.753534539779\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: 1.06406\n", "usertime: 1.06406\n", "deterministic_time: 2.69089\n", "gap_integral: 10.7472\n", "solution_fingerprint: 0x7cfd54e085bf6326\n", "\n" ] } ], "source": [ "wfn.optimize(router=HGSRouter(time_limit=1))\n", "terse = wfn.optimize(router=milp_router)" ] }, { "cell_type": "markdown", "id": "0a019321", "metadata": {}, "source": [ "## 🧮 What is `SolverOptions`?" ] }, { "cell_type": "markdown", "id": "9ecc1bbc", "metadata": {}, "source": [ "`SolverOptions` refers to *solver-specific configuration parameters* that affect *how the solver works internally* (once the model is already built).\n", "\n", "These settings are typically passed directly to a solver like CPLEX, Gurobi, CBC, etc., and influence:\n", "\n", " * Search strategy\n", " * Runtime limits\n", " * Optimality tolerances\n", " * Logging and precision settings\n", "\n", "#### ✅ Common `SolverOptions` for `MILPRouter`:\n", "\n", "| Parameter | Description |\n", "| -------------- | ----------------------------------------------------- |\n", "| `time_limit` | Maximum allowed solve time (in seconds) |\n", "| `gap` | Optimality tolerance (e.g., 0.01 for 1% gap) |\n", "| `mip_emphasis` | Prioritize bound quality, feasibility, or integrality |\n", "| `threads` | Number of threads to use |\n", "\n", "After initializing the router, `OptiWindNet` sets a set of default options internally to match OptiWindNet’s preferred values.\n", "\n", "You can see the solveroptions modified by `OptiWindNet` after creating an instance of the `MILPRouter` via:\n", "\n", "```python\n", "router.optiwindnet_default_options\n", "```" ] }, { "cell_type": "markdown", "id": "80bc9a82", "metadata": {}, "source": [ ">If desired, set the logging level to `INFO` *before running `.optimize()` with the MILPRouter* to display detailed messages about the solver configuration:\n", ">```python\n", ">import logging\n", ">logging.basicConfig(level=logging.INFO)\n", ">```" ] }, { "cell_type": "code", "execution_count": 22, "id": "22e8d3bd", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{}" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_ortools = MILPRouter(solver_name='ortools', time_limit=15, mip_gap=0.01)\n", "milp_router_ortools.optiwindnet_default_options" ] }, { "cell_type": "code", "execution_count": 23, "id": "b9ac074e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'parallel': -1, 'emphasis_mip': 4}" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_cplex = MILPRouter(solver_name='cplex', time_limit=15, mip_gap=0.01)\n", "milp_router_cplex.optiwindnet_default_options" ] }, { "cell_type": "code", "execution_count": 24, "id": "9e6aa22a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'threads': 16,\n", " 'timeMode': 'elapsed',\n", " 'nodeStrategy': 'downFewest',\n", " 'Dins': 'on',\n", " 'VndVariableNeighborhoodSearch': 'on',\n", " 'Rens': 'on',\n", " 'Rins': 'on',\n", " 'pivotAndComplement': 'off',\n", " 'proximitySearch': 'off',\n", " 'gomoryCuts': 'on',\n", " 'mixedIntegerRoundingCuts': 'on',\n", " 'flowCoverCuts': 'on',\n", " 'cliqueCuts': 'off',\n", " 'twoMirCuts': 'off',\n", " 'knapsackCuts': 'off',\n", " 'probingCuts': 'off',\n", " 'zeroHalfCuts': 'off',\n", " 'liftAndProjectCuts': 'off',\n", " 'residualCapacityCuts': 'off'}" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_cbc = MILPRouter(solver_name='cbc', time_limit=15, mip_gap=0.01)\n", "milp_router_cbc.optiwindnet_default_options" ] }, { "cell_type": "code", "execution_count": 25, "id": "bc96d7b5", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'mipfocus': 1}" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_gurobi = MILPRouter(solver_name='gurobi', time_limit=15, mip_gap=0.01)\n", "milp_router_gurobi.optiwindnet_default_options" ] }, { "cell_type": "code", "execution_count": 26, "id": "5e482d5f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{}" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_highs = MILPRouter(solver_name='highs', time_limit=15, mip_gap=0.01)\n", "milp_router_highs.optiwindnet_default_options" ] }, { "cell_type": "code", "execution_count": 27, "id": "8b92c7a0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{}" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "milp_router_scip = MILPRouter(solver_name='scip', time_limit=15, mip_gap=0.01)\n", "milp_router_scip.optiwindnet_default_options" ] }, { "cell_type": "markdown", "id": "3f4748f4", "metadata": {}, "source": [ "This attribute only reflects the options explicitly modified by OptiWindNet during initialization. solvers in MILPRouter typically support a much larger set of configurable options, which we can also adjust separately.\n", "For a complete list of available options for each MILP solver, please refer to the corresponding solver's official documentation or user manual.\n", "For example, in the case of the CBC solver, we can refer to its full list of options here:\n", "[http://www.decom.ufop.br/haroldo/files/cbcCommandLine.pdf](http://www.decom.ufop.br/haroldo/files/cbcCommandLine.pdf)\n", "\n", "> **Note:** Modifying any of the options originally set by OptiWindNet will not change the values stored in `optiwindnet_default_options`. However, the updated values will be used when solving the optimization problem." ] }, { "cell_type": "markdown", "id": "41801b1e", "metadata": {}, "source": [ "Solver options (including those set by OptiWindNet as well as additional configurable parameters) can be modified by creating a **dictionary** and passing it to the router. The same approach applies to **model options**." ] }, { "cell_type": "code", "execution_count": 28, "id": "56531283", "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: 1 log_search_progress: true relative_gap_limit: 0.01 num_workers: 5\n", "\n", "Initial optimization model '': (model_fingerprint: 0x397b24b71e75ab83)\n", "#Variables: 708 (#bools: 354 in floating point objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 262 (#literals: 776)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 122 (#terms: 1'767)\n", "\n", "Starting presolve at 0.00s\n", "The solution hint is complete and is feasible.\n", "[Scaling] Floating point objective has 354 terms with magnitude in [18.5198, 233.655] average = 64.9611\n", "[Scaling] Objective coefficient relative error: 2.56462e-08\n", "[Scaling] Objective worst-case absolute error: 8.40207e-05\n", "[Scaling] Objective scaling factor: 524288\n", " 2.51e-04s 0.00e+00d [DetectDominanceRelations] \n", " 7.37e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1 \n", " 4.41e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=302 \n", " 3.87e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 2.15e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'653 nodes and 4'971 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.000484 dtime: 0.00048184\n", " 2.42e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.20e-03s 1.38e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 5.22e-04s 1.49e-04d [MaxClique] Merged 262(776 literals) into 142(536 literals) at_most_ones. \n", " 2.52e-04s 0.00e+00d [DetectDominanceRelations] \n", " 5.05e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 7.11e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 5.92e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 6.93e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 4.66e-04s 5.98e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=83 #num_inclusions=41 \n", " 3.06e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 1.64e-03s 6.97e-05d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=184 #num_inclusions=182 \n", " 1.18e-04s 1.65e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=3 \n", " 6.60e-04s 9.42e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 4.15e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 6.87e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 3.90e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 2.11e-04s 0.00e+00d [DetectDominanceRelations] \n", " 1.95e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 2.02e-04s 0.00e+00d [DetectDominanceRelations] \n", " 2.04e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 5.67e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateColumns] \n", " 1.85e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0005405 dtime: 0.00043606\n", "[SAT presolve] num removable Booleans: 0 / 354\n", "[SAT presolve] num trivial clauses: 0\n", "[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0005477s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", "[SAT presolve] [0.0006241s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0\n", " 4.95e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 7.36e-03s 1.27e-03d [operations_research::sat::CpModelPresolver::Probe] #probed=708 \n", " 4.83e-04s 1.45e-04d [MaxClique] \n", " 3.07e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.07e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 5.92e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear] \n", " 2.51e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints] \n", " 4.65e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements] \n", " 3.33e-04s 4.48e-06d [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=82 #num_inclusions=40 \n", " 3.41e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::DetectDifferentVariables] \n", " 4.82e-04s 2.79e-06d [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=183 \n", " 9.62e-05s 1.10e-07d [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2 \n", " 2.41e-04s 9.14e-05d [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap] \n", " 1.81e-04s 1.07e-04d [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap] \n", " 3.52e-05s 5.27e-06d [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=80 \n", " 1.75e-05s 0.00e+00d [operations_research::sat::CpModelPresolver::MergeClauses] \n", " 3.71e-04s 0.00e+00d [DetectDominanceRelations] \n", " 3.74e-03s 0.00e+00d [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1 \n", " 6.38e-04s 0.00e+00d [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=2'948 #tight_variables=354 #tight_constraints=40 \n", "\n", "Presolve summary:\n", " - 0 affine relations were detected.\n", " - rule 'TODO linear inclusion: superset is equality' was applied 81 times.\n", " - rule 'at_most_one: transformed into max clique.' was applied 1 time.\n", " - rule 'deductions: 708 stored' was applied 1 time.\n", " - rule 'exactly_one: simplified objective' was applied 40 times.\n", " - rule 'linear: positive equal one' was applied 40 times.\n", " - rule 'objective: shifted cost with exactly ones' was applied 40 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 40 times.\n", " - rule 'setppc: reduced linear coefficients' was applied 39 times.\n", " - rule 'setppc: removed trivial linear constraint' was applied 1 time.\n", " - rule 'variables: detect fully reified value encoding' was applied 354 times.\n", " - rule 'variables: detect half reified value encoding' was applied 708 times.\n", "\n", "Presolved optimization model '': (model_fingerprint: 0xa8a3f45b9fa5cb2d)\n", "#Variables: 708 (#bools: 314 in objective) (628 primary variables)\n", " - 354 Booleans in [0,1]\n", " - 314 in [0,4]\n", " - 40 in [0,5]\n", "#kAtMostOne: 105 (#literals: 462)\n", "#kBoolAnd: 37 (#enforced: 37) (#literals: 74)\n", "#kExactlyOne: 40 (#literals: 354)\n", "#kLinear1: 708 (#enforced: 708)\n", "#kLinear3: 1\n", "#kLinearN: 81 (#terms: 1'059)\n", "[Symmetry] Graph for symmetry has 2'412 nodes and 4'137 arcs.\n", "[Symmetry] Symmetry computation done. time: 0.0003507 dtime: 0.00043662\n", "\n", "Preloading model.\n", "#Bound 0.07s best:inf next:[1364.00132,11449.6914] initial_domain\n", "#1 0.07s best:1765.33376 next:[1364.00132,1765.33376] complete_hint\n", "#Model 0.08s var:708/708 constraints:972/972\n", "\n", "Starting search at 0.08s with 5 workers.\n", "3 full problem subsolvers: [core, default_lp, no_lp]\n", "2 first solution subsolvers: [fj, fs_random_no_lp]\n", "9 interleaved subsolvers: [feasibility_pump, graph_arc_lns, graph_cst_lns, graph_dec_lns, graph_var_lns, ls, rins/rens, rnd_cst_lns, rnd_var_lns]\n", "3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]\n", "\n", "#Bound 0.10s best:1765.33376 next:[1377.09321,1765.33376] am1_presolve (num_literals=314 num_am1=11 increase=6863922 work_done=1181)\n", "#Bound 0.10s best:1765.33376 next:[1439.63944,1765.33376] default_lp\n", "#2 0.10s best:1762.28296 next:[1439.63944,1762.28296] graph_var_lns (d=5.00e-01 s=5 t=0.10 p=0.00 stall=0 h=base)\n", "#Bound 0.11s best:1762.28296 next:[1440.53408,1762.28296] default_lp\n", "#3 0.12s best:1760.06663 next:[1440.53408,1760.06663] graph_arc_lns (d=5.00e-01 s=6 t=0.10 p=0.00 stall=0 h=base) [combined with: graph_var_lns (d=5.0...]\n", "#Bound 0.12s best:1760.06663 next:[1445.37817,1760.06663] default_lp\n", "#Bound 0.15s best:1760.06663 next:[1496.48989,1760.06663] default_lp\n", "#Bound 0.16s best:1760.06663 next:[1552.92261,1760.06663] default_lp\n", "#Bound 0.18s best:1760.06663 next:[1575.42302,1760.06663] default_lp\n", "#Bound 0.19s best:1760.06663 next:[1610.02974,1760.06663] default_lp\n", "#Bound 0.21s best:1760.06663 next:[1633.84456,1760.06663] default_lp\n", "#Bound 0.25s best:1760.06663 next:[1646.60958,1760.06663] default_lp\n", "#Model 0.28s var:706/708 constraints:969/972\n", "#Bound 0.39s best:1760.06663 next:[1656.44758,1760.06663] default_lp\n", "#Bound 0.46s best:1760.06663 next:[1663.25774,1760.06663] default_lp\n", "#Bound 0.60s best:1760.06663 next:[1672.66045,1760.06663] default_lp\n", "#Bound 0.60s best:1760.06663 next:[1672.94945,1760.06663] default_lp\n", "#4 0.62s best:1758.41439 next:[1672.94945,1758.41439] rins_pump_lns (d=8.14e-01 s=21 t=0.10 p=1.00 stall=2 h=base)\n", "#Bound 0.66s best:1758.41439 next:[1676.45101,1758.41439] default_lp\n", "#Bound 0.80s best:1758.41439 next:[1680.26577,1758.41439] default_lp\n", "#Model 0.82s var:696/708 constraints:958/972\n", "#Bound 0.99s best:1758.41439 next:[1684.47827,1758.41439] default_lp\n", "\n", "Task timing n [ min, max] avg dev time n [ min, max] avg dev dtime\n", " 'core': 1 [918.38ms, 918.38ms] 918.38ms 0.00ns 918.38ms 1 [559.92ms, 559.92ms] 559.92ms 0.00ns 559.92ms\n", " 'default_lp': 1 [918.65ms, 918.65ms] 918.65ms 0.00ns 918.65ms 1 [ 60.09ms, 60.09ms] 60.09ms 0.00ns 60.09ms\n", " 'feasibility_pump': 3 [ 65.60us, 71.53ms] 25.46ms 32.63ms 76.38ms 1 [ 50.45ms, 50.45ms] 50.45ms 0.00ns 50.45ms\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_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': 3 [ 27.93ms, 295.96ms] 122.75ms 122.66ms 368.26ms 3 [ 1.65ms, 100.01ms] 37.43ms 44.40ms 112.30ms\n", " 'graph_cst_lns': 3 [ 12.39ms, 192.03ms] 73.63ms 83.74ms 220.90ms 3 [ 32.50us, 100.06ms] 33.65ms 46.96ms 100.94ms\n", " 'graph_dec_lns': 3 [ 3.70ms, 18.93ms] 10.29ms 6.38ms 30.88ms 3 [ 10.00ns, 197.50us] 65.84us 93.10us 197.52us\n", " 'graph_var_lns': 3 [ 10.47ms, 16.26ms] 13.75ms 2.42ms 41.25ms 3 [ 2.08us, 1.59ms] 535.13us 742.69us 1.61ms\n", " 'ls': 3 [120.92ms, 150.13ms] 139.28ms 13.05ms 417.84ms 3 [100.00ms, 100.01ms] 100.01ms 1.77us 300.02ms\n", " 'no_lp': 1 [916.85ms, 916.85ms] 916.85ms 0.00ns 916.85ms 1 [465.29ms, 465.29ms] 465.29ms 0.00ns 465.29ms\n", " 'rins/rens': 3 [ 14.91ms, 265.04ms] 107.95ms 111.71ms 323.84ms 3 [243.38us, 100.01ms] 37.75ms 44.33ms 113.26ms\n", " 'rnd_cst_lns': 4 [ 9.00ms, 84.26ms] 33.15ms 30.24ms 132.59ms 4 [490.00ns, 12.87ms] 4.04ms 5.27ms 16.17ms\n", " 'rnd_var_lns': 4 [ 7.29ms, 183.25ms] 53.76ms 74.80ms 215.03ms 4 [ 70.00ns, 90.86ms] 22.82ms 39.28ms 91.27ms\n", "\n", "Search stats Bools Conflicts Branches Restarts BoolPropag IntegerPropag\n", " 'core': 365 19'365 54'567 2'714 416'995 1'056'815\n", " 'default_lp': 354 10 798 711 4'800 16'608\n", " 'fs_random_no_lp': 0 0 0 0 0 0\n", " 'no_lp': 354 12'335 23'830 3'101 633'066 2'120'563\n", "\n", "SAT stats ClassicMinim LitRemoved LitLearned LitForgotten Subsumed MClauses MDecisions MLitTrue MSubsumed MLitRemoved MReused\n", " 'core': 17'351 184'397 868'376 194'251 293 662 6'808 0 85 1'449 69\n", " 'default_lp': 10 260 1'046 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", " 'no_lp': 11'396 137'842 502'954 202'267 143 485 3'201 0 47 429 77\n", "\n", "Lp stats Component Iterations AddedCuts OPTIMAL DUAL_F. DUAL_U.\n", " 'default_lp': 1 2'251 1'407 111 0 0\n", "\n", "Lp dimension Final dimension of first component\n", " 'default_lp': 990 rows, 669 columns, 11039 entries\n", "\n", "Lp debug CutPropag CutEqPropag Adjust Overflow Bad BadScaling\n", " 'default_lp': 0 0 104 0 7'721 0\n", "\n", "Lp pool Constraints Updates Simplif Merged Shortened Split Strenghtened Cuts/Call\n", " 'default_lp': 2'579 97 615 0 548 52 66 1'407/2'727\n", "\n", "Lp Cut default_lp\n", " CG_FF: 19\n", " CG_K: 10\n", " CG_KL: 2\n", " CG_R: 42\n", " CG_RB: 69\n", " CG_RBP: 28\n", " IB: 317\n", " MIR_1_FF: 56\n", " MIR_1_K: 21\n", " MIR_1_KL: 6\n", " MIR_1_R: 1\n", " MIR_1_RB: 27\n", " MIR_1_RBP: 9\n", " MIR_2_FF: 69\n", " MIR_2_K: 20\n", " MIR_2_KL: 5\n", " MIR_2_R: 4\n", " MIR_2_RB: 37\n", " MIR_2_RBP: 19\n", " MIR_3_FF: 40\n", " MIR_3_K: 32\n", " MIR_3_KL: 8\n", " MIR_3_R: 2\n", " MIR_3_RB: 30\n", " MIR_3_RBP: 15\n", " MIR_4_FF: 33\n", " MIR_4_K: 28\n", " MIR_4_KL: 13\n", " MIR_4_R: 3\n", " MIR_4_RB: 20\n", " MIR_4_RBP: 20\n", " MIR_5_FF: 27\n", " MIR_5_K: 23\n", " MIR_5_KL: 12\n", " MIR_5_R: 4\n", " MIR_5_RB: 13\n", " MIR_5_RBP: 24\n", " MIR_6_FF: 29\n", " MIR_6_K: 11\n", " MIR_6_KL: 10\n", " MIR_6_R: 1\n", " MIR_6_RB: 9\n", " MIR_6_RBP: 23\n", " ZERO_HALF_FF: 29\n", " ZERO_HALF_K: 10\n", " ZERO_HALF_KL: 8\n", " ZERO_HALF_R: 127\n", " ZERO_HALF_RB: 24\n", " ZERO_HALF_RBP: 18\n", "\n", "LNS stats Improv/Calls Closed Difficulty TimeLimit\n", " 'graph_arc_lns': 2/3 67% 7.21e-01 0.10\n", " 'graph_cst_lns': 0/3 67% 7.21e-01 0.10\n", " 'graph_dec_lns': 0/3 100% 8.76e-01 0.10\n", " 'graph_var_lns': 1/3 100% 8.76e-01 0.10\n", " 'rins/rens': 1/3 67% 7.21e-01 0.10\n", " 'rnd_cst_lns': 0/4 75% 8.21e-01 0.10\n", " 'rnd_var_lns': 0/4 75% 8.21e-01 0.10\n", "\n", "LS stats Batches Restarts/Perturbs LinMoves GenMoves CompoundMoves Bactracks WeightUpdates ScoreComputed\n", " 'ls_restart_decay': 1 1 21'046 0 0 0 798 400'238\n", " 'ls_restart_decay_compound': 1 1 0 21'251 3'083 9'084 34 471'916\n", " 'ls_restart_decay_compound_perturb': 1 1 0 22'712 4'407 9'146 42 543'715\n", "\n", "Solutions (4) Num Rank\n", " 'complete_hint': 1 [1,1]\n", " 'graph_arc_lns': 1 [3,3]\n", " 'graph_var_lns': 1 [2,2]\n", " 'rins_pump_lns': 1 [4,4]\n", "\n", "Objective bounds Num\n", " 'am1_presolve': 1\n", " 'default_lp': 16\n", " 'initial_domain': 1\n", "\n", "Solution repositories Added Queried Synchro\n", " 'feasible solutions': 8 52 6\n", " 'fj solution hints': 0 0 0\n", " 'lp solutions': 0 0 0\n", " 'pump': 6 3\n", "\n", "Improving bounds shared Num Sym\n", " 'default_lp': 16 0\n", "\n", "[Scaling] scaled_objective_bound: 1684.48 corrected_bound: 1684.48 delta: -2.46043e-07\n", "CpSolverResponse summary:\n", "status: FEASIBLE\n", "objective: 1758.414392514855\n", "best_bound: 1684.478267915721\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: 1.03289\n", "usertime: 1.03289\n", "deterministic_time: 1.87495\n", "gap_integral: 8.30026\n", "solution_fingerprint: 0x40238ccd9cfcdeef\n", "\n" ] }, { "data": { "text/plain": [ "array([11, 10, 1, 1, 7, 6, -1, 5, 13, 8, 12, 14, -1, 16, 22, 23, -1,\n", " 16, 30, 20, 39, -1, 24, -1, -1, 26, 28, -1, 27, -1, 29, -1, 18, 31,\n", " 32, 37, 7, 33, 35, 21])" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "solver_options=dict(\n", " num_workers = 5,\n", ")\n", "\n", "wfn.optimize(router=MILPRouter(\n", " solver_name='ortools',\n", " time_limit=1,\n", " mip_gap=0.01,\n", " solver_options=solver_options,\n", " verbose=True,\n", "))" ] }, { "cell_type": "markdown", "id": "89ec0e08", "metadata": {}, "source": [ "## Summary" ] }, { "cell_type": "markdown", "id": "d37f4344", "metadata": {}, "source": [ "Key Differences between ModelOptions and SolverOptions are listed below.\n", "\n", "| Feature | `ModelOptions` | `SolverOptions` |\n", "| ------------- | ---------------------------------------------- | ----------------------------------------- |\n", "| Scope | Problem formulation level | Solver execution level |\n", "| Affects | Model structure and constraints | Search process and performance |\n", "| Applicable to | All methods (heuristics, metaheuristics, MILP) | Only MILP solvers and HGS |\n", "| Examples | `topology`, `feeder_route`, `feeder_limit`, `balanced` | `time_limit`, `gap`, `threads` |\n", "| Impact | Determines **what** is solved | Determines **how** it's solved |\n", "| Defined by | The modeling framework | The specific solver (e.g., CPLEX, Gurobi) |" ] }, { "cell_type": "markdown", "id": "3c3514b0", "metadata": {}, "source": [ "> * Use `ModelOptions` to specify *what kind of solution* you want (structure, constraints, flexibility).\n", "> * Use `SolverOptions` to control *how long and how hard* the solver should try to find that solution." ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }