Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSL 4.1.0 Regressions - MultiBody #4341

Open
14 of 15 tasks
GallLeo opened this issue Feb 27, 2024 · 5 comments
Open
14 of 15 tasks

MSL 4.1.0 Regressions - MultiBody #4341

GallLeo opened this issue Feb 27, 2024 · 5 comments
Assignees
Labels
example Issue only addresses example(s) L: Mechanics.MultiBody Issue addresses Modelica.Mechanics.MultiBody L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined V: 4.1.0-dev Issue originates in MSL v4.1.0-dev (and is not present in earlier releases)
Milestone

Comments

@GallLeo
Copy link
Contributor

GallLeo commented Feb 27, 2024

The following models fail in result comparison.
Tested revision: f9bddf8 (2024-02-16)

Changed models, need reference update after library officer check:

  • Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2
    - Reason: very tiny error at the end of the simulation on freeMotion.v_rel_a[2], which is very close to zero. The problem here is that CSV compare is just too strict on variables close to zero. One option is to remove the variable until we have a proper solution for that. This is done by PR Remove unreliable signals very close to zero #4420 (needs to be ported to maint/v4.1.0). However, as discussed in the MAP-Lib meeting 02-07-2024, maybe the best solution is to flag this regression as a false positive and fix the CSV tool to include some absolute tolerance for near-zero signals, see Improvements to the CSV compare tool for zero reference signals #4421.
    - Updated reference files? -> fixed by CSV-compare improvement. No reference update needed.
  • Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D
    - Reason: the trajectories diverge sharply for time > 0.52, most likely due to chaotic motion - the system is highly nonlinear and has more than two states, which are necessary ingredients for the path to chaos. Just changing Dymola version produces a different trajectory after that point, and also OpenModelica behaves differently. There's no point trying to reproduce chaotic trajectories, so we can limit the time span to StopTime = 0.4 only for the reference results. CSV compare should stop comparing when it no longer has data, but it needs to be fixed, see Correctly handle reference files with shorter time span than simulation StopTime modelica-tools/csv-compare#65
    - Updated reference files? @GallLeo please generate reference files with StopTime = 0.4.
  • ModelicaTest.MultiBody.Parts.FreeBodies
    - Reason: body.Q[2] is very close to zero, same story as the first example. Interim solution: remove it from the reference trajectories. This could be done by PR Remove unreliable signals very close to zero #4420 (needs to be ported to maint/v4.1.0), however, as discussed in the MAP-Lib meeting 02-07-2024, maybe the best solution is to flag this regression as a false positive and fix the CSV tool to include some absolute tolerance for near-zero signals, see Improvements to the CSV compare tool for zero reference signals #4421.
    - Updated reference files? -> fixed by CSV-compare improvement. No reference update needed.
  • ModelicaTest.MultiBody.Sensors.AbsoluteSensor
    - Reason: Test model changed, see Fix false calculation of w (omega) when resolveInFrame == frame_resolve #4148 (and esp. 82d1b16). The new results are correct.
    - Updated reference files? @GallLeo please update reference files.

No signals to compare, define more comparison signals:

  • ModelicaTest.MultiBody.Visualizers.Arrow
    - Updated comparisonSignals.txt? This model is basically meant to test 3D visualization capabilities, there's really no point checking numerical results, which are trivial
    - Updated reference files? No need to
  • ModelicaTest.MultiBody.Visualizers.ColorMaps
    - Updated comparisonSignals.txt? This model is basically meant to test 3D visualization capabilities, there's really no point checking numerical results, which are trivial
    - Updated reference files? No need to
  • ModelicaTest.MultiBody.Visualizers.Shapes
    - Updated comparisonSignals.txt? This model is basically meant to test 3D visualization capabilities, there's really no point checking numerical results, which are trivial
    - Updated reference files? No need to
  • ModelicaTest.MultiBody.Visualizers.Torus
    - Updated comparisonSignals.txt? This model is basically meant to test 3D visualization capabilities, there's really no point checking numerical results, which are trivial
    - Updated reference files? No need to

