Skip to content

fix(config): update relative tolerance handling in GlobalConfigGroup#4695

Open
steffenaxer wants to merge 2 commits intomatsim-org:mainfrom
steffenaxer:fix-global-cfg
Open

fix(config): update relative tolerance handling in GlobalConfigGroup#4695
steffenaxer wants to merge 2 commits intomatsim-org:mainfrom
steffenaxer:fix-global-cfg

Conversation

@steffenaxer
Copy link
Collaborator

@steffenaxer steffenaxer commented Feb 6, 2026

This pull request introduces improvements to the handling and validation of the relativeToleranceForSampleSizeFactors parameter in the GlobalConfigGroup class, replacing exceptions with structured warnings and ensuring better configuration consistency. It also adds comprehensive tests to verify correct parameter serialization and default values.

Enhancements to configuration validation and error handling:

  • Replaces direct exceptions with calls to a new logScaleFactorWarning method in GlobalConfigGroup, which logs structured warnings when scale factors deviate beyond the allowed tolerance. This applies to both SimWrapperConfigGroup and internal GlobalConfigGroup checks. [1] [2]
  • Refactors the getter/setter for the relativeToleranceForSampleSizeFactors parameter, standardizing naming and annotation usage, and fixes the getter to return the actual value (not an offset by Double.MAX_VALUE).

Codebase improvements and test coverage:

  • Adds a new static method logScaleFactorWarning in GlobalConfigGroup to centralize and standardize warning messages for scale factor inconsistencies.
  • Adds a new test class GlobalConfigGroupTest to verify correct reading/writing of all parameters (including the new tolerance parameter) and to check default values.

Dependency and import updates:

  • Updates imports in SimWrapperConfigGroup to include GlobalConfigGroup for access to the new warning method.

Dear @kainagel this a proposal that contains some fixes for your PR. Hope it finds you well 😃

@steffenaxer steffenaxer requested a review from kainagel February 6, 2026 18:47
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