Describe the bug
Parsing any DSS file containing SwtControl objects fails with a MethodError because no Base.parse method is defined for the SwitchState type. I believe the error (no method matching parse(::Type{SwitchState}, ::String) returns because rawdss2dss is not transforming the string value to SwitchState enum. I'm new to Julia so this is just a best guess.
Minimum Viable Example
using PowerModelsDistribution
parse_dss("network.dss") # any DSS file containing SwtControl objects
With a .dss file containing:
New SwtControl.sc_s1 SwitchedObj=Line.s1 SwitchedTerm=1 Action=Close State=Closed Lock=No
Expected behavior
I would expect the switch state of the ENG model to be configured by the DssSwtcontrol object.
Screenshots
NA
System Information (please complete the following information):
- OS: windows
- PowerModelsDistribution v0.16.0
- Julia v1.12.5
Additional context
I am wondering if this can be fixed by simply adding a new Base.parse() method to the parse.jl module.
Describe the bug
Parsing any DSS file containing
SwtControlobjects fails with aMethodErrorbecause noBase.parsemethod is defined for theSwitchStatetype. I believe the error (no method matching parse(::Type{SwitchState}, ::String) returns because rawdss2dss is not transforming the string value to SwitchState enum. I'm new to Julia so this is just a best guess.Minimum Viable Example
With a .dss file containing:
New SwtControl.sc_s1 SwitchedObj=Line.s1 SwitchedTerm=1 Action=Close State=Closed Lock=No
Expected behavior
I would expect the switch state of the ENG model to be configured by the DssSwtcontrol object.
Screenshots
NA
System Information (please complete the following information):
Additional context
I am wondering if this can be fixed by simply adding a new Base.parse() method to the parse.jl module.