OpenDSSDirect.jl
OpenDSSDirect.jl copied to clipboard
parsing error of transformer xhl vs x12 parameters in circuit.ToJSON()
I'm not sure if this is the right repository to report this problem, but it looks like the circuit.ToJSON function of OpenDSSDirect will ignore transformer parameters xhl, xht, and xlt, thus setting these parameters to their default values. But it will recognize the alternative versions of the parameters, x12, x13, and x23.
An example DSS file comes from the test sets of PowerModelsDistribtion, given below. Saving this as a file and using the script below to generate a JSON object, the object has default values for xhl, xht, and xlt of transformer [1], rather than zeros. Changing the DSS file to use x12=0, x13=0, and x23=0 instead results in a JSON object with the correct (zero) values.
Julia Script, where the DSS file is saved as filename.dss:
import OpenDSSDirect as DSS
DSS.Basic.AllowEditor(false)
DSS.dss("""
clear
redirect "filename.dss"
""")
ckt = DSS.Circuit.ToJSON(Int32(1)|Int32(4)|Int32(32)|Int32(64)|Int32(128)|Int32(512))
println("xlt= ", ckt["transformer"][1]["xlt"]) # should be 0.0
DSS script:
clear
! Base Frequency
Set DefaultBaseFrequency=50
! New Circuit
New circuit.ut_trans
~ BasekV=11 BaseMVA=0.1 pu=1.0 ISC3=9999999999 ISC1=9999999999
! Transformers
New Transformer.TX1 windings=3 phases=3 Buses=[1 2 3]
~ Conns=[Delta Wye Wye]
~ kVs=[11 4 0.4]
~ kVAs=[500 500 500]
~ %Rs=[0 0 0]
~ xhl=0 xht=0 xlt=0
~ %noloadloss=0
~ %imag=0
~ leadlag=lead
! Transmission Lines
New Line.LINE1 Bus1=SourceBus Bus2=1 phases=3 X1=3 R1=6
! Loads
New Load.LOAD1 Phases=1 Bus1=2.1 kV=2.30 kW=43 kvar=76 vminpu=0.8 vmaxpu=1.2
New Load.LOAD2 Phases=1 Bus1=2.2 kV=2.30 kW=52 kvar=85 vminpu=0.8 vmaxpu=1.2
New Load.LOAD3 Phases=1 Bus1=2.3 kV=2.30 kW=61 kvar=94 vminpu=0.8 vmaxpu=1.2
New Load.LOAD4 Phases=1 Bus1=3.1 kV=0.23 kW=74 kvar=41 vminpu=0.8 vmaxpu=1.2
New Load.LOAD5 Phases=1 Bus1=3.2 kV=0.23 kW=85 kvar=52 vminpu=0.8 vmaxpu=1.2
New Load.LOAD6 Phases=1 Bus1=3.3 kV=0.23 kW=96 kvar=63 vminpu=0.8 vmaxpu=1.2
New Load.LOAD7 Phases=1 Bus1=1.3 kV=6.351 kW=205 kvar=185 vminpu=0.8 vmaxpu=1.2
! Set Voltage Bases
Set voltagebases=[11 4 0.4]
Calcvoltagebases
! Solve network
solve