This release adds library-wide support for ringed cable networks (those with cable cycles or "loops") – check the documentation for details.
- New
topology=alternative:'ringed'orTopology.RINGED. - Solution graphs now carry a mandatory
topologyattribute. The newTopology,ModelOptions, and self-describingTerseLinkstypes make solver configuration, warm starts, and solution exchange topology-aware. - MILP users can now retrieve an incumbent topology skipping
PathFindercalls with.get_incumbent_topology(). - Multi-root clustering was rewritten to keep turbines closer to their substations without adding feeders. HGS and LKH-3 now handle empty clusters.
- Validation now reports topology, load, capacity, and crossing violations without modifying the graph.
validate_routeset()moved fromoptiwindnet.crossingstooptiwindnet.interarrayliband now returnslist[str];clusterize()now returns only the cluster list. - Planar-embedding generation is about 1.5 times faster, and Poisson-disc site generation avoids more unnecessary border and obstacle checks.
- Solver recovery and retry handling was improved for SCIP and FiberSCIP, including concurrent SCIP use on Windows. Documentation now includes dedicated guides for topology choices, ringed networks, and multi-substation clustering.
- The legacy EW implementations (
ClassicEW,CPEW,NBEW,OBEW,EW_presolver) andoptiwindnet.interfacewere removed; useheuristics.constructor()or theWindFarmNetworkrouter API. hgs_multiroot()anditerative_hgs_cvrp()were removed in favor ofhgs_cvrp();lkh()anditerative_lkh()were removed in favor oflkh3().- The new implementations are more capable than the ones they replace, please report if you find a regression.
- Major overhaul of the test scripts.
Drop-in replacement for v0.2.2. The APIs deprecated in v0.2.2 are still available and still emit DeprecationWarning; they are scheduled for removal in v0.3.
- Balanced Subtrees Actually Balanced (MILP and HGS):
balanced=Truepromises subtree loads differing at most by one unit, but both solver families only bounded those loads from below, letting a subtree grow up tocapacity. This is now fixed consistently on both sides:- MILP: the upper bound
ceil(T / feeders)is now enforced across the pyomo, SCIP and OR-Tools model builders. - HGS:
hgs_cvrp()used to request more slack nodes than there were routes wheneverT < feeders * (capacity - 1), forcing the surplus through clippedinfarcs and inflating the reported objective. The balanced sub-problem is now solved atcapacity_effective = ceil(T / feeders), reported insolver_details.
- MILP: the upper bound
- Exact Feeder Count (MILP and HGS): a new, mirrored way to pin the feeder count instead of only bounding it from above. Because
balancedis only expressible once the feeder count is pinned, this makes balanced solutions reachable above the minimum feeder count.- MILP:
feeder_limit="exactly"pins the feeder count tomax_feeders(whereas"specified"remains an upper bound). - HGS:
hgs_cvrp(vehicles=F, vehicles_exact=True)— exposed asHGSRouter(feeder_limit=F, feeder_exact=True)— pins the feeder count toF, whereasvehiclesalone remains an upper bound that HGS-CVRP normally undershoots. It currently requiresbalanced=Trueand a single substation;Fmust lie betweenceil(T / capacity)andT.
- MILP:
- Reversible lat/lon Coordinates:
L_from_yaml()andL_from_pbf()now project all coordinates into the single UTM zone holding the most turbines (instead of the zone of the first point), minimizing distortion for the bulk of the layout, and retain that zone as the graph attributesutm_zone_numberandutm_zone_letter. This makesVertexCreversible back to lat/lon viautm.to_latlon(). Multi-zone.yamlinput no longer raises an assertion. - Tunable
EWRouter: themethodandbias_marginparameters ofheuristics.constructor()are now exposed onEWRouter, giving access to theesau_williams,biased_EW,rootlustandradial_EWmethods from the high-level API. - Concurrent HiGHS: the pyomo HiGHS solver now runs a concurrent branch-and-bound tree search, in line with the other MILP backends. This speedup requires
highspyv1.15 or newer; older versions accept the setting but run the search serially. - New Locations: added Revolution, Sunrise, Hornsea 2, Norfolk Vanguard West, East Anglia 3 and Hollandse Kust Noord.
- Multi-Root Warmstart Eligibility:
is_warmstart_eligible()compared only the first root's feeder count against the feeder limit, while the model constrains the total across all roots. PathFinderMalformed Chain: two spanning fences of the same subtree meeting at a single chain-end vertex form a dead-end pocket, which could leave a chain short an access cone. Chain detection is now keyed on the subtree alone within a chain-end vertex.scaffolded()Correctness: fence hops and shortened-contour hops are now converted to primed edges (in bothPathFinder.scaffolded()andinterarraylib.scaffolded()), and a supertriangle/clone id collision was fixed.- Sexagesimal Coordinate Parsing:
_translate_latlonstr()failed to reset minutes/seconds between coordinates, corrupting the parsed values.
WindFarmNetwork.from_yaml()is renamed toWindFarmNetwork.from_own_yaml(); the old name still works and emits aDeprecationWarning.- Reminder — the following remain available in this release and will be removed in v0.3. Users are advised to migrate now:
- Standalone EW heuristics (
ClassicEW,CPEW,NBEW,OBEW,EW_presolver) →heuristics.constructor()(or the high-levelWindFarmNetwork/EWRouter). See the Legacy heuristics migration guide, which pairs each legacy call with itsconstructor()equivalent. optiwindnet.interface(heuristic_wrapper(),HeuristicFactory) →WindFarmNetwork/EWRouter.- HGS aliases
hgs_multiroot()/iterative_hgs_cvrp()→hgs_cvrp(). - LKH entry points
lkh()/iterative_lkh()→lkh3().
- Standalone EW heuristics (
- Docstrings: project-wide docstring formatting pass — standardized markup of string values for Sphinx rendering, unicode arrows, and docstrings for the database model.
- Test Coverage: expanded coverage for
geometric,interarraylib,plotting,svg,repair,themesandbaselines.utils. - CI: isolated OR-Tools in a shared subprocess to resolve solver DLL conflicts, switched SCIP download to GitHub, bumped SCIPOptSuite, installed python tooling from conda, and added manual-dispatch pipeline targets.
- Advanced API Cleanups: Helper functions for root-assignment and link-blockage moved from
optiwindnet.geometrictooptiwindnet.interarraylib. Users should importadd_terminal_closest_root(),add_link_blockmap(), andadd_link_cosines()fromoptiwindnet.interarraylib.
- Default Vector SVG Plotting: High-level
WindFarmNetworkplotting methods (plot(),plot_location(),plot_available_links(),plot_navigation_mesh(), andplot_selected_links()) now use a modern, interactive vector SVG plotting backend (svgplot/svgpplot) by default. This delivers clean, high-resolution inline displays in Jupyter notebooks. The legacy Matplotlib-based backend remains fully accessible by passing an explicitaxargument (includingax=Noneto dynamically instantiate Matplotlib figures). - svgplot() matches gplot()'s features: SVG plots now support node labeling, boundary/obstacle vertex tagging, and figure legend.
- Informative String Representations: Added descriptive, debugger-safe string representations (
__repr__) forWindFarmNetworkandRoutersubclasses (EWRouter,HGSRouter,MILPRouter) displaying key configuration parameters and solved network metrics. - Shorter Substation Labels: Pre-packaged offshore wind farm datasets (.osm.pbf format) have been updated with short, human-readable substation abbreviations (such as "Alpha", "Beta", "OSS") to fit cleanly in visualization labels.
- New Fused Heuristic: Added
heuristics.constructor()withesau_williams,biased_EW,rootlust, andradial_EWmethods, unifying the constructive routing heuristics. The high-levelEWRouternow uses this path, offering radial topology and the performant rootlust method. - LKH-3 Solver Parity: Added
lkh3()as the preferred LKH entry point, bringing it to feature parity with the HGS solver. It supports single- and multi-root configurations, per-root clustering, warm starts, capacity-violation retries, crossing repair, and improved solver metadata. - Expanded Crossing Diagnostics: Added Shapely-based
find_geometric_crossings()for geometry-first validation of arbitrary routesets, including detours, contour clones, shared-run overlap crossings, and branch-split cases. - Robust PathFinder Detours: Major robustness improvements when routing detours among cable routes that follow boundaries or exclusion zones, significantly reducing cable use on sites with many obstacles.
- Standalone EW heuristics (
ClassicEW,CPEW,NBEW,OBEW, andEW_presolver) are deprecated and will be removed in v0.3. They are superseded by the new unifiedheuristics.constructor(). Note thatconstructorexpects the available-links graphA, not the location graphL. - The legacy
optiwindnet.interfacemodule (heuristic_wrapper(),HeuristicFactory) is deprecated and will be removed in v0.3; useWindFarmNetwork/EWRouterinstead.
- Pathfinder Robustness: Resolved fatal crashes (
KeyErrorand triangulation flip failures) when constructing detours. - Diagonal Mesh Exclusion: Prevented invalid diagonal paths by skipping edges in the site's boundary polygon during navigation mesh generation.
- Logging & Diagnostics: Replaced all remaining raw
print()statements across the API and utility modules with standard Python logging. - LKH and Heuristic Repairs: Fixed LKH warm-start tour construction (indexing, walk order within clusters) and aligned HGS/LKH repair behavior for capacity-violating and crossing routes.
- Overflow Prevention: Added checks for LKH weight-matrix construction with clear guidance when inputs need normalization.
- Crossing Detection: Fixed shared-route overlap crossing detection and added geometric handling for route intersections not expressible as available-edge crossings.
- Python 3.11–3.14 Support: Explicitly declared support for Python 3.11 through 3.14 with standard Trove classifiers on PyPI.
- Updated OR-Tools Floor: Aligned OR-Tools requirements in
pyproject.tomlto>=9.14.6206for consistency across development and production environments. - Strict Deprecation Testing: Test suite configured to treat
DeprecationWarningas errors to guarantee API health. - Linting & Code Quality: Enforced strict Ruff linting and formatting rules via continuous integration.
- Performance Optimizations: Optimized pathfinding sector lookups and precomputed chain-end topologies to speed up execution.
optiwindnet.dbmodule only: RouteSet schema slimmed (v4):num_gateswas renamed tofeeders_per_root; the unusedvalid,is_normalized, andstuntCcolumns were removed. Thepython -m optiwindnet.db.migratescript now writes the v4 schema and accepts both v2 (Pony ORM) and v3 (Peewee) source databases.
- OR-Tools MILP backend switched to MathOpt API (replacing
cp_model), enabling multiple backends through a unified wrapper. No impact on use through either API. - Pyomo CPLEX/Gurobi solvers switched to the persistent interfaces (
cplex_persistent,gurobi_persistent). Relevant for successive calls to solver.solve(). PathFinder:Ais now a mandatory argument, it is relied upon to inform about tentative feeder crossings (saves the repeated check done before); default options were updated; search heuristics improved.
- LKH improvements: iterations are also triggered on capacity violations, new
warmstartargument. - Better estimation of obstructed feeder lengths pre-optimization (make_planar_embedding).
- Default thread count for MathOpt solvers set to the number of physical cores; non-OR-Tools solvers also use
physical_core_count(). - New context-managed database connection API;
open_database()anddatabase_connection()accept atimeoutargument. .osm.pbfparsing now accepts locations without borders.- Added typing stubs and improved type annotations.
- Informative string repr for
SvgRepr.
- Multiple PathFinder robustness fixes: collinear vertices in funnel apex update, expansion of
P_pathsshortcuts when building contour clones, shortcut provenance tracking for barriers, cumulative turning check for dropping traversers, andbad_streakdecay on first arrival. make_planar_embeddingfixes: constraint checks and line-of-sight tagging now use Shapely'sSTRtree, proper handling of diagonal promotion conflicts in concave meshes, string-pulling skipped when only one border vertex is on the path (enabled by STRtree check).validate_routeset(): corrected detour index range; touchpoint set as bunch-split corner apex.- LKH: replaced stale
_add_link_blockagecall withadd_link_blockmap. - Removed WAL mode from the SQLite open pragma (caused issues on shared clusters).
- Stunt vertices are no longer placed in
G(regression since a70b575). - Gracefully handle repeated extents' vertices in .yaml input files.
- Fixed
migrate.pyImportError.
- Replaced
dillwithpickleeverywhere it was used in tests. - Removed
stuntCfrom the routeset saving path. - CI now runs a test matrix covering Python 3.11–3.14 (default bumped to 3.14); release requires passing on all versions.
- Increased test coverage and added topology-aware routeset comparison to prevent spurious failures.
- Major refactor of the Topfarm integration example (now including substation trajectory); several notebook updates.
- Added links to TOPFARM and Ard, updated preamble with Jupyter tutorial links.
- Acknowledged the DFF grant in README and doc index.
- Improved docstrings and setup instructions.
- HGS-CVRP interface unified:
baselines.hgsfunctionshgs_multiroot()anditerative_hgs_cvrp()are deprecated;hgs_cvrp()replaces them with no loss in functionality. Users of HGSRouter from the Network/Router API will not notice the change. - Database format updated to v3: Switched from Pony ORM (incompatible with Python 3.13+) to Peewee. Use
python -m optiwindnet.db.migrate input.v2.sqlite output.v3.sqliteto migrate existing databases.
- Obstacles are now supported in
turbinate()andpoisson_disc_filler(). as_normalized()now works also withL.- Replaced
multiprocessing.Poolwithconcurrent.futures.ThreadPoolExecutorin HGS-CVRP calls, enabling concurrent solver instances without the quirks of the multiprocessing module. This requires a new version (v0.1.1+) of dependency hybgensea. - Removed dependency
py.
- Fixed potential infinite loop in
PathFinderfor inconsistent graphs.
Drop-in replacement for v0.1.5. This release provides maily two important fixes:
- fix bugs caused by ortools v9.15.6755 released on 2026-01-12
- remove a duplicate turbine from the included location Gangkou 2
In addition, the graph attribute 'creator' of solutions produced by OWN was reverted back to using the naming convention adopted in earlier OWN versions, which includes the 'pyomo' string if the solver was called through it (e.g. 'MILP.pyomo.cplex' instead of 'MILP.cplex').
Drop-in replacement for v0.1.4.
- Added new offshore wind locations: Dogger Bank B/C, Coastal Virginia, Inch Cape, Changhua 1, Gangkou 1/2, Yunlin, Noirmoutier, Tréport, Borkum Riffgrund 3, He Dreiht.
- Experimental FiberSCIP (fscip) solver support (system call, file-based interface).
- Improved automatic
landscape_anglecalculation - Added
as_obstacle_free()method to remove location obstacles; improvedas_single_root(). .osm.pbfparsing now prioritizes tagrefovernamefor node labels.
- Fixed dangling reference in diagonals (
make_planar_embedding()) which could cause errors when checking for crossings. - Applied rounding in
_link_val()/_flow_val()for MILP Solvers CPLEX and SCIP to eliminate tiny non-zero values (error manifested as cyclic solutions). - Corrected setting of
BinL_from_windIO(). - Resolved
_hull_processor()edge case (wrong P for Yunlin). - Ensured roots are added to solution topology
Seven if disconnected. - Enforced integer values for SCIP model variables.
- Updated deprecated Shapely
buffer()argument name. - Adjusted graph attributes in MILP solvers.
- Multiple robustness improvements in tests and solver handling.
Drop-in replacement for v0.1.3.
- gplot() and svgplot() now draw links with different line thickness to represent cable type (after assign_cables() is called)
- improve number formatting inside infobox of gplot() and svgplot()
- switch SCIP modelling from Pyomo to PySCIPOpt, enabling the launching of concurrent solvers for the same problem (competitive mode)
- refactor MILP code for reducing code duplication and improving consistency between model descriptions for the different APIs
- add information on how to install missing solvers when a requested solver is not available
- bump dependency NetworkX version to 3.6 (resolves pickling issues with nx.PlanarEmbedding)
- update the documentation to reflect the changes involving solver SCIP and plotting functions
- fix the assignment of graph attributes 'creator' (all solvers) and 'runtime' (scip)
Another minor version bump to enable conda-forge recipe to work.
- improve tests coverage
- restructure tests to skip unavailable MILP solvers
- make db.modelv2 handle only schema definition
- get correct runtime for MILP solver SCIP
Minor version bump to enable conda-forge recipe to work.
- include tests in source distribution (sdist tarball)
- update docs to state Python 3.11 and 3.12 are recommended
- drop Python 3.10 support (v0.1.0 had an inconsistency due to NetworkX v3.5)
- minor syntax fix in pyproject.toml to make conda-forge package possible
- Thor Offshore Wind Farm: Added to location repository.
- Lin-Kernighan-Helsgaun Meta-Heuristics solver (Advanced API only):
- Introduced
iterative_lkh()to deal with crossings. - Switched LKH to OVRP problem type.
- Automatic prunning poor links from the available choices given to LKH.
- Introduced
- Fixed runtime reporting for solver HiGHS.
- Adapted MILP code to Pyomo API v2.
- Enforced radial topology in HGSRouter.
- Improved hull construction and shortcut creation in planar embedding.
- Handled multiple crossings by single link in iterative meta-heuristics calls.
- Reduced rogue link usage in LKH.
- Improved precision handling in
lkh_acvrp(). - Improved handling of scaling parameters and significant digits.
- Removed
**kwargsfrom key initializers. - Improved consistency across HGS and LKH meta-heurists functions.
- Cleaned up angle helper utilities.
- Increased test coverage.
- Added advanced example notebook for LKH.
- Fixed typos and improved clarity in README and notebooks.
- Updated figures and notebook outlines for better HTML rendering.
- Removed
pyyaml-includedependency. - Bumped
numbaversion and removednumpyversion cap.
- Almost a drop-in replacement for v0.0.5
- single existing API change: argument name of HGS meta-heuristics: from max_reruns to max_retries
- Introduction of Network/Router high-level API for easier on-boarding of new users
- Two new components -- WindFarmNetwork and Router -- expose most of OWN's features
- Major expansion and improvement of the documentation
- Improved the Advanced API docs
- Fully documented the Network/Router API
- Added Topfarm integration example
- Added the OptiWindNet logo
- Added automated code testing based on pytest and tests for the main components
- MILP model warm-starting is now checked for feasibility before invoking the solver (Pyomo-only)
- Silenced warnings of Pyomo-based solvers when the search times out before the gap is reached
- Other small fixes and improvements
- drop-in replacement for v0.0.4
- gplot()' options improvements:
- 'node_tag=True' plots node numbers
- 'node_tag="load"' now also plots the roots' loads
- 'tag_border=True' plots numbers of border/obstacle vertices
- gplot() and svgplot() now can plot sites without borders
- bug fixes and improvements in path-finding
- bug fixes and improvements in navigation mesh generation
- mesh generation now can handle terminals placed on border lines
- some paperdb incomplete or incorrect entries were fixed
- other small fixes and improvements
- fixed exception AttributeError on MacOS ('Process' object has no attribute 'cpu_affinity')
- added 3 more locations (Hollandse Kust Zuid, Vineyard 1, Sofia)
- enabled easy wind farm creation and import using JOSM (external program with GUI)
- many improvements in docstrings and documentation in general
- merged all features from the paper's computational experiments
- introduced a new API for MILP solvers
- introduced a multi-root capable HGS-CVRP wrapper
- several bug fixes
- project renamed to OptiWindNet and package to optiwindnet
- many more changes and bug fixes
First release.