Skip to content
Snippets Groups Projects
Commit 0ab0283c authored by Christoph von Oy's avatar Christoph von Oy
Browse files

Fixed electric vs electrical

parent 28f30360
No related branches found
No related tags found
No related merge requests found
Subproject commit bd54324c0c2234a9633dab2ea5fdb7592bcc2feb
Subproject commit 18a1cbc81bdf847a5d288cce58e4fd100ba3733c
......@@ -35,12 +35,18 @@ t_start = pd.Timestamp("2019-05-10 00:00:00")
dynamic = TrivialDynamic([60 for i in range(24 * 60 - 1)])
input_profile_dict = {
"bus_1_demand": {"type": "elec_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "elec_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {"type": "elec_demand", "file": "bus_1_recuperation.csv"},
"bus_2_recuperation": {"type": "elec_demand", "file": "bus_2_recuperation.csv"},
"bus_1_connected": {"type": "elec_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "elec_demand", "file": "bus_2_connected.csv"},
"bus_1_demand": {"type": "electricity_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "electricity_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {
"type": "electricity_demand",
"file": "bus_1_recuperation.csv",
},
"bus_2_recuperation": {
"type": "electricity_demand",
"file": "bus_2_recuperation.csv",
},
"bus_1_connected": {"type": "electricity_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "electricity_demand", "file": "bus_2_connected.csv"},
}
input_profiles = process_input_profiles(input_profile_dict, t_start, dynamic)
......
......@@ -35,12 +35,18 @@ t_start = pd.Timestamp("2019-05-10 00:00:00")
dynamic = TrivialDynamic([60 for i in range(24 * 60 - 1)])
input_profile_dict = {
"bus_1_demand": {"type": "elec_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "elec_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {"type": "elec_demand", "file": "bus_1_recuperation.csv"},
"bus_2_recuperation": {"type": "elec_demand", "file": "bus_2_recuperation.csv"},
"bus_1_connected": {"type": "elec_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "elec_demand", "file": "bus_2_connected.csv"},
"bus_1_demand": {"type": "electricity_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "electricity_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {
"type": "electricity_demand",
"file": "bus_1_recuperation.csv",
},
"bus_2_recuperation": {
"type": "electricity_demand",
"file": "bus_2_recuperation.csv",
},
"bus_1_connected": {"type": "electricity_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "electricity_demand", "file": "bus_2_connected.csv"},
}
input_profiles = process_input_profiles(input_profile_dict, t_start, dynamic)
......
......@@ -35,12 +35,18 @@ t_start = pd.Timestamp("2019-05-10 00:00:00")
dynamic = TrivialDynamic([60 for i in range(24 * 60 - 1)])
input_profile_dict = {
"bus_1_demand": {"type": "elec_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "elec_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {"type": "elec_demand", "file": "bus_1_recuperation.csv"},
"bus_2_recuperation": {"type": "elec_demand", "file": "bus_2_recuperation.csv"},
"bus_1_connected": {"type": "elec_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "elec_demand", "file": "bus_2_connected.csv"},
"bus_1_demand": {"type": "electricity_demand", "file": "bus_1_demand.csv"},
"bus_2_demand": {"type": "electricity_demand", "file": "bus_2_demand.csv"},
"bus_1_recuperation": {
"type": "electricity_demand",
"file": "bus_1_recuperation.csv",
},
"bus_2_recuperation": {
"type": "electricity_demand",
"file": "bus_2_recuperation.csv",
},
"bus_1_connected": {"type": "electricity_demand", "file": "bus_1_connected.csv"},
"bus_2_connected": {"type": "electricity_demand", "file": "bus_2_connected.csv"},
}
input_profiles = process_input_profiles(input_profile_dict, t_start, dynamic)
......
......@@ -37,7 +37,10 @@ dynamic = TrivialDynamic([3600 for i in range(240)])
input_profile_dict = {
"irradiance": {"type": "irradiance", "file": "irradiance.csv"},
"temperature": {"type": "air_temperature", "file": "temperature.csv"},
"electric_demand": {"type": "elec_demand", "generate": {"yearly_demand": 3000}},
"electricity_demand": {
"type": "electricity_demand",
"generate": {"yearly_demand": 3000},
},
}
input_profiles = process_input_profiles(input_profile_dict, t_start, dynamic)
......@@ -81,24 +84,24 @@ temperature_2 = pd.Series(
aggregated_temperature = Profile(
{0: temperature_1, 1: temperature_2}, aggregated_dynamic
)
electric_demand_1 = pd.Series(
electricity_demand_1 = pd.Series(
[
input_profiles["electric_demand"].values.loc[0:11].sum() / 12,
input_profiles["electric_demand"].values.loc[12],
input_profiles["electric_demand"].values.loc[13:23].sum() / 11,
input_profiles["electricity_demand"].values.loc[0:11].sum() / 12,
input_profiles["electricity_demand"].values.loc[12],
input_profiles["electricity_demand"].values.loc[13:23].sum() / 11,
],
index=[0, 12, 13],
)
electric_demand_2 = pd.Series(
electricity_demand_2 = pd.Series(
[
input_profiles["electric_demand"].values.loc[24:30].sum() / 7,
input_profiles["electric_demand"].values.loc[31:38].sum() / 8,
input_profiles["electric_demand"].values.loc[49:47].sum() / 9,
input_profiles["electricity_demand"].values.loc[24:30].sum() / 7,
input_profiles["electricity_demand"].values.loc[31:38].sum() / 8,
input_profiles["electricity_demand"].values.loc[49:47].sum() / 9,
],
index=[0, 7, 15],
)
aggregated_electric_demand = Profile(
{0: electric_demand_1, 1: electric_demand_2}, aggregated_dynamic
aggregated_electricity_demand = Profile(
{0: electricity_demand_1, 1: electricity_demand_2}, aggregated_dynamic
)
with open("prosumer.json") as f:
......@@ -106,7 +109,9 @@ with open("prosumer.json") as f:
prosumer_json["components"]["pv"]["irradiance"] = aggregated_irradiance
prosumer_json["components"]["pv"]["temperature"] = aggregated_temperature
prosumer_json["components"]["consumption"]["consumption"] = aggregated_electric_demand
prosumer_json["components"]["consumption"][
"consumption"
] = aggregated_electricity_demand
prosumer = Prosumer("my_prosumer", prosumer_json, aggregated_dynamic)
......
......@@ -24,12 +24,12 @@
"min_capacity": 10.0,
"max_capacity": 10.0
},
"electric_grid": {
"electrical_grid": {
"type": "ElectricalGrid",
"price": 0.3046,
"injection_price": 0.0793
},
"electric_consumption": {
"electrical_consumption": {
"type": "ElectricalConsumption"
},
"heat_pump": {
......@@ -79,13 +79,13 @@
{
"from": "inverter_pv",
"output": 1,
"to": "electric_grid",
"to": "electrical_grid",
"input": 1
},
{
"from": "inverter_pv",
"output": 1,
"to": "electric_consumption",
"to": "electrical_consumption",
"input": 1
},
{
......@@ -109,13 +109,13 @@
{
"from": "inverter_battery",
"output": 2,
"to": "electric_grid",
"to": "electrical_grid",
"input": 1
},
{
"from": "inverter_battery",
"output": 2,
"to": "electric_consumption",
"to": "electrical_consumption",
"input": 1
},
{
......@@ -125,19 +125,19 @@
"input": 1
},
{
"from": "electric_grid",
"from": "electrical_grid",
"output": 1,
"to": "inverter_battery",
"input": 2
},
{
"from": "electric_grid",
"from": "electrical_grid",
"output": 1,
"to": "electric_consumption",
"to": "electrical_consumption",
"input": 1
},
{
"from": "electric_grid",
"from": "electrical_grid",
"output": 1,
"to": "heat_pump",
"input": 1
......
......@@ -37,7 +37,10 @@ dynamic = TrivialDynamic([3600 for i in range(24)])
input_profile_dict = {
"irradiance": {"type": "irradiance", "file": "irradiance.csv"},
"temperature": {"type": "air_temperature", "file": "temperature.csv"},
"electric_demand": {"type": "elec_demand", "generate": {"yearly_demand": 3000}},
"electricity_demand": {
"type": "electricity_demand",
"generate": {"yearly_demand": 3000},
},
"heat_demand": {
"type": "therm_demand",
"generate": {"yearly_demand": 6000, "temperature": "temperature"},
......@@ -55,8 +58,8 @@ with open("prosumer.json") as f:
prosumer_json["components"]["pv"]["irradiance"] = input_profiles["irradiance"]
prosumer_json["components"]["pv"]["temperature"] = input_profiles["temperature"]
prosumer_json["components"]["electric_consumption"]["consumption"] = input_profiles[
"electric_demand"
prosumer_json["components"]["electrical_consumption"]["consumption"] = input_profiles[
"electricity_demand"
]
prosumer_json["components"]["heat_pump"]["temperature"] = input_profiles["temperature"]
prosumer_json["components"]["heat_consumption"]["consumption"] = input_profiles[
......
......@@ -38,7 +38,10 @@ dynamic = TrivialDynamic([3600 for i in range(24)])
input_profile_dict = {
"irradiance": {"type": "irradiance", "file": "irradiance.csv"},
"temperature": {"type": "air_temperature", "file": "temperature.csv"},
"electric_demand": {"type": "elec_demand", "generate": {"yearly_demand": 3000}},
"electricity_demand": {
"type": "electricity_demand",
"generate": {"yearly_demand": 3000},
},
"electricity_price": {"type": "electricity_price", "file": "electricity_price.csv"},
}
......@@ -57,7 +60,7 @@ for prosumer_name, prosumer_path in prosumer_paths.items():
prosumer_json["components"]["pv"]["irradiance"] = input_profiles["irradiance"]
prosumer_json["components"]["pv"]["temperature"] = input_profiles["temperature"]
prosumer_json["components"]["consumption"]["consumption"] = input_profiles[
"electric_demand"
"electricity_demand"
]
prosumers[prosumer_name] = Prosumer(prosumer_name, prosumer_json, dynamic)
......
......@@ -37,7 +37,10 @@ dynamic = TrivialDynamic([3600 for i in range(24)])
input_profile_dict = {
"irradiance": {"type": "irradiance", "file": "irradiance.csv"},
"temperature": {"type": "air_temperature", "file": "temperature.csv"},
"electric_demand": {"type": "elec_demand", "generate": {"yearly_demand": 3000}},
"electricity_demand": {
"type": "electricity_demand",
"generate": {"yearly_demand": 3000},
},
}
input_profiles = process_input_profiles(input_profile_dict, t_start, dynamic)
......@@ -48,7 +51,7 @@ with open("prosumer.json") as f:
prosumer_json["components"]["pv"]["irradiance"] = input_profiles["irradiance"]
prosumer_json["components"]["pv"]["temperature"] = input_profiles["temperature"]
prosumer_json["components"]["consumption"]["consumption"] = input_profiles[
"electric_demand"
"electricity_demand"
]
prosumer = Prosumer("my_prosumer", prosumer_json, dynamic)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment