IEA Wind Task 55¶

This notebook applies OptiWindNet to design collector system networks for the two offshore wind plants described in the IEA Wind TCP Task 55 report (740 MW, 10 MW turbines). Using both regular and irregular turbine layouts in WindIO format, we use HGSRouter for warmstarting and MILPRouter (OR-Tools solver) for final optimization.

For more info about IEA Wind TCP Task 55: The IEA Wind 740-10-MW Reference Offshore Wind Plants read: https://www.osti.gov/biblio/2333634/

Load required data¶

Import required modules¶

[1]:
import numpy as np
from optiwindnet.api import WindFarmNetwork, HGSRouter, MILPRouter, ModelOptions
[2]:
# Display figures as SVG in Jupyter notebooks
%config InlineBackend.figure_formats = ['svg']

Cable data¶

[3]:
cables = [(2, 1500.0), (5, 1800.0), (7, 2000.0)]

Load turbine layouts¶

Load turbine layouts from WindIO yaml files (Regular and Irregular turbine layouts)

WinfFarmNetwork.from_windIO()is specifically introduced in OptiWindNet for WindIO file formats.

[4]:
wfn_reg = WindFarmNetwork.from_windIO(filepath='data/IEA37_Borssele_Regular_System.yaml', cables=cables)
[5]:
wfn_irr = WindFarmNetwork.from_windIO(filepath='data/IEA37_Borssele_Irregular_System.yaml', cables=cables)

Plot locations’ geometry.¶

[6]:
wfn_reg
[6]:
../_images/notebooks_a10_IEA_Wind_TCP_task_55_13_0.svg
[7]:
wfn_irr
[7]:
../_images/notebooks_a10_IEA_Wind_TCP_task_55_14_0.svg

Choose the warmstart and main router¶

[8]:
warmstart_router = HGSRouter(time_limit=1, verbose=True)

solver_options=dict(
        num_workers = 8,
    )

model_options = ModelOptions(
                        topology='branched',
                        feeder_limit='unlimited',
                        feeder_route='segmented',
                    )
milp_router = MILPRouter(solver_name='ortools', time_limit=5, mip_gap=0.005, solver_options=solver_options, model_options=model_options, verbose=True)

For a detailed explanation about model_options and solver_options of MILP routers see Model Options and OR-Tools example Notebooks.

Regular turbine layout¶

Warmstart¶

[9]:
res_reg_warm = wfn_reg.optimize(router=warmstart_router)

Check the total length of the warm-start solution:

[10]:
wfn_reg.length()
[10]:
139656.4789599965

Optimize with MILP router¶

[11]:
res_reg = wfn_reg.optimize(router=milp_router, verbose=True)
Using warm start: the model is initialized with the provided solution S.


Starting CP-SAT solver v9.14.6206
Parameters: max_time_in_seconds: 5 log_search_progress: true relative_gap_limit: 0.005 num_workers: 8

Initial optimization model '': (model_fingerprint: 0xa6c6cb685fe1d85a)
#Variables: 1'536 (#bools: 768 in floating point objective) (1'388 primary variables)
  - 768 Booleans in [0,1]
  - 694 in [0,6]
  - 74 in [0,7]
#kAtMostOne: 613 (#literals: 1'918)
#kLinear1: 1'536 (#enforced: 1'536)
#kLinear3: 2
#kLinearN: 223 (#terms: 3'834)

Starting presolve at 0.01s
The solution hint is complete and is feasible.
[Scaling] Floating point objective has 768 terms with magnitude in [440.736, 14559.3] average = 2868.79
[Scaling] Objective coefficient relative error: 6.70633e-10
[Scaling] Objective worst-case absolute error: 7.704e-05
[Scaling] Objective scaling factor: 1.04858e+06
  4.75e-04s  0.00e+00d  [DetectDominanceRelations]
  1.25e-02s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1
  8.70e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=687
  2.98e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateColumns]
  7.89e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
[Symmetry] Graph for symmetry has 5'789 nodes and 11'056 arcs.
[Symmetry] Symmetry computation done. time: 0.0015825 dtime: 0.00140614
  2.94e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  1.25e-02s  3.70e-03d  [operations_research::sat::CpModelPresolver::Probe] #probed=1'536
  7.74e-04s  3.94e-04d  [MaxClique] Merged 613(1'918 literals) into 303(1'298 literals) at_most_ones.
  1.19e-03s  0.00e+00d  [DetectDominanceRelations]
  8.02e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  8.67e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear]
  4.33e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
  8.89e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  6.74e-04s  1.30e-05d  [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=151 #num_inclusions=75
  9.30e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDifferentVariables]
  9.37e-03s  3.02e-04d  [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=379 #num_inclusions=377
  1.87e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints]
  5.40e-04s  2.40e-04d  [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap]
  6.02e-04s  2.83e-04d  [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap]
  1.10e-04s  1.15e-05d  [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=148
  3.43e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::MergeClauses]
  3.88e-04s  0.00e+00d  [DetectDominanceRelations]
  4.74e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  4.10e-04s  0.00e+00d  [DetectDominanceRelations]
  4.20e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  2.20e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateColumns]
  3.85e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
