You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where, if a model is using one of:
IDEAS.BoundaryConditions.SimInfoManager to specify a weather file
Buildings.ThermalZones.Detailed.MixedAir with the parameter lat defined by Buildings.BoundaryConditions.WeatherData.ReaderTMY3.lat AND there is an overhang specified
Then, when compiling the model using the latest trunk of JModelica.org, the weather file is not copied into the resources directory of the resulting FMU. In this case, simulating the FMU depends on the weather file being in the location as specified in the model. While this works for the developer who compiles the FMU and runs it on the same machine, this precludes the FMU from being simulated on a different machine where the weather file is not present. This reduces the portability of such an FMU.
The issue seems to stem from the specification of the weather file location string parameter as a structural parameter by JModelica. The issue has been traced to the model IBPSA.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth (used in both Buildings and IDEAS) line 27:
final parameter Boolean outsidePolarCircle = lat < polarCircle and lat > -polarCircle
and lines 37-53:
if outsidePolarCircle then
// Outside the polar circle, the only non-differentiability is at night when the sun is set.
// Hence, we use noEvent.
if noEvent(solTim - integer(solTim/day)*day < 43200) then
solAzi =-solAziTem;
else
solAzi = solAziTem;
end if;
else
// Inside the polar circle, there is a jump at (solar-)midnight when the sun can
// be above the horizon. Hence, we do not use noEvent(...)
if solTim - integer(solTim/day)*day < 43200 then
solAzi =-solAziTem;
else
solAzi = solAziTem;
end if;
end if;
This issue looks to be fixed if the if/then clause using outsidePolarCircle is reformulated into a one-line notation. I will make a PR. Thanks to @Mathadon and @JavierArroyoBastida for helping to diagnose and find a fix that could work.
The text was updated successfully, but these errors were encountered:
There is an issue where, if a model is using one of:
IDEAS.BoundaryConditions.SimInfoManager
to specify a weather fileBuildings.ThermalZones.Detailed.MixedAir
with the parameterlat
defined byBuildings.BoundaryConditions.WeatherData.ReaderTMY3.lat
AND there is an overhang specifiedThen, when compiling the model using the latest trunk of JModelica.org, the weather file is not copied into the
resources
directory of the resulting FMU. In this case, simulating the FMU depends on the weather file being in the location as specified in the model. While this works for the developer who compiles the FMU and runs it on the same machine, this precludes the FMU from being simulated on a different machine where the weather file is not present. This reduces the portability of such an FMU.The issue seems to stem from the specification of the weather file location string parameter as a structural parameter by JModelica. The issue has been traced to the model
IBPSA.BoundaryConditions.SolarGeometry.BaseClasses.SolarAzimuth
(used in bothBuildings
andIDEAS
) line 27:and lines 37-53:
This issue looks to be fixed if the if/then clause using
outsidePolarCircle
is reformulated into a one-line notation. I will make a PR. Thanks to @Mathadon and @JavierArroyoBastida for helping to diagnose and find a fix that could work.The text was updated successfully, but these errors were encountered: