# '2030Gelderland_laag': {'id': 815716, 'latlon': (52, 6)},
    '2030RES_Achterhoek': {'id': 815753, 'latlon': (52, 6.4)},
    # '2030RES_ArnhemNijmegen': {'id': 815754, 'latlon': (51.9, 5.9)},
    # '2030RES_Cleantech': {'id': 815755, 'latlon': (52.2, 6.1)},
    # '2030RES_Foodvalley ': {'id': 815756, 'latlon': (52.1, 5.7)},
    # '2030RES_NoordVeluwe': {'id': 815757, 'latlon': (52.4, 5.8)},
    # '2030RES_Rivierenland': {'id': 815758, 'latlon': (51.9, 5.3)},
} 

for modelname, value in scenarios_gelderland.items():
    
    scenario_id = value['id']
    lat, lon = value['latlon']

    # ==========System-setup=======================================================
    system = System(lat, lon, model_name=modelname)
    # =============================================================================
    pva1 =              PhotoVoltaic('PV Full south', dof = True)
    wind1 =             Wind('Onshore turbine', lat=lat, lon=lon, dof = True)
    bat1 =              Lithium('Li-ion EES', dof = True)
    h2 =                Hydrogen('H2 storage', dof = True)
    demand =            ETMdemand('NoordVeluwe2030', scenario_id=scenario_id)
    grid =              Grid('Grid connection', variable_income=2.5e-6)
    deficit =           FinalBalance()
    # =============================================================================

    # Limit grid component capacity as function of maximum demand
    demand.calculate_time_serie()
    peak_demand = -demand.state.power.min()

    grid.installed = 1/3 * peak_demand
import pandas as pd
from LESO import System
from LESO import PhotoVoltaic, Wind
import seaborn as sns
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import tsam.timeseriesaggregation as tsam
import numpy as np
from scipy.stats import kde
from durationcurves import kotzur_normalize
from scipy.signal import savgol_filter
import LESO.plotly_extension as pe

modelname = "ETM Noord-Veluwe trial 1"
lat, lon = 52.4, 5.8
system = System(lat, lon, model_name=modelname)
wind = Wind("Onshore turbine", lat=lat, lon=lon, installed=1, use_dowa=False)
pv = PhotoVoltaic("PV Full south", installed=1)

system.add_components([wind, pv])
system.fetch_input_data()
system.calculate_time_series()

source = "PVGIS-SARAH ERA-Interim 2005-2016 TMY"
#%% aggregation
raw = pd.DataFrame([wind.state.power, pv.state.power], index=["Wind", "PV"]).transpose()

aggregation = tsam.TimeSeriesAggregation(
    raw,
    noTypicalPeriods=8,
    hoursPerPeriod=24,
Esempio n. 3
0
price_filepath = os.path.join(os.path.dirname(__file__), price_filename)
retail_prices = pd.read_pickle(price_filepath)
if correct_SDE:
    profile_factor = 0.65  # CE Delft, pag 22-  Scenario’s zon op grote daken
    basis_price = 55  # Arbitrary
    correction_price = lambda retail_prices, profile_factor: retail_prices.mean(
    ) * profile_factor
    SDE_price = basis_price - correction_price(retail_prices, profile_factor)

retail_prices[retail_prices < SDE_price] = SDE_price
retail_prices = list(
    (retail_prices / 1e6).values)  # convert from eu/MWh to M eu/MWh

# initiate System component
system = System(lat=lat,
                lon=lon,
                model_name=modelname,
                equity_share=equity_share)

#%%
grid = Grid("Grid connection",
            installed=10,
            variable_cost=999e-6,
            variable_income=retail_prices)
wind = Wind(
    "Nordex N100 2500",
    dof=False,
    installed=10,
    turbine_type="Nordex N100 2500",  # actually Lagerwey L100 2.5 MW, best match
    hub_height=100,
    use_ninja=True,
)
Esempio n. 4
0
# example_EVhub_optimization.py


#%% Import relevant packages
from LESO import System
from LESO import PhotoVoltaic, Wind, Lithium, FastCharger, Consumer, Grid, FinalBalance
import os

#%% Define system and components
modelname = "VREEVHUB_Utrecht_plain"
lat, lon = 52.09, 5.15 # Utrecht
target_dir = "G:\\My Drive\\0 Thesis\\LESO results\\examples"

# initiate System component
system = System(latitude=lat, longitude=lon, model_name=modelname)

# initiate and define components
pv_s = PhotoVoltaic("PV Full south", dof=True)
pv_w = PhotoVoltaic("PV West", azimuth=90, dof=True, capex=0.55) # slightly cheaper (lower land use, straight-forward construction)
pv_e = PhotoVoltaic("PV East", azimuth=-90, dof=True, capex=0.55) # slightly cheaper (lower land use, straight-forward construction)
wind = Wind("Onshore turbine", dof=True)
bat = Lithium("Li-ion EES", dof=True)
charger = FastCharger("DC quickcharger", dof=False)
petrolstation = Consumer("Petrolstation E. demand")
grid = Grid("Grid connection", installed=150e3)
final = FinalBalance(name="curtailment_underload")

#%% add the components to the system

component_list = [pv_s, pv_w, pv_e, wind, bat, charger, petrolstation, final, grid]
system.add_components(component_list)
Esempio n. 5
0
from LESO import System
from LESO import PhotoVoltaic, Wind, Lithium, Grid, FinalBalance
import os
from experiments_overview import MODEL_FOLDER
import pandas as pd
import matplotlib.pyplot as plt

#%% Define system and components
modelname = "Cablepooling"
lat, lon = 51.81, 5.84  # Nijmegen
equity_share = 0.5  # to bump the roi up to about 7.5%

# initiate System component
system = System(lat=lat,
                lon=lon,
                model_name=modelname,
                equity_share=equity_share)

# initiate and define components
pv_s = PhotoVoltaic("PV South", azimuth=180, use_ninja=True, dof=True)
pv_e = PhotoVoltaic("PV East", azimuth=90, use_ninja=True, dof=True)
pv_w = PhotoVoltaic("PV West", azimuth=270, use_ninja=True, dof=True)

#%% add the components to the system
# note that we do not add wind now!
component_list = [
    pv_s,
    pv_w,
    pv_e,
]
system.add_components(component_list)
#%%
from LESO import System
from LESO import Grid, Wind
import pandas as pd
import os

#%% read system definition from regular cable pool
modelname = "cablepool_greenfield"
system = System.read_pickle(
    os.path.join(os.path.dirname(__file__), "cablepool.pkl"))
system.name = modelname
# extract grid component
for component in system.components:
    if isinstance(component, Grid):
        grid = component
# extract wind component
for component in system.components:
    if isinstance(component, Wind):
        wind = component

#%% dynamic part
# read .pkl from dynamic_price_analysis
price_filename = "etm_dynamic_savgol_filtered_etmprice_31ch4_85co2.pkl"
mwh_prices = pd.read_pickle(
    os.path.join(os.path.dirname(__file__), price_filename))
energy_market_price = mwh_prices.values / 1e6  # convert from [eu / MWh] to [Meu / MWh]

# set the dynamic pricing to the grid component
grid.variable_income = list(energy_market_price)
# set the wind component to a DOF
wind.dof = True