Skip to content

Add checks to docs + data validator that R >= 0 #1203

@mgovers

Description

@mgovers

We almost no-where in our docs specify that r >= 0. We do specify that r and x cannot be both 0.0.
This may lead to multiple places in our code having UB in which we do not check for negative values of r.

The only places where we do check that r >= 0 is:

  • for source (via rx_ratio and z01_ratio)
  • for asymmetric line
    • TBD: we also require that x > 0 and c > 0. Is that correct?
  • for automatic tap regulator (line drop compensation)

Originally posted by @mgovers in #1197 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    Projects

    Status

    Q4 2025

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions