-
Notifications
You must be signed in to change notification settings - Fork 83
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
change radiation of weather data to exactly zero rather than 1E-4 #1340
Comments
This refactoring should also replace code such as assert(TOut > TMin, "In " + getInstanceName() +
": Weather data dry bulb temperature out of bounds.\n" + " TOut = " + String(TOut)); to add |
Is that necessarily a bad thing? |
In my view there is no need to have the FMU generate a zero crossing function and the solver having to monitor it to see if an event happened. (And for QSS there will be an overhead because it approximates these to predict when an event happens.) |
Correct me if I'm wrong: Conclusion: I indeed see no point in doing event tracking for this particular assert, or even in general for our asserts. But there could be a use case, so it wouldn't make sense to disable event generation for asserts all-together in Optimica. This could however still be an optional feature request for Optimica. It should not take more than an hour of work to implement this (excluding the work on the CI-side). |
@Mathadon zero crossing functions are used not only to determine when exactly an event happened, but also whether an event happens. This is the information that a solver has. I found the FMI specification quite useful to understand how zero crossing functions are used. I think best is to decide on a case by case basis whether an event is useful. For checking for extreme (out of range) temperatures, I think there is no use as other parts of the model typically still keep computing. If this assertion comes a bit late, that is fine in my view. |
This refactoring also corrects the name of the weather data bus variable |
All tests of this refactored weather data reader work in IBPSA and Buildings, and the computing time did not change much, see attached zip file. |
this looks ok |
The weather data reader always produces slightly positive radiation values. Looking at
WeatherData.Examples.ReaderTMY3
, one can see that if the radiation is set to 0, thenHDirNor
,HGloHor
andHDifHor
are 0.0001 W/m2. We set them to a slightly positive value because time interpolation of weather data can lead to slightly negative values, and thesmoothMax
was used to avoid events. In the meantime, MSL ensures thatmax
does not generate events. This issue is to test if we could set these values to exactly 0 and avoid using thesmoothMax
here.This will need to be tested on larger models, e.g., as part of the Buildings library.
The reason is that non-zero values do not allow achieving steady-state in a building model, which a user tried to accomplish as part of controls design.
The text was updated successfully, but these errors were encountered: