def __init__(self, wt=wind_turbine.wind_turbine()):
        '''

        :param wt: wind turbine object
        '''
        self.WT = wt
        print(f'The rated power of wind turbine is{wt.rated_power() * 13}')
'''
Created on: 20200915

Author: Yi Zheng, Department of Electrical Engineering, DTU

'''
from Hybrid_wind_hydrogen.class_definition import HWHS, sizing_hwhs_problem, Absolute_path
from equipment_package import wind_turbine, electrolyser, hydrogen_tank, economic
from jmetal.algorithm.multiobjective.nsgaii import NSGAII
from jmetal.operator import SBXCrossover, PolynomialMutation
from jmetal.util.termination_criterion import StoppingByEvaluations
from pathlib import Path
import pandas as pd

a = HWHS(wind_turbine.wind_turbine(r=45, height=55))

problem = sizing_hwhs_problem(hwhs=a, objective=0, linearization=True)

max_evaluations = 20000

algorithm = NSGAII(problem=problem,
                   population_size=100,
                   offspring_population_size=100,
                   mutation=PolynomialMutation(probability=1.0 /
                                               problem.number_of_variables,
                                               distribution_index=20),
                   crossover=SBXCrossover(probability=1.0,
                                          distribution_index=20),
                   termination_criterion=StoppingByEvaluations(
                       max_evaluations=max_evaluations))
示例#3
0
directory_path = Path(Path().absolute().parent)
input_data_path = r'{}/prediction_wind_solar_price_load/Historical_Data'.format(
    directory_path)

File_data = input_data_path + '/pv_wind_data_0411.csv'

Ambient_Data = pd.read_csv(File_data)
# ---------------------------------------Data preprocessing-----------------------------------------
Annual_real_rate = 0.05
OandM_cost = (54 * 2e6 * 0.02 + 26.8 * 3e6 * 0.02) / (54 + 26.8) / (365 * 24)
hourly_cost = economic.capital_recovery_factor(Annual_real_rate) * (
    54 * 2e6 + 26.8 * 3e6) / 365 / 24 / (54 + 26.8)
res_av_cost = OandM_cost + hourly_cost

# Build the wind turbines
WT_gls = [wind_turbine.wind_turbine(r=40, height=40)] * 13

# Build the photovoltaics
PV_gls = [pv.pv()] * 6

# Build the battery
Battery_gls = battery.battery_bank(soc_min=0.1)

# Build the electrolyser
Electrolyser_gls = electrolyser.electrolyser_group()

# Build the hydrogen tank
Hydrogen_tank_gls = hydrogen_tank.hydrogen_tank(
    Volume_tank=60)  # Given the fact that trailers carry 1000kg H2

# Build the load
    pass

Saving_path = Path(Path().absolute() / 'Figure' / 'Usecase1' /
                   ('usecase1' + scenario + '.csv'))

# Read data on 0411
directory_path = Path(Path().absolute().parent)
input_data_path = r'{}/prediction_wind_solar_price_load/Historical_Data'.format(
    directory_path)

File_data = input_data_path + '/pv_wind_data_0411.csv'

Ambient_Data = pd.read_csv(File_data)
# ---------------------------------------Data preprocessing-----------------------------------------
# Build the wind turbines
WT_gls = [wind_turbine.wind_turbine(r=50, height=55)] * 13

# Build the photovoltaics
PV_gls = [pv.pv()] * 6

# Build the battery
Battery_gls = battery.battery_bank(soc_min=0.1)

# Build the electrolyser
Electrolyser_gls = electrolyser.electrolyser_group()

# Build the hydrogen tank
Hydrogen_tank_gls = hydrogen_tank.hydrogen_tank(
    Volume_tank=100)  # Given the fact that trailers carry 1000kg H2

# Build the load