admin管理员组文章数量:1124763
I have made a model in OpenModelica v1.21.0 using Buildings library v10.0.0. I simulate this model in Python using OMPython. Here is what I try to do:
- simulate the model for Day1 using:
mod.setSimulationOptions(["startTime=0, stopTime=86400, stepSize=300, tolerance=1e-06, solver=dassl"])
simflags = "-lv=-stdout,-LOG_SUCCESS"
mod.simulate(resultfile = RESULT_FILEPATH + "day1.mat", simflags = simflag)
- change the value of some parameters in the model:
mod.setParameters("[heatSetpoint[2, 2] = 21") # heatSetpoint is parameter Real heatSetpoint[169, 2], and I change all the items in heatSetpoint
- simulate the model for Day2 giving the output file of Day1 for the initialization:
mod.setSimulationOptions(["startTime=86400, stopTime=172800, stepSize=300, tolerance=1e-06, solver=dassl"])
simflag = f"-iim=none -iif={RESULT_FILEPATH}day1.mat -iit=86400 -lv=-stdout,-LOG_SUCCESS"
mod.simulate(resultfile = RESULT_FILEPATH + "day2.mat", simflags = simflag)
This works when I use OpenModelica v1.21.0 and Buildings library v10.0.0.
Now I want to update the model to use the latest versions of OpenModelica (1.24.3) and Buildings Library (11.0.0).
After the update, the first step (simulating for Day1) works; however, when I try to run simulation for Day2 I get the following error:
LOG_ASSERT | error | [C:/Users/xxxxx/AppData/Roaming/.openmodelica/libraries/Buildings 11.0.0/BoundaryConditions/WeatherData/BaseClasses/ConvertTime.mo:22:3-26:26:writable]
| | | | The following assertion has been violated during initialization at time 86400.000000
| | | | ((weaDat.conTim.canRepeatWeatherFile or noEvent(time - weaDat.conTim.weaDatEndTim < 1800.0))) --> "In modelTwo.weaDat.conTim: Insufficient weather data provided for the desired simulation period.
| | | | The simulation time 86400 exceeds the end time 0 of the weather data file."
I should also mention that to simulate the model for Day2 with the latest version of OpenModelica, I changed -lv=-stdout in simflag to -lv=-LOG_STDOUT.
Moreover, I only get this error when I try to use a .mat file to initialize the simulation, otherwise I can run the model for a whole year without this error.
I tried using Buildings Library v11.0.0 with OpenModelica v1.21.0, and I did not get this error. So, it seems to be related to OpenModelica v1.24.3.
I would appreciate it if anyone can help me solve this issue.
本文标签:
版权声明:本文标题:Assert error when simulate model with latest version of OpenModelica (1.24.3) and with initialization simflag - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736646805a1946127.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论