Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support msgPack format #338

Open
rajeee opened this issue Jan 4, 2023 · 4 comments
Open

Support msgPack format #338

rajeee opened this issue Jan 4, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@rajeee
Copy link
Contributor

rajeee commented Jan 4, 2023

Is your feature request related to a problem? Please describe.
ResStock supports a variety of output format for timeseries and annual results. Currently, BSB assumes that the timeseries results will be in csv format and annual results will be in json. However, for increased precision, msgPack format is better suited - especially to avoid rounding errors in timeseries file.

Describe the solution you'd like
The solution I am seeking is for BSB to be able to deal with msgPack output files in addition to standard csv/json files.

Describe alternatives you've considered
This could be somewhat fixed by increasing the number of decimals used in the results_timeseries.csv file, but an even better fix is to do away with csv files altogether and work in binary file format (such as msgPack) which can preserve the full precision of the EnergyPlus output.

Additional context
We have noticed up to 20% difference (for some enduses) in the annual savings calculated using the annual results vs calculated using the timeseries. The root cause of this issue was the 3 decimal places rounding we were doing for the results_timeseries.csv file causing a systematic error - especially for idle energy consumption periods. This error % is magnified when doing savings calculation.

@rajeee rajeee added the enhancement New feature or request label Jan 4, 2023
@nmerket
Copy link
Member

nmerket commented Jun 28, 2023

We will want to maintain backwards compatibility to read the existing csv files for older versions of ResStock and ComStock. So the logic would be:

  1. Look for msgpack file and read it.
  2. If not msgpack, look for csv and read it (as is currently done).

@shorowit
Copy link
Contributor

shorowit commented Jun 28, 2023

Currently, BSB assumes that the timeseries results will be in csv format and annual results will be in json.

It probably doesn't matter, but that doesn't sound right. The requested output format (csv, json, msgpack) in ReportSimulationOutput currently applies to both annual and timeseries outputs.

@rajeee
Copy link
Contributor Author

rajeee commented Jun 28, 2023

Currently, BSB assumes that the timeseries results will be in csv format and annual results will be in json.

It probably doesn't matter, but that doesn't sound right. The requested output format (csv, json, msgpack) in ReportSimulationOutput currently applies to both annual and timeseries outputs.

BSB currently reads the data_point_out.json file for the annual results and I thought that was the only source for annual result. Looks like there is now also the results_annual.csv file - I wasn't aware of.

So, I guess, the results_annual.csv is impacted by the output_format and data_point_out.json will always exist as a json? @shorowit

@shorowit
Copy link
Contributor

Ah, I forgot about data_point_out.json. Yes, that sounds right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants