Closed AntoineGautier closed 2 months ago
9bb0c29
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SmallOffice
This is due to the following sequence within Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.OperationMode
.
The following plot compares the variables that cause the differences between the master branch //1
and the feature branch //2
for Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SmallOffice.Guideline36Winter
.
We can verify that the feature branch yields the expected results.
[EDIT] Not really: see https://github.com/lbl-srg/modelica-buildings/pull/3967#issuecomment-2311927171
Buildings.Air.Systems.SingleZone.VAV.Examples.OptimalStart
This is due to the following sequence within Buildings.Controls.OBC.Utilities.BaseClasses.OptimalStartCalculation
.
The following plot compares the variables that cause the differences between the master branch //1
and the feature branch //2
for Buildings.Air.Systems.SingleZone.VAV.Examples.OptimalStart.ConventionalSpring
.
We can verify that the feature branch yields the expected results.
[EDIT] Not really: see https://github.com/lbl-srg/modelica-buildings/pull/3967#issuecomment-2311927171
Buildings.Obsolete.Air.Systems.SingleZone.VAV.Examples.OptimalStart
Same as above.
Results are updated in 72c45d30b0266cc2cffef788c1f9f73eb4d2ba1b.
There is still an issue with the implementation in 72c45d3 that is visible in the plots for Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SmallOffice.Guideline36Winter
in https://github.com/lbl-srg/modelica-buildings/pull/3967#issuecomment-2310093495.
The condition time >= pre(entryTimeFalse) + falseHoldDuration and time >= pre(entryTimeTrue) + trueHoldDuration
does not fire the when clause as expected based on https://specification.modelica.org/maint/3.6/equations.html#when-equations:
The equations within a when-equation are activated only at the instant when the scalar expression or any of the elements of the vector expression becomes true.
This seems related to the CVODE solver and Dymola (OCT with CVODE yields the expected results). The plot below compares the trajectories of the same variables between DASSL (diagram 1) and CVODE (diagram 2).
As a workaround for CVODE, the vector expression is split into two separate elsewhen clauses in e793841, which yields the following results with CVODE.
A ticket has been open at DS #SR01251824.
@JayHuLBL This is ready for your review. (Another PR more complicated than anticipated: 2 tickets open at DS, 1 at Modelon)
@mwetter This is ready to merge.
Thanks, that was indeed a hard one...
This addresses #3966.