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

sqlite TimestepType is backwards #7342

Closed
1 of 3 tasks
mjwitte opened this issue Jun 17, 2019 · 4 comments · Fixed by #7415
Closed
1 of 3 tasks

sqlite TimestepType is backwards #7342

mjwitte opened this issue Jun 17, 2019 · 4 comments · Fixed by #7415
Assignees

Comments

@mjwitte
Copy link
Contributor

mjwitte commented Jun 17, 2019

Issue overview

Noticed in various sqlite tables that TimestepType is backwards. Zone timestep variables are tagged as "HVAC System" and HVAC variables are tagged as "Zone".
image

SQLite::timestepTypeName is where the error is.

OutputProcessor::ValidateIndexType shows the correct mapping. 1=Zone, 2=HVAC.

Details

Some additional details for this issue (if relevant):

  • Version of EnergyPlus v9.1-f43e577
  • Noticed this while looking at sql tables in Excel using method given in this bldg-sim post

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added - any example file with sql output, e.g. RefBldgLargeOfficeNew2004_Chicago
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
jmarrec added a commit to jmarrec/EnergyPlus that referenced this issue Jul 17, 2019
@jmarrec jmarrec self-assigned this Jul 24, 2019
@jmarrec
Copy link
Contributor

jmarrec commented Jul 24, 2019

Instead of just fixing the method, I propose to use a single enum throughout energyplus to avoid this kind of mistake down the line and make it clearer as to what's happening.

This is going to involve a lot of file changes, but I'm willing to give it a shot.

jmarrec added a commit to jmarrec/EnergyPlus that referenced this issue Jul 24, 2019
@mjwitte
Copy link
Contributor Author

mjwitte commented Jul 24, 2019

Yes, that would be good to do at some point. But given where we are in the release cycle, it seems best to just fix this and plan for an enum pass through the code shortly after the next release when we have fewer open PRs.

@jmarrec
Copy link
Contributor

jmarrec commented Jul 26, 2019

@mjwitte I did see your comment, but when I was already about 70% in adding the enum... Tests results in #7415 seem pretty clean though, so hopefully this won't be too much of a hassle reviewing.
Just fixing this the "easy" way would also pose the same problems of having to modify the existing unit tests etc.

@mjwitte
Copy link
Contributor Author

mjwitte commented Jul 26, 2019

Well, we'll have to see how it looks. @Myoldmopar will make the call whether this can go forward now or wait until after release.

jmarrec added a commit to jmarrec/EnergyPlus that referenced this issue Jul 30, 2019
Myoldmopar added a commit that referenced this issue Aug 20, 2019
Fix #7342 - Change TimeStepType to be an enum rather an int and correct sql behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants