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

avoid integer overflow in StopTime for borehole model #1163

Closed
mwetter opened this issue Jun 24, 2019 · 2 comments · Fixed by #1164
Closed

avoid integer overflow in StopTime for borehole model #1163

mwetter opened this issue Jun 24, 2019 · 2 comments · Fixed by #1164
Assignees

Comments

@mwetter
Copy link
Contributor

mwetter commented Jun 24, 2019

This issue is to change:

IBPSA/Fluid/Geothermal/Borefields/Validation/ConstantHeatInjection_100Boreholes.mo
...
-  annotation (experiment(Tolerance=1e-6, StopTime=31536000000),
+  annotation (experiment(Tolerance=1e-6, StopTime=31536.0E+06),

as the first notation causes an integer overflow in the CI testing for JModelica. (The maximum value for an integer is 2147483647.)

@MassimoCimmino
Copy link
Contributor

MassimoCimmino commented Jun 24, 2019

@mwetter I was not aware of this. Should the unit test page on the wiki be updated to specify that StartTime and StopTime be given as float regardless of their values (or if non-zero) to avoid errors in the future?

@mwetter
Copy link
Contributor Author

mwetter commented Jun 25, 2019

@MassimoCimmino : I will update BuildingsPy to catch overflow if specified as an integer. This is more robust than trusting that users follow the coding guideline.

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

Successfully merging a pull request may close this issue.

2 participants