Skip to content

Commit

Permalink
additions to canonical dss order in opendss solver
Browse files Browse the repository at this point in the history
  • Loading branch information
lilycatolson committed Mar 20, 2024
1 parent 7906525 commit c7e5bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omf/solvers/opendss/dssConvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def dss_to_clean_via_save(dss_file, clean_out_path, add_pf_syntax=True, clean_up
nice_buses = re.sub(r'([\w_\-\.]+),([\w_\-\.]+),([\w_\-\.]+)', r'setbusxy bus=\1 x=\2 y=\3', bus_data)
clean_copies['buscoords.dss'] = 'makebuslist\n' + nice_buses
#HACK: This is the order in which things need to be inserted or opendss errors out. Lame! Also note that pluralized things are from subfolders.
CANONICAL_DSS_ORDER = ['master.dss', 'loadshape.dss', 'vsource.dss', 'transformer.dss', 'transformers.dss', 'reactor.dss', 'regcontrol.dss', 'cndata.dss', 'wiredata.dss', 'linegeometry.dss', 'linecode.dss', 'spectrum.dss', 'swtcontrol.dss', 'tcc_curve.dss', 'capacitor.dss', 'capacitors.dss', 'growthshape.dss', 'line.dss', 'branches.dss', 'capcontrol.dss', 'generator.dss', 'pvsystem.dss', 'load.dss', 'loads.dss', 'energymeter.dss', 'monitor.dss', 'buscoords.dss', 'busvoltagebases.dss']
CANONICAL_DSS_ORDER = ['master.dss', 'loadshape.dss', 'vsource.dss', 'transformer.dss', 'transformers.dss', 'reactor.dss', 'regcontrol.dss', 'cndata.dss', 'wiredata.dss', 'linegeometry.dss', 'linecode.dss', 'spectrum.dss', 'swtcontrol.dss', 'tcc_curve.dss', 'capacitor.dss', 'capacitors.dss', 'growthshape.dss', 'line.dss', 'branches.dss', 'capcontrol.dss', 'generator.dss', 'pvsystem.dss', 'load.dss', 'loads.dss', 'energymeter.dss', 'fault.dss', 'relay.dss', 'recloser.dss', 'fuse.dss', 'indmach012.dss', 'monitor.dss', 'buscoords.dss', 'busvoltagebases.dss']
# Note files we got that aren't in canonical files:
for fname in clean_copies:
if fname not in CANONICAL_DSS_ORDER:
Expand Down

0 comments on commit c7e5bd1

Please sign in to comment.