# ----- build loadshape object ----- # my_load_shape = Loadshape(load_data=LOAD_DATA, temp_data=TEMP_DATA, timezone='America/Los_Angeles', temp_units="F", sq_ft=BUILDING_SQ_FT) # ----- add exclusions as necessary ----- # my_load_shape.add_exclusion("2013-09-23 00:00:00", "2013-09-24 00:00:00") my_load_shape.add_exclusion("2013-09-27 00:00:00", "2013-09-28 00:00:00") my_load_shape.add_named_exclusion("US_HOLIDAYS") # ----- add tariff to enable cost calculations ----- # tariff = Tariff(tariff_file=TARIFF, timezone='America/Los_Angeles') tariff.add_dr_period("2013-09-23 14:00:00", "2013-09-23 16:00:00") tariff.add_dr_period("2013-09-27 14:00:00", "2013-09-27 16:15:00") my_load_shape.set_tariff(tariff) # ----- build the baseline to use as a reference for performance ----- # event_baseline = my_load_shape.baseline(weighting_days=14, modeling_interval=900, step_size=900) # ----- calculate the performance summary for the event period ----- # event_performance = my_load_shape.event_performance(DR_EVENT_START, DR_EVENT_END) # ----- calculate the performance summary for the whole day ----- # event_day_performance = my_load_shape.event_performance(DR_EVENT_DAY_START, DR_EVENT_DAY_END) out = { "power_data": {} } out["name"] = "DR Event - %s" % DR_EVENT_DAY_START out["building"] = BUILDING_NAME