[Symmetry] Graph for symmetry has 5'168 nodes and 9'048 arcs.
[Symmetry] Symmetry computation done. time: 0.0013515 dtime: 0.00121764
[SAT presolve] num removable Booleans: 0 / 768
[SAT presolve] num trivial clauses: 0
[SAT presolve] [0s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0
[SAT presolve] [0.0005984s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0
[SAT presolve] [0.0008458s] clauses:37 literals:74 vars:74 one_side_vars:74 simple_definition:0 singleton_clauses:0
  6.82e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  1.65e-02s  3.42e-03d  [operations_research::sat::CpModelPresolver::Probe] #probed=1'536
  1.17e-03s  3.83e-04d  [MaxClique]
  5.58e-04s  0.00e+00d  [DetectDominanceRelations]
  5.29e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  5.20e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear]
  5.74e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
  4.85e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  3.82e-04s  9.77e-06d  [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=150 #num_inclusions=74
  8.88e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDifferentVariables]
  2.72e-04s  6.39e-06d  [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=378
  1.10e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints]
  1.35e-03s  2.37e-04d  [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap]
  5.74e-04s  2.83e-04d  [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap]
  1.04e-04s  1.15e-05d  [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=148
  4.83e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::MergeClauses]
  4.72e-04s  0.00e+00d  [DetectDominanceRelations]
  3.95e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  6.02e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=7'628 #tight_variables=768 #tight_constraints=74

Presolve summary:
  - 0 affine relations were detected.
  - rule 'TODO linear inclusion: superset is equality' was applied 149 times.
  - rule 'at_most_one: transformed into max clique.' was applied 1 time.
  - rule 'deductions: 1536 stored' was applied 1 time.
  - rule 'exactly_one: simplified objective' was applied 74 times.
  - rule 'linear: positive equal one' was applied 74 times.
  - rule 'objective: shifted cost with exactly ones' was applied 74 times.
  - rule 'presolve: 0 unused variables removed.' was applied 1 time.
  - rule 'presolve: iteration' was applied 2 times.
  - rule 'setppc: exactly_one included in linear' was applied 74 times.
  - rule 'setppc: reduced linear coefficients' was applied 73 times.
  - rule 'setppc: removed trivial linear constraint' was applied 1 time.
  - rule 'variables: detect fully reified value encoding' was applied 768 times.
  - rule 'variables: detect half reified value encoding' was applied 1'536 times.

Presolved optimization model '': (model_fingerprint: 0x9cb918c826cc412f)
#Variables: 1'536 (#bools: 694 in objective) (1'388 primary variables)
  - 768 Booleans in [0,1]
  - 694 in [0,6]
  - 74 in [0,7]
#kAtMostOne: 266 (#literals: 1'224)
#kBoolAnd: 37 (#enforced: 37) (#literals: 74)
#kExactlyOne: 74 (#literals: 768)
#kLinear1: 1'536 (#enforced: 1'536)
#kLinear3: 2
#kLinearN: 148 (#terms: 2'298)
[Symmetry] Graph for symmetry has 5'168 nodes and 9'048 arcs.
[Symmetry] Symmetry computation done. time: 0.0011734 dtime: 0.00121832

Preloading model.
#Bound   0.13s best:inf   next:[123610.947,1028471.61] initial_domain
#1       0.13s best:139656.479 next:[123610.947,139656.479] complete_hint
#Model   0.14s var:1536/1536 constraints:2063/2063

Starting search at 0.14s with 8 workers.
6 full problem subsolvers: [core, default_lp, max_lp, no_lp, quick_restart, reduced_costs]
2 first solution subsolvers: [fj, fs_random_no_lp]
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]
3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]

#Bound   0.18s best:139656.479 next:[123610.951,139656.479] am1_presolve (num_literals=694 num_am1=20 increase=4458 work_done=2551)
#2       0.18s best:139650.831 next:[123610.951,139650.831] graph_cst_lns (d=5.00e-01 s=10 t=0.10 p=0.00 stall=0 h=base) [hint]
#Bound   0.19s best:139650.831 next:[131572.567,139650.831] default_lp
#Bound   0.19s best:139650.831 next:[131572.568,139650.831] reduced_costs
#Bound   0.23s best:139650.831 next:[135687.687,139650.831] max_lp
#Model   0.30s var:1526/1536 constraints:2053/2063
#Bound   0.34s best:139650.831 next:[135848.957,139650.831] max_lp
#3       0.47s best:139650.831 next:[135848.957,139650.831] rins_lp_lns (d=7.07e-01 s=18 t=0.10 p=1.00 stall=1 h=base)
#Bound   0.48s best:139650.831 next:[136118.437,139650.831] max_lp
#Model   0.56s var:1512/1536 constraints:2038/2063
#Model   0.66s var:1504/1536 constraints:2030/2063
#Bound   0.68s best:139650.831 next:[136183.946,139650.831] max_lp
#4       0.73s best:139645.183 next:[136183.946,139645.183] graph_var_lns (d=7.07e-01 s=17 t=0.10 p=1.00 stall=1 h=base)
#5       0.74s best:139645.183 next:[136183.946,139645.183] graph_var_lns (d=7.07e-01 s=17 t=0.10 p=1.00 stall=1 h=base) [combined with: rins_lp_lns (d=7.07e...]
#Bound   0.86s best:139645.183 next:[136221.036,139645.183] max_lp
#Model   0.87s var:1478/1536 constraints:2003/2063
#Bound   1.32s best:139645.183 next:[136284.537,139645.183] max_lp
#Bound   1.82s best:139645.183 next:[136351.677,139645.183] max_lp
#Bound   1.93s best:139645.183 next:[136355.681,139645.183] reduced_costs
#Bound   2.07s best:139645.183 next:[136401.974,139645.183] reduced_costs
#Bound   2.19s best:139645.183 next:[136464.159,139645.183] reduced_costs
#Model   2.19s var:1472/1536 constraints:1997/2063
#Bound   2.48s best:139645.183 next:[136498.186,139645.183] max_lp
#Bound   3.13s best:139645.183 next:[136576.285,139645.183] max_lp
#Bound   3.96s best:139645.183 next:[136606.024,139645.183] max_lp
#Model   3.97s var:1464/1536 constraints:1988/2063
#Model   4.79s var:1462/1536 constraints:1986/2063
#Bound   4.79s best:139645.183 next:[136644.126,139645.183] max_lp

Task timing                   n [     min,      max]      avg      dev     time         n [     min,      max]      avg      dev    dtime
              'core':         1 [   4.84s,    4.84s]    4.84s   0.00ns    4.84s         1 [   3.38s,    3.38s]    3.38s   0.00ns    3.38s
        'default_lp':         1 [   4.87s,    4.87s]    4.87s   0.00ns    4.87s         1 [431.97ms, 431.97ms] 431.97ms   0.00ns 431.97ms
  'feasibility_pump':         2 [ 11.76ms, 909.44ms] 460.60ms 448.84ms 921.20ms         1 [464.60ms, 464.60ms] 464.60ms   0.00ns 464.60ms
                'fj':         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns
   '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
     'graph_arc_lns':         4 [118.54ms, 434.73ms] 276.68ms 150.26ms    1.11s         4 [ 23.03ms, 100.04ms]  61.79ms  38.25ms 247.15ms
     'graph_cst_lns':         8 [ 19.21ms, 305.53ms] 141.28ms 105.52ms    1.13s         8 [612.00ns, 100.27ms]  35.93ms  40.47ms 287.48ms
     'graph_dec_lns':         8 [  9.33ms, 331.01ms] 145.30ms 136.80ms    1.16s         8 [ 10.00ns, 100.10ms]  34.70ms  41.86ms 277.57ms
     'graph_var_lns':         6 [  9.79ms, 418.82ms] 192.18ms 161.00ms    1.15s         6 [ 50.00ns, 100.09ms]  51.54ms  48.57ms 309.26ms
                'ls':         6 [134.87ms, 190.95ms] 167.43ms  18.18ms    1.00s         6 [100.01ms, 100.03ms] 100.02ms   6.74us 600.09ms
            'max_lp':         1 [   4.86s,    4.86s]    4.86s   0.00ns    4.86s         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns
             'no_lp':         1 [   4.85s,    4.85s]    4.85s   0.00ns    4.85s         1 [   2.85s,    2.85s]    2.85s   0.00ns    2.85s
     'quick_restart':         1 [   4.86s,    4.86s]    4.86s   0.00ns    4.86s         1 [   1.40s,    1.40s]    1.40s   0.00ns    1.40s
     'reduced_costs':         1 [   4.86s,    4.86s]    4.86s   0.00ns    4.86s         1 [   2.08s,    2.08s]    2.08s   0.00ns    2.08s
         'rins/rens':         6 [ 14.12ms, 406.32ms] 191.42ms 156.84ms    1.15s         5 [162.19us, 100.20ms]  60.66ms  48.29ms 303.28ms
       'rnd_cst_lns':         5 [ 21.10ms, 338.00ms] 190.79ms 130.60ms 953.96ms         5 [692.00ns, 100.00ms]  57.22ms  46.80ms 286.08ms
       'rnd_var_lns':         7 [ 16.38ms, 312.55ms] 161.17ms 119.02ms    1.13s         7 [ 55.00ns, 100.12ms]  41.44ms  42.13ms 290.08ms

Search stats          Bools  Conflicts  Branches  Restarts  BoolPropag  IntegerPropag
             'core':    788     75'530   168'750     6'290   1'315'725      3'617'398
       'default_lp':    768         14     1'710     1'541      12'560         44'274
  'fs_random_no_lp':      0          0         0         0           0              0
           'max_lp':    768          0     1'536     1'536      11'766         39'184
            'no_lp':    768     42'925    70'966    12'273   3'083'778      9'887'908
    'quick_restart':    768         30     7'548     4'600      38'042        215'708
    'reduced_costs':    774        372    10'088     4'626      53'826        333'451

SAT stats             ClassicMinim  LitRemoved  LitLearned  LitForgotten  Subsumed  MClauses  MDecisions  MLitTrue  MSubsumed  MLitRemoved  MReused
             'core':        71'209   1'125'077   6'001'195     4'566'624       860       434       3'262         0         14          100       16
       'default_lp':            13       2'074       2'322             0         0         0           0         0          0            0        0
  'fs_random_no_lp':             0           0           0             0         0         0           0         0          0            0        0
           'max_lp':             0           0           0             0         0         0           0         0          0            0        0
            'no_lp':        41'025     834'075   2'140'896     1'561'562       752       896       8'082         0          1            4        0
    'quick_restart':            29       1'533       2'509             0         0       296       2'640         0          0            0        0
    'reduced_costs':           347      14'084      76'673             0         1       296       2'654         0          0            0        0

Lp stats            Component  Iterations  AddedCuts  OPTIMAL  DUAL_F.  DUAL_U.
     'default_lp':          1       9'150      3'378      231        0        1
         'max_lp':          1       2'872      1'929       23        0        0
  'quick_restart':          1      12'364      2'983      335        1       10
  'reduced_costs':          1      30'539      1'995      539      179       83

Lp dimension            Final dimension of first component
     'default_lp':  1870 rows, 1462 columns, 23150 entries
         'max_lp':  3232 rows, 1536 columns, 32309 entries
  'quick_restart':  1644 rows, 1462 columns, 24942 entries
  'reduced_costs':  1307 rows, 1536 columns, 13065 entries

Lp debug            CutPropag  CutEqPropag  Adjust  Overflow     Bad  BadScaling
     'default_lp':          0            0     221         0  18'509           0
         'max_lp':          0            0      23         0  30'316           0
  'quick_restart':          0            0     330         0  13'814           0
  'reduced_costs':          0            0     757         0   6'601           0

Lp pool             Constraints  Updates  Simplif  Merged  Shortened  Split  Strenghtened    Cuts/Call
     'default_lp':        5'950      188    2'383       0      1'722     84            64  3'378/6'509
         'max_lp':        4'760      324    2'065       0      1'328    266            29  1'929/3'922
  'quick_restart':        5'555      138    2'057       0      1'472     34           187  2'983/6'130
  'reduced_costs':        4'826       65    1'061       0        518     34            24  1'995/4'086

Lp Cut            default_lp  max_lp  quick_restart  reduced_costs
          CG_FF:          46      10             23             25
           CG_K:          21       5             14             17
          CG_KL:           1       -              2              1
           CG_R:          40      19             46             42
          CG_RB:         104      53             91             67
         CG_RBP:          36      22             44             10
             IB:         630       -            652            743
       MIR_1_FF:         152      61            119             41
        MIR_1_K:          53       1             31              4
       MIR_1_KL:          25       -             19              -
        MIR_1_R:           3       1              1              -
       MIR_1_RB:         104      39             72             27
      MIR_1_RBP:          61       8             76              6
       MIR_2_FF:         155     100            119             76
        MIR_2_K:          58       4             62             11
       MIR_2_KL:          15       4             18              7
        MIR_2_R:          26       6              4              4
       MIR_2_RB:         154     125            130             77
      MIR_2_RBP:          86      26            109             21
       MIR_3_FF:          90     123             80             81
        MIR_3_K:          74      24             66             17
       MIR_3_KL:           7       5              7              6
        MIR_3_R:           8      13              5             10
       MIR_3_RB:         104     124            102             64
      MIR_3_RBP:          66      29             56             19
       MIR_4_FF:          75     110             46             48
        MIR_4_K:          74      42             45             20
       MIR_4_KL:           5      11              3              3
        MIR_4_R:           6      13              2              6
       MIR_4_RB:          76      75             54             51
      MIR_4_RBP:          74      55             60             18
       MIR_5_FF:          37      72             34             24
        MIR_5_K:          43      45             43             21
       MIR_5_KL:           8      10              4              8
        MIR_5_R:           3       6              5              3
       MIR_5_RB:          35      53             44             28
      MIR_5_RBP:          54      59             61             20
       MIR_6_FF:          28      43             21             32
        MIR_6_K:          58      39             41             22
       MIR_6_KL:          15      14              7              7
        MIR_6_R:           3       5              2              2
       MIR_6_RB:          20      37             25             17
      MIR_6_RBP:          55      45             45             13
   ZERO_HALF_FF:          58      13             48             31
    ZERO_HALF_K:          19       1             16              4
   ZERO_HALF_KL:           1       -              4              3
    ZERO_HALF_R:         388     331            358            205
   ZERO_HALF_RB:          95      31             36             27
  ZERO_HALF_RBP:          29      17             31              6

LNS stats           Improv/Calls  Closed  Difficulty  TimeLimit
  'graph_arc_lns':           0/4     50%    5.97e-01       0.10
  'graph_cst_lns':           1/8     62%    8.06e-01       0.10
  'graph_dec_lns':           0/8     62%    8.20e-01       0.10
  'graph_var_lns':           1/6     50%    5.87e-01       0.10
      'rins/rens':           4/6     50%    6.52e-01       0.10
    'rnd_cst_lns':           0/5     60%    7.48e-01       0.10
    'rnd_var_lns':           0/7     71%    8.75e-01       0.10

LS stats                                Batches  Restarts/Perturbs  LinMoves  GenMoves  CompoundMoves  Bactracks  WeightUpdates  ScoreComputed
                'ls_restart_compound':        1                  1         0    15'650          1'773      6'937             57        379'632
                   'ls_restart_decay':        1                  1    14'497         0              0          0            277        314'922
          'ls_restart_decay_compound':        2                  2         0    26'979          4'587     11'193             76        656'724
  'ls_restart_decay_compound_perturb':        1                  1         0    13'747          2'317      5'705             36        334'772
                 'ls_restart_perturb':        1                  1    12'562         0              0          0          2'394        383'878

Solutions (5)       Num   Rank
  'complete_hint':    1  [1,1]
  'graph_cst_lns':    1  [2,2]
  'graph_var_lns':    2  [4,5]
    'rins_lp_lns':    1  [3,3]

Objective bounds     Num
    'am1_presolve':    1
      'default_lp':    1
  'initial_domain':    1
          'max_lp':   11
   'reduced_costs':    4

Solution repositories    Added  Queried  Synchro
  'feasible solutions':      5       98        5
   'fj solution hints':      0        0        0
        'lp solutions':     28        6       21
                'pump':      0        0

Improving bounds shared    Num  Sym
            'default_lp':   34    0
                'max_lp':   34    0
         'reduced_costs':    6    0

Clauses shared    Num
         'core':    9
        'no_lp':  274

[Scaling] scaled_objective_bound: 136644 corrected_bound: 136644 delta: -2.56905e-06
CpSolverResponse summary:
status: FEASIBLE
objective: 139645.18265364
best_bound: 136644.1257931651
integers: 0
booleans: 0
conflicts: 0
branches: 0
propagations: 0
integer_propagations: 0
restarts: 0
lp_iterations: 0
walltime: 5.04096
usertime: 5.04096
deterministic_time: 13.2163
gap_integral: 105.986
solution_fingerprint: 0x6aa24a4cea96b19f

[12]:
wfn_reg.length()
[12]:
139645.18265364
[13]:
wfn_reg.cost()
[13]:
248112330.12342116
[14]:
wfn_reg
[14]:
../_images/notebooks_a10_IEA_Wind_TCP_task_55_27_0.svg

Irregular turbine layout¶

[15]:
res_irr_warmup = wfn_irr.optimize(router=warmstart_router)

Check the total length of the warm-start solution:

[16]:
wfn_irr.length()
[16]:
136472.2480500915

Optimize with MILP router¶

[17]:
res_irr = wfn_irr.optimize(router=milp_router)
Using warm start: the model is initialized with the provided solution S.


Starting CP-SAT solver v9.14.6206
Parameters: max_time_in_seconds: 5 log_search_progress: true relative_gap_limit: 0.005 num_workers: 8

Initial optimization model '': (model_fingerprint: 0xdce7638cf32cc953)
#Variables: 1'192 (#bools: 596 in floating point objective) (1'044 primary variables)
  - 596 Booleans in [0,1]
  - 522 in [0,6]
  - 74 in [0,7]
#kAtMostOne: 419 (#literals: 1'216)
#kLinear1: 1'192 (#enforced: 1'192)
#kLinear2: 4
#kLinear3: 5
#kLinearN: 216 (#terms: 2'957)

Starting presolve at 0.00s
The solution hint is complete and is feasible.
[Scaling] Floating point objective has 596 terms with magnitude in [539.378, 15073.7] average = 3460.13
[Scaling] Objective coefficient relative error: 4.51281e-10
[Scaling] Objective worst-case absolute error: 7.28067e-05
[Scaling] Objective scaling factor: 1.04858e+06
  1.21e-03s  0.00e+00d  [DetectDominanceRelations]
  1.01e-02s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1
  6.83e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::ExtractEncodingFromLinear] #potential_supersets=493
  3.39e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateColumns]
  3.79e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
