Skip to content

Commit

Permalink
Merge pull request #80 from thegridelectric/dev
Browse files Browse the repository at this point in the history
Add weather method for hack that uses previous year
  • Loading branch information
jessicamillar authored May 16, 2023
2 parents 7e4cc0b + 14faea7 commit 892a4da
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 1,066 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gridworks-atn"
version = "0.3.5"
version = "0.3.6"
description = "Gridworks Atn Spaceheat"
authors = ["Jessica Millar <jmillar@gridworks-consulting.com>"]
license = "None"
Expand Down
18 changes: 12 additions & 6 deletions src/gwatn/brick_storage_heater/dev_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@
from gwatn.types import AtnParamsReport_Maker
from gwatn.types import FloParamsBrickstorageheater as FloParams
from gwatn.types import MarketSlot
from gwatn.types.csv_distp_sync import CsvDistpSync_Maker
from gwatn.types.csv_eprt_sync import CsvEprtSync_Maker
from gwatn.types.csv_weather_forecast_sync import CsvWeatherForecastSync_Maker
from gwatn.types.ps_distprices_gnode.csv_distp_sync.csv_distp_sync_1_0_0 import (
Csv_Distp_Sync_1_0_0,
)
from gwatn.types.ps_electricityprices_gnode.csv_eprt_sync.csv_eprt_sync_1_0_0 import (
Csv_Eprt_Sync_1_0_0,
)
from gwatn.types.ws_forecast_gnode.csv_weather_forecast_sync.csv_weather_forecast_sync_1_0_0 import (
Csv_Weather_Forecast_Sync_1_0_0,
)


LOG_FORMAT = (
Expand Down Expand Up @@ -138,7 +144,7 @@ def get_flo_params(
raise Exception(f"No heat use data for {pendulum.from_timestamp(fail_t)}!")
power_required_list.append(power_required)

ep = CsvEprtSync_Maker(elec_price_file=ELEC_PRICE_FILE).tuple
ep = Csv_Eprt_Sync_1_0_0(ELEC_PRICE_FILE).payload
ep_start = pendulum.datetime(
year=ep.StartYearUtc,
month=ep.StartMonthUtc,
Expand All @@ -149,7 +155,7 @@ def get_flo_params(
start_idx = int((start_s - ep_start) / 3600)
elec_price_list: List[float] = ep.Prices[start_idx : start_idx + slices]

dp = CsvDistpSync_Maker(dist_price_file=DIST_PRICE_FILE).tuple
dp = Csv_Distp_Sync_1_0_0(DIST_PRICE_FILE).payload
dp_start = pendulum.datetime(
year=dp.StartYearUtc,
month=dp.StartMonthUtc,
Expand All @@ -160,7 +166,7 @@ def get_flo_params(
start_idx = int((start_s - dp_start) / 3600)
dist_price_list: List[float] = dp.Prices[start_idx : start_idx + slices]

tp = CsvWeatherForecastSync_Maker(weather_csv=WEATHER_PRICE_FILE).tuple
tp = Csv_Weather_Forecast_Sync_1_0_0(WEATHER_PRICE_FILE).payload
tp_start = pendulum.datetime(
year=tp.StartYearUtc,
month=tp.StartMonthUtc,
Expand Down
12 changes: 0 additions & 12 deletions src/gwatn/brick_storage_heater/make_dev_input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,8 @@
from gwatn.types import AtnParamsBrickstorageheater as AtnParams
from gwatn.types import AtnParamsBrickstorageheater_Maker as AtnParams_Maker
from gwatn.types import AtnParamsReport_Maker
from gwatn.types.csv_distp_sync import CsvDistpSync_Maker
from gwatn.types.csv_eprt_sync import CsvEprtSync_Maker
from gwatn.types.csv_weather_forecast_sync import CsvWeatherForecastSync_Maker


eprt_csv = "input_data/elec_price_data.csv"
ep = CsvEprtSync_Maker(elec_price_file=eprt_csv).tuple

distp_csv = "input_data/dist_price_data.csv"
dp = CsvDistpSync_Maker(dist_price_file=distp_csv).tuple

temp_csv = "input_data/temperature_data.csv"
temp = CsvWeatherForecastSync_Maker(weather_csv=temp_csv).tuple

params_file = "src/gwatn/brick_storage_heater/dev_atn_params_data.csv"
params = []
with open(params_file) as csv_file:
Expand Down
1 change: 1 addition & 0 deletions src/gwatn/enums/hack_weather_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ class WeatherMethod(enum.Enum):
NOAA_LCD_HSC_BETA = "noaa.lcd.hsc.beta"
SINGLEYEAR_NOAA_LCD_BASICTEMPGRAB = "singleyear.noaa.lcd.basictempgrab"
NOAA_LCD_HSC_ALPHA = "noaa.lcd.hsc.alpha"
PREV_YEAR_HACK = "prev.year.hack"
276 changes: 0 additions & 276 deletions src/gwatn/types/csv_distp_sync.py

This file was deleted.

Loading

0 comments on commit 892a4da

Please sign in to comment.