PowerModelsDistribution.jl
PowerModelsDistribution.jl copied to clipboard
[BUG] `parse_file` don't change an element when a `.dss` file change it.
Describe the bug
Using the parse_file
in a file that has a redirect to a file that changes an element in the model, the parser doesn't change in the PowerModelsDistribution
Dictionary
object.
Minimum Viable Example
DSS Files
// change_load.dss
Load.Load_1.bus1 = SOURCEBUS
// test.dss
Clear
new circuit.test bus1=SOURCEBUS pu=1.0
New Line.Line_1 bus1=SOURCEBUS bus2=BUS_1
New Load.Load_1 phases=3 conn=Wye bus1=BUS_1 kw=0.1 kvar=0.03 model=1
redirect change_load.dss
solve
Julia Files
import PowerModelsDistribution
const PMD = PowerModelsDistribution
case_file = "test.dss"
model_dict = PMD.parse_file(case_file)
@assert (model_dict["load"]["load_1"]["bus"] == "sourcebus")
Expected behavior
On OpenDSS and OpenDSSDirect.jl this example works well.
The parser must change the element after a change command in the .dss
file.
System Information (please complete the following information):
- OS: Manjaro Linux x86_64
- Version Kernel Linux 5.15.60-1-MANJARO
To the best of my knowledge about the parser, this should work, so there is definitely a bug somewhere.