[Symmetry] Graph for symmetry has 4'413 nodes and 8'226 arcs.
[Symmetry] Symmetry computation done. time: 0.0012476 dtime: 0.00080437
  8.73e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  9.48e-03s  2.33e-03d  [operations_research::sat::CpModelPresolver::Probe] #probed=1'192
  6.67e-04s  2.25e-04d  [MaxClique] Merged 419(1'216 literals) into 234(846 literals) at_most_ones.
  2.97e-04s  0.00e+00d  [DetectDominanceRelations]
  3.10e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  5.09e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear]
  7.61e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
  4.33e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  5.10e-04s  1.01e-05d  [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=151 #num_inclusions=75
  5.93e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDifferentVariables]
  4.33e-03s  1.92e-04d  [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=310 #num_inclusions=308
  2.20e-04s  2.00e-07d  [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=4
  5.28e-04s  1.84e-04d  [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap]
  3.97e-04s  2.07e-04d  [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap]
  6.25e-05s  8.71e-06d  [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=136
  3.60e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::MergeClauses]
  3.95e-04s  0.00e+00d  [DetectDominanceRelations]
  3.28e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  1.15e-03s  0.00e+00d  [DetectDominanceRelations]
  4.20e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  2.93e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateColumns]
  4.32e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
[Symmetry] Graph for symmetry has 4'042 nodes and 6'890 arcs.
[Symmetry] Symmetry computation done. time: 0.0005735 dtime: 0.00073496
[SAT presolve] num removable Booleans: 0 / 596
[SAT presolve] num trivial clauses: 0
[SAT presolve] [0s] clauses:76 literals:152 vars:152 one_side_vars:152 simple_definition:0 singleton_clauses:0
[SAT presolve] [0.0002767s] clauses:76 literals:152 vars:152 one_side_vars:152 simple_definition:0 singleton_clauses:0
[SAT presolve] [0.0003772s] clauses:76 literals:152 vars:152 one_side_vars:152 simple_definition:0 singleton_clauses:0
  4.51e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  7.74e-03s  2.15e-03d  [operations_research::sat::CpModelPresolver::Probe] #probed=1'192
  4.69e-04s  2.19e-04d  [MaxClique]
  6.22e-04s  0.00e+00d  [DetectDominanceRelations]
  5.01e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  3.23e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::ProcessAtMostOneAndLinear]
  3.12e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraints]
  3.61e-04s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDuplicateConstraintsWithDifferentEnforcements]
  2.98e-04s  7.55e-06d  [operations_research::sat::CpModelPresolver::DetectDominatedLinearConstraints] #relevant_constraints=150 #num_inclusions=74
  5.58e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::DetectDifferentVariables]
  4.23e-04s  4.60e-06d  [operations_research::sat::CpModelPresolver::ProcessSetPPC] #relevant_constraints=309
  6.93e-05s  1.90e-07d  [operations_research::sat::CpModelPresolver::FindAlmostIdenticalLinearConstraints] #num_tested_pairs=2
  6.84e-04s  1.82e-04d  [operations_research::sat::CpModelPresolver::FindBigAtMostOneAndLinearOverlap]
  4.46e-04s  2.07e-04d  [operations_research::sat::CpModelPresolver::FindBigVerticalLinearOverlap]
  8.69e-05s  8.71e-06d  [operations_research::sat::CpModelPresolver::FindBigHorizontalLinearOverlap] #linears=136
  3.00e-05s  0.00e+00d  [operations_research::sat::CpModelPresolver::MergeClauses]
  4.17e-04s  0.00e+00d  [DetectDominanceRelations]
  4.84e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  1.08e-03s  0.00e+00d  [operations_research::sat::CpModelPresolver::ExpandObjective] #entries=4'968 #tight_variables=596 #tight_constraints=74

Presolve summary:
  - 0 affine relations were detected.
  - rule 'TODO linear inclusion: superset is equality' was applied 149 times.
  - rule 'at_most_one: transformed into max clique.' was applied 1 time.
  - rule 'deductions: 1192 stored' was applied 1 time.
  - rule 'exactly_one: simplified objective' was applied 74 times.
  - rule 'linear: positive equal one' was applied 74 times.
  - rule 'objective: shifted cost with exactly ones' was applied 74 times.
  - rule 'presolve: 0 unused variables removed.' was applied 1 time.
  - rule 'presolve: iteration' was applied 2 times.
  - rule 'setppc: exactly_one included in linear' was applied 74 times.
  - rule 'setppc: reduced linear coefficients' was applied 73 times.
  - rule 'setppc: removed trivial linear constraint' was applied 1 time.
  - rule 'variables: detect fully reified value encoding' was applied 596 times.
  - rule 'variables: detect half reified value encoding' was applied 1'192 times.

Presolved optimization model '': (model_fingerprint: 0xe724ee61a4757ecc)
#Variables: 1'192 (#bools: 522 in objective) (1'044 primary variables)
  - 596 Booleans in [0,1]
  - 522 in [0,6]
  - 74 in [0,7]
#kAtMostOne: 158 (#literals: 694)
#kBoolAnd: 76 (#enforced: 76) (#literals: 152)
#kExactlyOne: 74 (#literals: 596)
#kLinear1: 1'192 (#enforced: 1'192)
#kLinear2: 4
#kLinear3: 1
#kLinearN: 145 (#terms: 1'777)
[Symmetry] Graph for symmetry has 4'042 nodes and 6'890 arcs.
[Symmetry] Symmetry computation done. time: 0.0004448 dtime: 0.00073413

Preloading model.
#Bound   0.09s best:inf   next:[93516.0522,1236251.99] initial_domain
#1       0.09s best:136451.277 next:[93516.0522,136451.277] complete_hint
#Model   0.09s var:1192/1192 constraints:1650/1650

Starting search at 0.09s with 8 workers.
6 full problem subsolvers: [core, default_lp, max_lp, no_lp, quick_restart, reduced_costs]
2 first solution subsolvers: [fj, fs_random_no_lp]
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]
3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]

#Bound   0.12s best:136451.277 next:[95755.9972,136451.277] am1_presolve (num_literals=522 num_am1=19 increase=2348752631 work_done=1852)
#2       0.13s best:136417.955 next:[95755.9972,136417.955] no_lp [hint] (fixed_bools=0/596)
#Bound   0.13s best:136417.955 next:[104424.449,136417.955] default_lp
#Bound   0.14s best:136417.955 next:[106103.007,136417.955] reduced_costs
#Bound   0.15s best:136417.955 next:[106404.863,136417.955] reduced_costs
#3       0.16s best:135518.936 next:[106404.863,135518.936] graph_arc_lns (d=5.00e-01 s=9 t=0.10 p=0.00 stall=0 h=base)
#Bound   0.17s best:135518.936 next:[127628.142,135518.936] max_lp
#4       0.17s best:135485.613 next:[127628.142,135485.613] graph_arc_lns (d=5.00e-01 s=9 t=0.10 p=0.00 stall=0 h=base) [combined with: no_lp [hint]...]
#5       0.23s best:135031.477 next:[127628.142,135031.477] rnd_cst_lns (d=7.07e-01 s=15 t=0.10 p=1.00 stall=1 h=base)
#Bound   0.27s best:135031.477 next:[128569.256,135031.477] max_lp
#6       0.29s best:134995.892 next:[128569.256,134995.892] no_lp (fixed_bools=0/596)
#Bound   0.36s best:134995.892 next:[129244.173,134995.892] max_lp
#Bound   0.50s best:134995.892 next:[129611.049,134995.892] max_lp
#7       0.57s best:134786.792 next:[129611.049,134786.792] rins_lp_lns (d=7.07e-01 s=18 t=0.10 p=1.00 stall=1 h=base)
#Bound   0.71s best:134786.792 next:[129817.488,134786.792] max_lp
#Model   0.79s var:1186/1192 constraints:1643/1650
#Bound   1.22s best:134786.792 next:[130126.924,134786.792] max_lp
#Model   1.38s var:1168/1192 constraints:1623/1650
#Bound   1.79s best:134786.792 next:[130336.912,134786.792] max_lp
#Model   1.85s var:1158/1192 constraints:1613/1650
#Model   2.35s var:1156/1192 constraints:1611/1650
#Bound   2.43s best:134786.792 next:[130414.9,134786.792] max_lp
#Bound   3.02s best:134786.792 next:[130478.41,134786.792] max_lp
#Model   3.05s var:1154/1192 constraints:1609/1650
#Bound   3.72s best:134786.792 next:[130585.545,134786.792] max_lp
#Bound   4.42s best:134786.792 next:[130682.423,134786.792] max_lp

Task timing                   n [     min,      max]      avg      dev     time         n [     min,      max]      avg      dev    dtime
              'core':         1 [   4.91s,    4.91s]    4.91s   0.00ns    4.91s         1 [   3.67s,    3.67s]    3.67s   0.00ns    3.67s
        'default_lp':         1 [   4.91s,    4.91s]    4.91s   0.00ns    4.91s         1 [724.30ms, 724.30ms] 724.30ms   0.00ns 724.30ms
  'feasibility_pump':        11 [ 31.90us, 590.12ms]  54.66ms 169.35ms 601.23ms         1 [362.47ms, 362.47ms] 362.47ms   0.00ns 362.47ms
                'fj':         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns
   '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
     'graph_arc_lns':         6 [ 26.72ms, 337.19ms] 184.84ms 133.40ms    1.11s         6 [923.32us, 100.16ms]  52.37ms  47.77ms 314.24ms
     'graph_cst_lns':         8 [ 21.73ms, 305.23ms] 128.06ms 120.35ms    1.02s         8 [ 97.91us, 100.02ms]  39.25ms  47.10ms 314.04ms
     'graph_dec_lns':         9 [  6.20ms, 399.27ms] 146.14ms 150.80ms    1.32s         9 [ 10.00ns, 100.04ms]  36.94ms  44.98ms 332.43ms
     'graph_var_lns':         8 [  8.74ms, 346.75ms] 133.66ms 135.99ms    1.07s         8 [ 10.00ns, 100.05ms]  39.48ms  47.00ms 315.85ms
                'ls':         7 [121.53ms, 180.29ms] 163.18ms  18.71ms    1.14s         7 [100.01ms, 100.02ms] 100.01ms   3.61us 700.07ms
            'max_lp':         1 [   4.90s,    4.90s]    4.90s   0.00ns    4.90s         0 [  0.00ns,   0.00ns]   0.00ns   0.00ns   0.00ns
             'no_lp':         1 [   4.91s,    4.91s]    4.91s   0.00ns    4.91s         1 [   2.86s,    2.86s]    2.86s   0.00ns    2.86s
     'quick_restart':         1 [   4.91s,    4.91s]    4.91s   0.00ns    4.91s         1 [823.94ms, 823.94ms] 823.94ms   0.00ns 823.94ms
     'reduced_costs':         1 [   4.91s,    4.91s]    4.91s   0.00ns    4.91s         1 [   1.64s,    1.64s]    1.64s   0.00ns    1.64s
         'rins/rens':         5 [ 14.99ms, 355.43ms] 225.02ms 132.92ms    1.13s         5 [ 69.09us, 100.10ms]  62.01ms  42.70ms 310.07ms
       'rnd_cst_lns':         7 [ 16.31ms, 407.07ms] 178.17ms 144.64ms    1.25s         7 [201.00ns, 100.20ms]  47.17ms  46.23ms 330.19ms
       'rnd_var_lns':         7 [ 12.28ms, 382.47ms] 166.58ms 147.72ms    1.17s         7 [ 71.00ns, 100.04ms]  47.57ms  46.65ms 332.97ms

Search stats          Bools  Conflicts  Branches  Restarts  BoolPropag  IntegerPropag
             'core':    615     79'399   210'812     9'476   1'281'580      3'710'850
       'default_lp':    608         51     1'528     1'194      10'614         40'329
  'fs_random_no_lp':      0          0         0         0           0              0
           'max_lp':    596          0     1'192     1'192       7'271         24'815
            'no_lp':    596     58'125    79'832     7'171   3'325'101     10'738'191
    'quick_restart':    596         22     3'550     2'315      16'272         69'736
    'reduced_costs':    596        273     4'529     2'350      22'544        117'902

SAT stats             ClassicMinim  LitRemoved  LitLearned  LitForgotten  Subsumed  MClauses  MDecisions  MLitTrue  MSubsumed  MLitRemoved  MReused
             'core':        73'439     797'687   5'215'798     4'035'116       937     4'458      41'741         0        801       11'765      988
       'default_lp':            43       1'589       4'301             0         3         0           0         0          0            0        0
  'fs_random_no_lp':             0           0           0             0         0         0           0         0          0            0        0
           'max_lp':             0           0           0             0         0         0           0         0          0            0        0
            'no_lp':        54'880     361'986   4'389'501     2'931'975       177       883       6'464         0         19          237       73
    'quick_restart':            21         974       2'031             0         0       144       1'002         0          0            0        0
    'reduced_costs':           267      16'410      12'088             0         0       146       1'018         0          0            0        0

Lp stats            Component  Iterations  AddedCuts  OPTIMAL  DUAL_F.  DUAL_U.
     'default_lp':          1       8'525      3'250      410        0        0
         'max_lp':          1       1'755      2'059       23        0        0
  'quick_restart':          1       8'571      3'187      267        0        0
  'reduced_costs':          1      28'344      2'539      902      177       17

Lp dimension            Final dimension of first component
     'default_lp':  1378 rows, 1119 columns, 16703 entries
         'max_lp':  2685 rows, 1192 columns, 24203 entries
  'quick_restart':  1842 rows, 1119 columns, 25681 entries
  'reduced_costs':   1140 rows, 1192 columns, 9328 entries

