Conversation
mwetter
left a comment
There was a problem hiding this comment.
This still has potential rounding issues.
IBPSA/BoundaryConditions/WeatherData/BaseClasses/PartialConvertTime.mo
Outdated
Show resolved
Hide resolved
|
@jelgerjansen : can you please provide a review so we have a non-LBL participant approving it. Thanks. |
jelgerjansen
left a comment
There was a problem hiding this comment.
@JayHuLBL thanks for looking into this.
I noticed that you still applied some changes (commit 10f3e56) since Michael's approved review (commit 8462d07). Why did you split the initialization event, which is now still using the integer() implementation, from the runtime events, using the numerically more robust implementation?
Additionally, can you also:
- Move the documentation (lines 23-24) to the correct part of the code (
modTimAux > pre(tNext))? - Refer to the IBPSA issue next to the Buildings issue in the review notes (for completeness)?
|
@jelgerjansen The changes done in commit # 10f3e56 is to consider case when the simulation starts from the second half of the year. For instance, if a simulation's start time is 190 days, then Thanks for other comments. I will change it accordingly. |
|
@JayHuLBL : I still don't understand why there are two different equations to assign |
|
The changes here is to address the potential issue that when the event is triggered due to the condition However, for the initial event, it is clear that it is triggered at the right time and it is safe to calculate |
| // (last time stamp of the weather file + average increment) | ||
| when (canRepeatWeatherFile and modTimAux > pre(tNext)) then | ||
| k = pre(k) + 1; | ||
| tNext = if canRepeatWeatherFile then k * lenWea else time; |
There was a problem hiding this comment.
Why is there an if-then-else needed? If we are here, then canRepeatWeatherFile must be true.
This closes #2088.