lbl-srg / modelica-buildings

Modelica Buildings library
238 stars 153 forks source link

Strange reference file to verify the results of the model Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator #3852

Open AndreaBartolini opened 1 month ago

AndreaBartolini commented 1 month ago

The model Buildings.Controls.OBC.CDL.Routing.Validation.RealVectorReplicator fails the verification with the reference file produced by Dymola for the following signals:

The first is connected to the output of a ramp generator, the second is the current simulation time.

I run the model in both Dymola 2024 and OpenModelica v1.24.0 and the signals listed above are as expected, the problem is in the reference file that seems to contain strange values (I get this values from the OpenModelica CI): image image

Can you please check the values in the original reference file? Thanks in advance.

Keep @casella in the loop...

mwetter commented 1 month ago

@AndreaBartolini I copied the line that starts with time from the file https://simulationresearch.lbl.gov/ReferenceResults/modelica-buildings/master/Dymola/Buildings_Controls_OBC_CDL_Routing_Validation_RealVectorReplicator.txt into the script:

import numpy as np
import matplotlib.pyplot as plt
time=[0e+00, 2.000000094994903e-03, ...]
plt.plot(time)
plt.show()

and got the plot below.

image

I see nothing wrong with the data.

Similarly if I plot time and reaRep.u[1]:

image
AndreaBartolini commented 1 month ago

@mwetter thanks for the cross check, we will check the reference files used in the CI. @casella , who can do the cross check with the files indicated in https://github.com/lbl-srg/modelica-buildings/issues/3852#issuecomment-2150646446 ?

casella commented 1 month ago

I'll open a ticket about that on the OMC issue tracker.