Skip to content

LineType points to default value for certain line types #10

@abodh

Description

@abodh

Not sure if this an issue with the dss_capi but when I ran some tests, specifically 4 LineTypes are not recognized in altdss when reading a dss file: swt_sect, swt_rec, swt_disc, and swt_brk. Rest of the types seem to be fine.

I installed the package via altdss[all] but here the specific version of associated packages in my environment:

  • altdss 0.2.4
  • dss-python 0.15.7
  • dss-python-backend 0.14.5
  • opendssdirect-py 0.9.4

Minimal example below:

Working Examples

 ------- WORKING EXAMPLES -------
New Line.line_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" LineType=OH
> altdss.Line['line_1'].LineType_str
> 'oh'

New Line.line_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" LineType=UG
> altdss.Line['line_1'].LineType_str
> 'ug'

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_FUSE
> altdss.Line['switch_1'].LineType_str
> 'swt_fuse'

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_ELBOW
> altdss.Line['switch_1'].LineType_str
> 'swt_elbow'

Not Working Examples

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_SECT
> altdss.Line['switch_1'].LineType_str
> 'oh'

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_REC
> altdss.Line['switch_1'].LineType_str
> 'oh'

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_DISC
> altdss.Line['switch_1'].LineType_str
> 'oh'

New Line.switch_1 Phases=3 Bus1="101.1.2.3" Bus2="102.1.2.3" switch="y" LineType=SWT_BRK
> altdss.Line['switch_1'].LineType_str
> 'oh'

The following confuses me though, if I reassign the LineType_str as one of the non working LineType_str then it still does not work but assigning the LineType value works. Example below:

# assigning the line type string as 'swt_sect' does not work (as discussed above)
> altdss.Line['switch_1'].LineType_str = 'swt_sect'
> altdss.Line['switch_1'].LineType_str
> 'oh'

# assigning the line type as swt_sect int enum works
> altdss.Line['switch_1'].LineType = 7
> altdss.Line['switch_1'].LineType
> <LineType.swt_sect: 7>

> altdss.Line['switch_1'].LineType_str
> 'swt_sect'

At first, I thought anything with swt_ does not work but that is not the case. swt_ldbrk, swt_fuse, and swt_elbow are properly recognized. Similarly, rest of the linetypes are properly recognized as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions