modelica-tools / csv-compare

Tool to compare curves from one csv files with curves from other csv files using an adjustable tolerance
https://www.modelica.org
BSD 3-Clause "New" or "Revised" License
26 stars 15 forks source link

Correctly handle reference files with shorter time span than simulation StopTime #65

Closed casella closed 1 month ago

casella commented 4 months ago

Some models in the MSL show chaotic motion. It's good to see the chaotic motion in the simulation, so we set StopTime long enough to see that, but when issuing reference results, these should be computed on a time span which is short enough to avoid bifurcations and the onset of chaos, which is theoretically impossible to match with finite-precision numerical integration.

An easy solution to this problem is to generate reference files that are truncated to a shorter end time than the StopTime annotation of the model.

In this case, the CSV compare tool should only compare the trajectories over the time span that overlaps both the simulation results and the reference file. It already kind of does it, but the tubes at the end of the reference file time span are warped, so the test fails. See #4341

2024-07-02_differentStopTimes_CompareIssue

This should be fixed.

Keeping @beutlich and @GallLeo in the loop.