Lp debug            CutPropag  CutEqPropag  Adjust  Overflow     Bad  BadScaling
     'default_lp':          0            2     405         0  19'308           0
         'max_lp':          0            0      23         0  33'547           0
  'quick_restart':          0            0     262         0  18'527           0
  'reduced_costs':          0            0   1'079         0  11'576           0

Lp pool             Constraints  Updates  Simplif  Merged  Shortened  Split  Strenghtened    Cuts/Call
     'default_lp':        5'201      188    1'967       0      1'858     31           112  3'250/6'351
         'max_lp':        4'305      353    1'994       0      1'623    150            22  2'059/4'034
  'quick_restart':        5'138      176    1'993       0      1'840     39            91  3'187/5'898
  'reduced_costs':        4'785      141      695       0        690      5            97  2'539/4'397

Lp Cut            max_lp  default_lp  quick_restart  reduced_costs
          CG_FF:       6          25             26             24
           CG_K:       5          14              6             12
          CG_KL:       -           -              1              1
           CG_R:      26          32             38             44
          CG_RB:      49          74             95             92
         CG_RBP:      22          37             34             32
         Clique:       -           -              -              1
             IB:       -         579            575            726
       MIR_1_FF:      87         175            177             66
        MIR_1_K:       5          54             51             16
       MIR_1_KL:       4          27             28              6
        MIR_1_R:       7           5              1              3
       MIR_1_RB:      58         105             95             52
      MIR_1_RBP:      10          84             89             23
      MIR_1_RLT:       -           -              -              1
       MIR_2_FF:     108         184            187            108
        MIR_2_K:       7          67             62              9
       MIR_2_KL:       5          24             18              6
        MIR_2_R:      15           9             10             10
       MIR_2_RB:     102         144            125            132
      MIR_2_RBP:      32          93            104             22
       MIR_3_FF:     122         128            110            103
        MIR_3_K:      24          70             83             24
       MIR_3_KL:       4           6              4              2
        MIR_3_R:      15           7             10              7
       MIR_3_RB:     137         118             83            145
      MIR_3_RBP:      56          83             94             45
       MIR_4_FF:     106          87             68             96
        MIR_4_K:      49          63             62             15
       MIR_4_KL:       5           8              3              3
        MIR_4_R:      14           5              5             10
       MIR_4_RB:      92          75             51             92
      MIR_4_RBP:      67          82             58             22
       MIR_5_FF:      56          49             53             55
        MIR_5_K:      35          61             60             16
       MIR_5_KL:      14          18             16             14
        MIR_5_R:      11           2              6              5
       MIR_5_RB:      53          32             38             64
      MIR_5_RBP:      68          66             67             20
       MIR_6_FF:      33          48             32             34
        MIR_6_K:      53          46             43             16
       MIR_6_KL:      24          22             23             13
        MIR_6_R:       7           2              1              5
       MIR_6_RB:      34          21             14             36
      MIR_6_RBP:      75          51             48             25
   ZERO_HALF_FF:      15          29             35             21
    ZERO_HALF_K:       1           9              8              3
   ZERO_HALF_KL:       2           2              1              -
    ZERO_HALF_R:     291         241            327            219
   ZERO_HALF_RB:      36          63             44             37
  ZERO_HALF_RBP:      12          24             18              6

LNS stats           Improv/Calls  Closed  Difficulty  TimeLimit
  'graph_arc_lns':           1/6     50%    5.64e-01       0.10
  'graph_cst_lns':           0/8     62%    7.81e-01       0.10
  'graph_dec_lns':           0/9     67%    8.72e-01       0.10
  'graph_var_lns':           0/8     50%    6.11e-01       0.10
      'rins/rens':           3/5     40%    4.32e-01       0.10
    'rnd_cst_lns':           1/7     57%    7.63e-01       0.10
    'rnd_var_lns':           0/7     57%    7.52e-01       0.10

LS stats                                Batches  Restarts/Perturbs  LinMoves  GenMoves  CompoundMoves  Bactracks  WeightUpdates  ScoreComputed
                   'ls_restart_decay':        1                  1    18'244         0              0          0            405        386'155
  'ls_restart_decay_compound_perturb':        1                  1         0    17'113          3'414      6'849             56        436'927
           'ls_restart_decay_perturb':        2                  2    37'509         0              0          0            873        773'935
                 'ls_restart_perturb':        3                  3    47'358         0              0          0         15'085      1'561'665

Solutions (7)       Num   Rank
  'complete_hint':    1  [1,1]
  'graph_arc_lns':    2  [3,4]
          'no_lp':    2  [2,6]
    'rins_lp_lns':    1  [7,7]
    'rnd_cst_lns':    1  [5,5]

Objective bounds     Num
    'am1_presolve':    1
      'default_lp':    1
  'initial_domain':    1
          'max_lp':   11
   'reduced_costs':    2

Solution repositories    Added  Queried  Synchro
  'feasible solutions':      8      112        8
   'fj solution hints':      0        0        0
        'lp solutions':     10        5       10
                'pump':      0        0

Improving bounds shared    Num  Sym
            'default_lp':    6    0
                'max_lp':   16    0
         'quick_restart':    2    0
         'reduced_costs':   18    0

Clauses shared      Num
           'core':   16
  'reduced_costs':    1

[Scaling] scaled_objective_bound: 130682 corrected_bound: 130682 delta: -3.77913e-07
CpSolverResponse summary:
status: FEASIBLE
objective: 134786.7922581253
best_bound: 130682.4229892695
integers: 0
booleans: 0
conflicts: 0
branches: 0
propagations: 0
integer_propagations: 0
restarts: 0
lp_iterations: 0
walltime: 5.04745
usertime: 5.04745
deterministic_time: 13.0334
gap_integral: 108.723
solution_fingerprint: 0x8de4169e43eb94c3

[18]:
wfn_irr.length()
[18]:
134807.7634895362
[19]:
wfn_irr.cost()
[19]:
247033944.13135293
[20]:
wfn_irr
[20]:
../_images/notebooks_a10_IEA_Wind_TCP_task_55_36_0.svg

Layouts’ edge list¶

These lists of 3-tuples has all the edges and their cable type (as an index to the turbines_per_cable list), i.e. (coordinate_A, coordinate_B, cable_type).

Negative node indices represent substations, the node indices ranging from 0 to 73 represent the WT in the order they were given.

