diff --git a/config.json b/config.json index cdedf6a..8860435 100644 --- a/config.json +++ b/config.json @@ -43,5 +43,11 @@ "cost": "Costs of Microgrid system [m-EUR]", "benefit": "Financial Profit Based on Py & Ess Configuration (k-EUR / year)", "roi": "ROI" + }, + "data_path": { + "pv_yield": "read_data/Serbia.csv", + "demand": "read_data/factory_power1.csv", + "sell": "read_data/electricity_price_data_sell.csv", + "buy": "read_data/electricity_price_data.csv" } } \ No newline at end of file diff --git a/main.exe b/main.exe deleted file mode 100644 index 9e8581c..0000000 Binary files a/main.exe and /dev/null differ diff --git a/read_data.py b/read_data.py index bbd4f20..cec7650 100644 --- a/read_data.py +++ b/read_data.py @@ -1,17 +1,25 @@ import pandas as pd import numpy as np import csv +import json -pv_yield_file_name = 'read_data/Serbia.csv' +with open('config.json', 'r') as f: + js_data = json.load(f) + +pv_yield_file_name = js_data["data_path"]["pv_yield"] +print(pv_yield_file_name) # factory_demand_file_name = 'factory_power1.xlsx' -factory_demand_file_name = 'read_data/factory_power1.csv' -electricity_price_data = 'read_data/electricity_price_data.csv' -electricity_price_data_sell = 'read_data/electricity_price_data_sell.csv' +factory_demand_file_name = js_data["data_path"]["demand"] +print(factory_demand_file_name) +electricity_price_data = js_data["data_path"]["buy"] +print(electricity_price_data) +electricity_price_data_sell = js_data["data_path"]["sell"] +print(electricity_price_data_sell) pv_df = pd.read_csv(pv_yield_file_name, index_col='Time', usecols=['Time', 'PV yield[kW/kWp]']) pv_df.index = pd.to_datetime(pv_df.index) -df_power = pd.read_csv('factory_power1.csv', index_col='Time', usecols=['Time', 'FactoryPower']) +df_power = pd.read_csv(factory_demand_file_name, index_col='Time', usecols=['Time', 'FactoryPower']) df_power.index = pd.to_datetime(df_power.index) df_combined = pv_df.join(df_power)