Closed rouille closed 3 years ago
STORAGE_E
) is in keys that start with StateOfCharge
, and birectional storage dispatch can be constructed using the values in DispatchGen
(for positive STORAGE_PG
) and ChargeStorage
(for negative STORAGE_PG
).Here's what I get when parsing the results file from @YifanLi86's example storage run:
>>> import pickle
>>> import re
>>> from switchwrapper.switch_to_grid import construct_grids_from_switch_results
>>> filename = "path_to_storage_results_file/results_storage.pickle"
>>> with open(filename, "rb") as f:
... results = pickle.load(f)
...
>>> sorted({re.search(r"(.*)\[", v).group(1) for v in results.solution._list[0]["Variable"]})
['BuildGen', 'BuildLocalTD', 'BuildStorageEnergy', 'BuildTx', 'ChargeStorage', 'DispatchBaseloadByPeriod', 'DispatchGen', 'DispatchTx', 'GenFuelUseRate', 'StateOfCharge', 'UnservedLoad', 'WithdrawFromCentralGrid']
Build data frames: