Skip to main content

TopFarm Logo

pipeline status coverage report DOI PyPi License Binder

TOPFARM

TOPFARM is a plant-level wind farm optimization framework developed by DTU Wind and Energy Systems. It is built on top of OpenMDAO and integrates with PyWake for aerodynamic wake modelling and OptiWindNet for electrical cable network optimisation.

Features

  • Layout optimization - optimize turbine x/y positions subject to boundary and spacing constraints
  • Type optimization - select turbine types to maximize AEP or economic objectives
  • Hub height optimization - jointly optimize layout and hub heights
  • Nested optimization - chain multiple optimization problems
  • Smart Start - data-driven initialization to avoid poor local optima
  • Multiple drivers - gradient-based (SLSQP, IPOPT), genetic algorithms, stochastic gradient descent
  • Recorders - save and replay full optimization trajectories

Quick Start

import numpy as np
from topfarm import TopFarmProblem
from topfarm.cost_models.cost_model_wrappers import CostModelComponent
from topfarm.easy_drivers import EasyScipyOptimizeDriver
from topfarm.constraint_components.spacing import SpacingConstraint
from topfarm.constraint_components.boundary import XYBoundaryConstraint

n_wt = 4
boundary = [(0, 0), (1000, 0), (1000, 1000), (0, 1000)]

def aep_func(x, y, **kwargs):
    # Replace with a wake model, e.g. PyWake.
    return 4e6 - np.sum((x - 500)**2 + (y - 500)**2)

problem = TopFarmProblem(
    design_vars={'x': (np.zeros(n_wt), 0, 1000), 'y': (np.zeros(n_wt), 0, 1000)},
    cost_comp=CostModelComponent(['x', 'y'], n_wt, aep_func, maximize=True),
    constraints=[SpacingConstraint(200), XYBoundaryConstraint(boundary)],
    driver=EasyScipyOptimizeDriver(),
)
cost, state, recorder = problem.optimize()

Installation

pip install topfarm

For the latest development version:

pip install git+https://gitlab.windenergy.dtu.dk/TOPFARM/TopFarm2.git

See the Installation Guide for Conda environments, developer setup, and troubleshooting.

Documentation

Full documentation, notebooks, and examples are at: https://topfarm.pages.windenergy.dtu.dk/TopFarm2

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.

Citation

If you use TOPFARM in your research, please cite:

Rethore, P.-E. et al. TOPFARM: Multi-fidelity Optimization of Wind Farms. Zenodo. https://doi.org/10.5281/zenodo.3247031

Metadata

Release files for topfarm 2.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for topfarm 2.7.0
File Size Uploaded Provenance Actions
topfarm-2.7.0.tar.gz 10.3 MB Without provenance Details for topfarm-2.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for topfarm 2.7.0
File Interpreter ABI Platform Actions
topfarm-2.7.0-py3-none-any.whl Python 3 none any Details for topfarm-2.7.0-py3-none-any.whl

Total release size: 20.0 MB

Release files / topfarm-2.7.0.tar.gz

Download URL topfarm-2.7.0.tar.gz
Size 10.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d8aca090ab996cca063cd2947c79478f7962ff751228d3b3ac0f60f502ea1765
BLAKE2b-256 checksum
How to use checksums
2e4f97da881be7ca7251308126330ddee35cb1a0e765cd45a2a062b21802fbd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

Release files / topfarm-2.7.0-py3-none-any.whl

Download URL topfarm-2.7.0-py3-none-any.whl
Size 9.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
de60e3395b962e87a956235bf5d29398e2b7f240b9e42747c492725eb7ec231a
BLAKE2b-256 checksum
How to use checksums
ad522105109cb4ab5f08a6628eb7084d524277f0d26f4a84a28693cf21e0d274
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

Security for topfarm 2.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.7.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page