def setUpClass(cls): ds = NREL() cls.turbine = ds.get_turbine(NREL.park_id['tehachapi'], 2004, 2005) cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004, 2005) cls.pmapping = PowerMapping() cls.pdmapping = PowerDiffMapping()
def amount_of_windmills(radius, park): target = NREL.park_id[park] ds = NREL() windpark = ds.get_windpark(target, radius, 2004, 2005) target = ds.get_windmill(target, 2004, 2005) windmills = windpark.get_windmills() return len(windmills)
This examples shows a statistical overview of the power levels of a wind turbine. """ # Author: Oliver Kramer <*****@*****.**> # License: BSD 3 clause import matplotlib.pyplot as plt import numpy as np import windml.util.features from windml.datasets.nrel import NREL from windml.visualization.show_coord_topo import show_coord_topo ds = NREL() windpark = ds.get_windpark(NREL.park_id['tehachapi'], 2, 2004) X = np.array(windpark.get_powermatrix()) feat, month_power, ramps_up, ramps_down, power_freq =\ windml.util.features.compute_highlevel_features(windpark.turbines[0]) help = [ i * windml.util.features.interval_width for i in range(1, 30 / windml.util.features.interval_width + 1) ] labels = [ str(i - windml.util.features.interval_width) + "-" + str(i) for i in help ] with plt.style.context("fivethirtyeight"): figure = plt.figure(figsize=(8, 5))
# Author: Oliver Kramer <*****@*****.**> # License: BSD 3 clause from __future__ import print_function import sklearn import numpy as np import pylab as plt from sklearn import manifold, decomposition from builtins import range from windml.datasets.nrel import NREL # load data and define parameters / training and test sequences K = 30 ds = NREL() windpark = ds.get_windpark(NREL.park_id['tehachapi'], 10, 2004) X = np.array(windpark.get_powermatrix()) X_train = X[:2000] X_test = X[2000:2000 + 200 * 4] # computation of ISOMAP projection print("computation of ISOMAP projection") X_latent = manifold.Isomap(K, n_components=2).fit_transform(X_train) # computation of sequence of closest embedded patterns sequence = [] for x in X_test: win = 0 smallest = 10E100
def test_get_windpark(self): ds = NREL() windpark = ds.get_windpark(NREL.park_id['tehachapi'], 10, 2004, 2005) assert(len(windpark.mills) == 66)
def test_get_windpark(self): ds = NREL() windpark = ds.get_windpark(NREL.park_id['tehachapi'], 10, 2004, 2005) assert (len(windpark.turbines) == 66)
def setUpClass(cls): ds = NREL() cls.turbine = ds.get_turbine(NREL.park_id['tehachapi'], 2004) cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004)
def setUpClass(cls): ds = NREL() cls.windmill = ds.get_windmill(NREL.park_id['tehachapi'], 2004, 2005) cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004, 2005) cls.pmapping = PowerMapping() cls.pdmapping = PowerDiffMapping()
def setUpClass(cls): ds = NREL() cls.windmill = ds.get_windmill(NREL.park_id['tehachapi'], 2004) cls.windpark = ds.get_windpark(NREL.park_id['tehachapi'], 3, 2004)
""" Flip-Book of Wind Speed ------------------------------------------------------------------------- This example illustrates the wind speed of the turbines in the park 'tehachapi'. The figures visualize the wind situation at four different times (with a difference of 20 min). The turbines are colorized with regard to the wind strengths (from strong in red to low in blue). """ # Author: Nils A. Treiber <*****@*****.**> # License: BSD 3 clause from windml.datasets.nrel import NREL from windml.visualization.show_flip_book import show_flip_book ds = NREL() windpark = ds.get_windpark(NREL.park_id["tehachapi"], 30, 2004) show_flip_book(windpark, 4, 3460, 2)