If the network has contours or detours, indices will go beyond the number of coordinates (WT, SS, borders) provided, and the mapping of these additional indices to indices to the provided coordinates is presented.

[21]:
wfn_reg.G.edges(data='cable')
[21]:
EdgeDataView([(-1, 47, 2), (-1, 56, 2), (-1, 46, 2), (-1, 33, 2), (-1, 45, 2), (-1, 57, 2), (-1, 34, 2), (-1, 24, 2), (-1, 49, 2), (-1, 58, 2), (-1, 32, 2), (0, 1, 0), (1, 4, 0), (4, 5, 1), (2, 3, 0), (3, 8, 0), (8, 14, 1), (5, 9, 1), (9, 15, 1), (6, 7, 0), (7, 12, 0), (12, 13, 1), (14, 22, 1), (15, 24, 2), (10, 11, 0), (11, 16, 0), (16, 17, 1), (13, 20, 1), (20, 21, 1), (22, 23, 1), (17, 26, 1), (26, 25, 1), (18, 19, 0), (19, 28, 0), (28, 27, 1), (21, 32, 2), (23, 33, 2), (25, 34, 2), (27, 36, 1), (36, 35, 1), (29, 38, 0), (29, 40, 0), (38, 37, 1), (30, 31, 0), (31, 44, 1), (31, 42, 0), (44, 45, 1), (44, 43, 0), (35, 46, 2), (37, 48, 1), (48, 47, 1), (39, 50, 1), (39, 52, 1), (50, 49, 2), (41, 52, 1), (41, 54, 0), (51, 62, 1), (51, 60, 1), (60, 59, 1), (53, 62, 0), (53, 64, 0), (61, 70, 0), (61, 69, 1), (69, 68, 1), (63, 70, 0), (54, 55, 0), (65, 66, 1), (65, 80, 1), (56, 80, 1), (67, 68, 1), (67, 57, 2), (59, 58, 2), (66, 71, 0), (66, 73, 0), (71, 72, 0)])

Alternatively we can use get_network() method, to get the final cabling network as a structured array of edge data, and then extract desired edge data from it.

Regular turbine layout¶

[22]:
network_reg = wfn_reg.get_network()
print(network_reg.dtype.names)
('src', 'tgt', 'length', 'load', 'cable')
[23]:
network_cable_reg = np.column_stack((network_reg['src'], network_reg['tgt'], network_reg['cable']))
print(network_cable_reg)
[[47 -1  2]
 [56 -1  2]
 [46 -1  2]
 [33 -1  2]
 [45 -1  2]
 [57 -1  2]
 [34 -1  2]
 [24 -1  2]
 [49 -1  2]
 [58 -1  2]
 [32 -1  2]
 [ 0  1  0]
 [ 1  4  0]
 [ 4  5  1]
 [ 2  3  0]
 [ 3  8  0]
 [ 8 14  1]
 [ 5  9  1]
 [ 9 15  1]
 [ 6  7  0]
 [ 7 12  0]
 [12 13  1]
 [14 22  1]
 [15 24  2]
 [10 11  0]
 [11 16  0]
 [16 17  1]
 [13 20  1]
 [20 21  1]
 [22 23  1]
 [17 26  1]
 [26 25  1]
 [18 19  0]
 [19 28  0]
 [28 27  1]
 [21 32  2]
 [23 33  2]
 [25 34  2]
 [27 36  1]
 [36 35  1]
 [29 38  0]
 [40 29  0]
 [38 37  1]
 [30 31  0]
 [31 44  1]
 [42 31  0]
 [44 45  1]
 [43 44  0]
 [35 46  2]
 [37 48  1]
 [48 47  1]
 [39 50  1]
 [52 39  1]
 [50 49  2]
 [41 52  1]
 [54 41  0]
 [62 51  1]
 [51 60  1]
 [60 59  1]
 [53 62  0]
 [64 53  0]
 [70 61  0]
 [61 69  1]
 [69 68  1]
 [63 70  0]
 [55 54  0]
 [66 65  1]
 [65 80  1]
 [80 56  1]
 [68 67  1]
 [67 57  2]
 [59 58  2]
 [71 66  0]
 [73 66  0]
 [72 71  0]]

Irregular turbine layout¶

[24]:
network_irr = wfn_irr.get_network()
network_cable_irr = np.column_stack((network_irr['src'], network_irr['tgt'], network_irr['cable']))
print(network_cable_irr)
[[41 -1  2]
 [28 -1  2]
 [49 -1  2]
 [55 -1  1]
 [39 -1  2]
 [60 -1  2]
 [70 -1  2]
 [25 -1  2]
 [33 -1  2]
 [80 -1  2]
 [81 -1  2]
 [ 0 50  0]
 [50 46  0]
 [ 1 34  0]
 [34 20  0]
 [ 2  8  1]
 [ 7  2  1]
 [ 8 42  1]
 [ 3 12  1]
 [15  3  1]
 [12 45  1]
 [ 4 20  0]
 [20 37  1]
 [ 9  5  0]
 [ 5 32  1]
 [32 14  1]
 [ 6 35  0]
 [35 36  0]
 [42 25  2]
 [10 24  0]
 [24 17  0]
 [11 18  0]
 [18 59  0]
 [45 33  2]
 [13 26  0]
 [26 31  0]
 [14 68  1]
 [68 73  2]
 [16 29  1]
 [17 16  1]
 [29 53  1]
 [59 60  2]
 [52 59  1]
 [37 51  1]
 [44 22  1]
 [22 67  1]
 [67 70  2]
 [23 43  0]
 [43  7  0]
 [31 56  1]
 [27 52  0]
 [38 27  0]
 [53 28  2]
 [30 54  1]
 [56 30  1]
 [54 49  2]
 [36 62  1]
 [62 69  1]
 [51 41  2]
 [40 55  1]
 [57 40  0]
 [47 65  0]
 [65 58  1]
 [48 65  0]
 [58 61  1]
 [61 64  1]
 [64 71  2]
 [69 63  1]
 [71 81  2]
 [73 80  2]
 [21 15  0]
 [19  9  0]
 [66 21  0]
 [46 44  1]
 [63 39  2]
 [72 57  0]]

Mapping of contour/detour¶

Mapping of contour/detour node to the index of its VertexC coordinate :

[25]:
wfn_reg.map_detour_vertex()
[25]:
{80: 76}
[26]:
wfn_irr.map_detour_vertex()
[26]:
{80: 28, 81: 76}