Change due to new Dymola version

  • ModelicaTest.MultiBody.Joints.Universal
    - Reason: Numerical differences on accelerations (second derivative). Martin Otter (during MAP-LIB meeting): Please update reference. Francesco: I further analyzed the issue after the meeting with @tobolar. universal.w_a is zero until about time = 0.3, then it starts showing some oscillations which are growing over time, but are clearly triggered by numerical errors and have a negligible amplitude (2e-8 rad/s). This is also confirmed by looking at the regression in OpenModelica. There is no point trying to reproduce this signal, which clearly only depends on numerical approximations, so until CSV compare can handle that properly, we can remove it in PR Remove unreliable signals very close to zero #4420 (needs to be ported to maint/v4.1.0). However, as discussed in the MAP-Lib meeting 02-07-2024, maybe the best solution is to flag this regression as a false positive and fix the CSV tool to include some absolute tolerance for near-zero signals, see Improvements to the CSV compare tool for zero reference signals #4421.
    - Updated reference files? -> fixed by CSV-compare improvement. No reference update needed.

  • ModelicaTest.MultiBody.Joints.UniversalSpherical
    - Reason: Numerical differences on accelerations (second derivative). Martin Otter (during MAP-LIB meeting): Please update reference. We made further analysis, in this case there are several variables which are very close to zero, similarly to PointGravityWithPointMasses2. We should remove all variables that are close to zero, because there is currently no way to test them reliably with CSV-compare, and on the other hand it is unlikely that these are wrong while the other ones are OK, since they are components of some physical vectors. This can be done by PR Remove unreliable signals very close to zero #4420 (needs to be ported to maint/v4.1.0) However, as discussed in the MAP-Lib meeting 02-07-2024, maybe the best solution is to flag this regression as a false positive and fix the CSV tool to include some absolute tolerance for near-zero signals, see Improvements to the CSV compare tool for zero reference signals #4421.
    - Updated reference files? -> fixed by CSV-compare improvement. No reference update needed.

  • ModelicaTest.MultiBody.Parts.Rotor1D.GearConstraint3
    - Reason: chaotic motion with bifurcation after time = 0.30
    - Updated reference files? @GallLeo please generate reference files with StopTime = 0.30. Also needs fixing modelica-tools/csv-compare/missing smoothOrder annotations in Media #65 to avoid a false positive

  • ModelicaTest.MultiBody.PlanarLoopWithMove
    - Reason: No more regression, probably due to resolved table generator issues.
    - Updated reference files? No.

  • ModelicaTest.MultiBody.Sensors.Distance2
    - Reason: No more regression, probably due to resolved table generator issues.
    - Updated reference files? No

  • ModelicaTest.MultiBody.Sensors.RelativeSensor
    - Reason: No more regression, probably due to resolved table generator issues.
    - Updated reference files? No.

  • Release notes check: Are all classes mentioned which could lead to result changes in user models?


Useful Links

Current comparison report:
https://www.ltx.de/download/MA/Compare_MSL_v4.1.0/comparison_report_overview.html
-> Reference result test -> Comparison

Comparison signal definitions:
https://github.com/modelica/ModelicaStandardLibrary/tree/master/Modelica/Resources/Reference/Modelica
https://github.com/modelica/ModelicaStandardLibrary/tree/master/ModelicaTest/Resources/Reference/ModelicaTest

Reference results:
https://github.com/modelica/MAP-LIB_ReferenceResults

@GallLeo GallLeo added L: Mechanics.MultiBody Issue addresses Modelica.Mechanics.MultiBody L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined example Issue only addresses example(s) V: 4.1.0-dev Issue originates in MSL v4.1.0-dev (and is not present in earlier releases) labels Feb 27, 2024
@GallLeo GallLeo added this to the MSL4.1.0 milestone Feb 27, 2024
@tobolar
Copy link
Contributor

tobolar commented Mar 1, 2024

Library officer check:

No signals to compare, define more comparison signals:

  • ModelicaTest.MultiBody.Visualizers
    The tests are intended to test only 3d visualization of the objects. So not sure how to proceed here.

Change due to new Dymola version (reference update after library officer check?):

  • ModelicaTest.MultiBody.Parts.Rotor1D.GearConstraint3
    This seems to be similar to Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D above.
    So a) introduce a damping and b) increase the tolerance (to=1e-6).

Not classified, yet (needs library officer check):

  • Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D
    This item is doubled, see the same class above.

  • ModelicaTest.MultiBody.PlanarLoopWithMove
    I can't simulate - maybe missing binaries? Rebuild binaries for Windows (MSVC, TDM-GCC) and Linux (GCC) #4250

  • ModelicaTest.MultiBody.Sensors.Distance2
    There is no error reported.

  • ModelicaTest.MultiBody.Sensors.RelativeSensor
    There is no error reported.

@casella
Copy link
Contributor

casella commented Jun 18, 2024

On 2024-06-18 I reviewed all issues with @tobolar, took decisions, and made actions, as reported in the top ticket description

@GallLeo
Copy link
Contributor Author

GallLeo commented Jul 2, 2024

Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D

I tried to reduce the reference CSV to 0.4 s.

It nearly works in csv-compare. Unfortunately, it reports errors for each variable, because the tube extrapolates a bit in the future.

2024-07-02_differentStopTimes_CompareIssue

Proposal:

  • update reference file to stop at 0.4 s
  • accept regression failure, for now.
  • improve CSV-compare or agree on test-stop-time-annotation for future MSL development (CI)

@casella
Copy link
Contributor

casella commented Jul 3, 2024

Agreed, as discussed during the 2024-07-02 MAP-Lib meeting

GallLeo added a commit to modelica/MAP-LIB_ReferenceResults that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Issue only addresses example(s) L: Mechanics.MultiBody Issue addresses Modelica.Mechanics.MultiBody L: ModelicaTest Issue addresses ModelicaTest, ModelicaTestConversion4 or ModelicaTestOverdetermined V: 4.1.0-dev Issue originates in MSL v4.1.0-dev (and is not present in earlier releases)
Projects
None yet
Development

No branches or pull requests

4 participants