Skip to content

Use the csv-compare tolerance for the csv-compare tubes - #423

Merged
sjoelund merged 1 commit into
masterfrom
csv-compare-tolerance
Nov 17, 2026
Merged

sjoelund merged 1 commit into
masterfrom
csv-compare-tolerance

Conversation

@sjoelund

Copy link
Copy Markdown
Member

The rectangle and ellipse tubes of diffSimulationResults use rangeDelta as the csv-compare tolerance. It sets the tube width in x and, through the ratio of the two axes, also the tube height. testmodel.py passed reference_rangeDelta (1e-3) to every tube: for rectangle that is a tube height of 0.1% of the range of the reference, half of what csv-compare uses by default (0.002). The default of rangeDelta in diffSimulationResults is that same 0.002. Of the 216 sampled models that fail with rectangle in OpenModelica #18121, 172 fail at 1e-3 and 93 at 0.002, both with the start and stop time fix for these tubes in OpenModelica.

  • testmodel.py: for reference_tube rectangle or ellipse, do not pass rangeDelta, so that diffSimulationResults uses its default, unless the configuration has a reference_tolerance. ellipse2014 keeps reference_rangeDelta.
  • test.py: --reference_tolerance sets reference_tolerance for every library, and the report names it.
  • README.md: document reference_tolerance.

Runs without a reference_tube do not change, and neither does their confighash.

Assisted-by: Claude Opus 5.5

The rectangle and ellipse tubes of diffSimulationResults use rangeDelta
as the csv-compare tolerance. It sets the tube width in x and, through
the ratio of the two axes, also the tube height. testmodel.py passed
reference_rangeDelta (1e-3) to every tube: for rectangle that is a
tube height of 0.1% of the range of the reference, half of what
csv-compare uses by default (0.002). The default of rangeDelta in
diffSimulationResults is that same 0.002. Of the 216 sampled models
that fail with rectangle in OpenModelica #18121, 172 fail at 1e-3 and
93 at 0.002, both with the start and stop time fix for these tubes in
OpenModelica.

- testmodel.py: for reference_tube rectangle or ellipse, do not pass
  rangeDelta, so that diffSimulationResults uses its default, unless
  the configuration has a reference_tolerance. ellipse2014 keeps
  reference_rangeDelta.
- test.py: --reference_tolerance sets reference_tolerance for every
  library, and the report names it.
- README.md: document reference_tolerance.

Runs without a reference_tube do not change, and neither does their
confighash.

Assisted-by: Claude Opus 5.5
@sjoelund
sjoelund merged commit 06b396b into master Nov 17, 2026
7 checks passed
@sjoelund
sjoelund deleted the csv-compare-tolerance branch November 17, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant