Skip to content

Add OpenDSS .dss parser #2

@samtalki

Description

@samtalki

Extend the parser to OpenDSS feeders. Distribution scope, opens the door to LinDist3Flow.

Scope

  • New module powerio/src/format/opendss/ with a real lexer (token stream, not regex; .dss syntax has multi word commands, Redirect, ! comments).
  • Public API: parse_opendss(content) -> Result<Network>, parse_opendss_file(path).
  • Phase A: Circuit, Vsource, Line, Transformer, Load, Capacitor, Generator. Reactor / switch later.
  • Map OpenDSS impedance matrices (Rmatrix, Xmatrix per phase) into Branch. Decide: keep balanced positive sequence in Network and add a Phase3Case for full 3 phase, or extend Branch with optional 3x3 phase impedance.

Reference cases

IEEE 13, 34, 37, 123 bus radial feeders (BSD licensed in OpenDSS distribution). Vendor under tests/data/opendss/.

Acceptance

  • Lexer with unit tests for Redirect, New <element>.<name>, multi line commands, ! comments.
  • IEEE-13 round trips through parse_opendss → build_ybus → solve and matches OpenDSS's reference Y_bus to 1e-9.
  • At least one radial feeder is detected by IndexedNetwork::is_radial().

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions