This commit is contained in:
chenxiaodong 2024-06-19 15:32:04 +08:00
parent 53d3ac9ca8
commit 035d5fd534
2 changed files with 3 additions and 13 deletions

View File

@ -5,15 +5,12 @@ class Constant:
class DataManager:
def __init__(self) -> None:
self.Pv = []
self.Prices = []
self.Load_Consumption = []
self.Temperature = []
self.Irradiance = []
self.Wind = []
def add_pv_element(self, element): self.Pv.append(element)
def add_price_element(self, element): self.Prices.append(element)
def add_load_element(self, element): self.Load_Consumption.append(element)
@ -25,9 +22,6 @@ class DataManager:
def add_wind_element(self, element): self.Wind.append(element)
# get current time data based on given month day, and day_time
def get_pv_data(self, month, day, day_time):
return self.Pv[(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24 + day_time]
def get_price_data(self, month, day, day_time):
return self.Prices[(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24 + day_time]
@ -44,10 +38,6 @@ class DataManager:
return self.Wind[(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24 + day_time]
# get series data for one episode
def get_series_pv_data(self, month, day):
return self.Pv[(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24:
(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24 + 24]
def get_series_price_data(self, month, day):
return self.Prices[(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24:
(sum(Constant.MONTHS_LEN[:month - 1]) + day - 1) * 24 + 24]

View File

@ -35,15 +35,15 @@ battery_parameters = {
}
dg_parameters = {
'gen_1': {'a': 0.0034, 'b': 3, 'c': 30, 'd': 0.03, 'e': 4.2, 'f': 0.031,
'gen_1': {'a': 0.0034, 'b': 3, 'c': 30,
'power_output_max': 150, 'power_output_min': 10,
'ramping_up': 100, 'ramping_down': 100, 'min_up': 2, 'min_down': 1},
'gen_2': {'a': 0.001, 'b': 10, 'c': 40, 'd': 0.03, 'e': 4.2, 'f': 0.031,
'gen_2': {'a': 0.001, 'b': 10, 'c': 40,
'power_output_max': 375, 'power_output_min': 50,
'ramping_up': 100, 'ramping_down': 100, 'min_up': 2, 'min_down': 1},
'gen_3': {'a': 0.001, 'b': 15, 'c': 70, 'd': 0.03, 'e': 4.2, 'f': 0.031,
'gen_3': {'a': 0.001, 'b': 15, 'c': 70,
'power_output_max': 500, 'power_output_min': 100,
'ramping_up': 200, 'ramping_down': 200, 'min_up': 2, 'min_down': 1}
}