NREL / buildstock-query

BuildStockQuery is a python library for querying datasets generated by ResStock™ and ComStock™.
https://nrel.github.io/buildstock-query/
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

TOU bill calculation #22

Closed rajeee closed 1 year ago

rajeee commented 1 year ago

Resolves #12

Pull Request Description

Add ability to calculate utility bills using TOU rate schedule. Comes with advanced functionality in buildstock_query to be able to create mapped column.

yingli-NREL commented 1 year ago

When testing the following query, get an error for TOO_MANY_ARGUMENT: Too many arguments for array constructor df = my_run.utility.calculate_tou_bill( rate_map=("weekday_cost.csv", "weekend_cost.csv"), group_by=["geometry_building_type_recs"], restrict=[(my_run.ts_bldgid_column, (1, 2, 3))], collapse_ts=False, )

yingli-NREL commented 1 year ago

Tested the TOU bill calculation for 1990 building samples. Works well to get bills in the timestep of hour, day, month, year. The advanced functionality to create mapped column also works well.