@@ -1315,7 +1315,7 @@ def write_houses(basenode, op, vnom):
13151315 else :
13161316 vstart = format (- 0.5 * vnom , '.2f' ) + '+' + format (0.866025 * vnom , '.2f' ) + 'j'
13171317
1318- if forERCOT == True :
1318+ if forERCOT :
13191319 phs = phs + 'S'
13201320 tpxname = gld_strict_name (basenode + '_tpx' )
13211321 mtrname = gld_strict_name (basenode + '_mtr' )
@@ -1328,7 +1328,7 @@ def write_houses(basenode, op, vnom):
13281328 print (' voltage_2 ' + vstart + ';' , file = op )
13291329 print ('}' , file = op )
13301330 for i in range (nhouse ):
1331- if forERCOT == False :
1331+ if not forERCOT :
13321332 tpxname = gld_strict_name (basenode + '_tpx_' + str (i + 1 ))
13331333 mtrname = gld_strict_name (basenode + '_mtr_' + str (i + 1 ))
13341334 print ('object triplex_line {' , file = op )
@@ -1700,7 +1700,7 @@ def write_substation(op, name, phs, vnom, vll):
17001700 if len (fncs_case ) > 0 :
17011701 print ('#ifdef USE_FNCS' , file = op )
17021702 print ('object fncs_msg {' , file = op )
1703- if forERCOT == True :
1703+ if forERCOT :
17041704 print (' name gridlabd' + fncs_case + ';' , file = op )
17051705 else :
17061706 print (' name gridlabdSimulator1;' , file = op )
@@ -1760,7 +1760,7 @@ def write_voltage_class(model, h, t, op, vprim, vll, secmtrnode):
17601760 bHaveS = True
17611761 else :
17621762 bHaveS = False
1763- if bHaveS == True and bHadS == False :
1763+ if bHaveS and not bHadS :
17641764 prefix = 'triplex_'
17651765 print ('object ' + prefix + t + ' {' , file = op )
17661766 if len (parent ) > 0 :
@@ -1776,17 +1776,17 @@ def write_voltage_class(model, h, t, op, vprim, vll, secmtrnode):
17761776 if 'load_class' in model [t ][o ]:
17771777 print (' load_class ' + model [t ][o ]['load_class' ] + ';' , file = op )
17781778 if 'constant_power_A' in model [t ][o ]:
1779- if bHaveS == True :
1779+ if bHaveS :
17801780 print (' power_1 ' + model [t ][o ]['constant_power_A' ] + ';' , file = op )
17811781 else :
17821782 print (' constant_power_A ' + model [t ][o ]['constant_power_A' ] + ';' , file = op )
17831783 if 'constant_power_B' in model [t ][o ]:
1784- if bHaveS == True :
1784+ if bHaveS :
17851785 print (' power_1 ' + model [t ][o ]['constant_power_B' ] + ';' , file = op )
17861786 else :
17871787 print (' constant_power_B ' + model [t ][o ]['constant_power_B' ] + ';' , file = op )
17881788 if 'constant_power_C' in model [t ][o ]:
1789- if bHaveS == True :
1789+ if bHaveS :
17901790 print (' power_1 ' + model [t ][o ]['constant_power_C' ] + ';' , file = op )
17911791 else :
17921792 print (' constant_power_C ' + model [t ][o ]['constant_power_C' ] + ';' , file = op )
@@ -1800,19 +1800,19 @@ def write_voltage_class(model, h, t, op, vprim, vll, secmtrnode):
18001800 vstartb = format (- 0.5 * vnom , '.2f' ) + format (- 0.866025 * vnom , '.2f' ) + 'j'
18011801 vstartc = format (- 0.5 * vnom , '.2f' ) + '+' + format (0.866025 * vnom , '.2f' ) + 'j'
18021802 if 'voltage_A' in model [t ][o ]:
1803- if bHaveS == True :
1803+ if bHaveS :
18041804 print (' voltage_1 ' + vstarta + ';' , file = op )
18051805 print (' voltage_2 ' + vstarta + ';' , file = op )
18061806 else :
18071807 print (' voltage_A ' + vstarta + ';' , file = op )
18081808 if 'voltage_B' in model [t ][o ]:
1809- if bHaveS == True :
1809+ if bHaveS :
18101810 print (' voltage_1 ' + vstartb + ';' , file = op )
18111811 print (' voltage_2 ' + vstartb + ';' , file = op )
18121812 else :
18131813 print (' voltage_B ' + vstartb + ';' , file = op )
18141814 if 'voltage_C' in model [t ][o ]:
1815- if bHaveS == True :
1815+ if bHaveS :
18161816 print (' voltage_1 ' + vstartc + ';' , file = op )
18171817 print (' voltage_2 ' + vstartc + ';' , file = op )
18181818 else :
@@ -2120,7 +2120,7 @@ def ProcessTaxonomyFeeder(outname, rootname, vll, vln, avghouse, avgcommercial):
21202120 if metrics_interval > 0 :
21212121 print ('object metrics_collector_writer {' , file = op )
21222122 print (' interval' , str (metrics_interval ) + ';' , file = op )
2123- if forERCOT == True :
2123+ if forERCOT :
21242124 print (' // filename ${METRICS_FILE};' , file = op )
21252125 print (' filename ' + outname + '_metrics.json;' , file = op )
21262126 else :
@@ -2268,7 +2268,7 @@ def ProcessTaxonomyFeeder(outname, rootname, vll, vln, avghouse, avgcommercial):
22682268 write_link_class (model , h , 'transformer' , seg_loads , op )
22692269 write_link_class (model , h , 'capacitor' , seg_loads , op )
22702270
2271- if forERCOT == True :
2271+ if forERCOT :
22722272 identify_ercot_houses (model , h , 'load' , 0.001 * avghouse , rgn )
22732273 connect_ercot_houses (model , h , op , vln , 120.0 )
22742274 for key in house_nodes :
@@ -2287,7 +2287,7 @@ def ProcessTaxonomyFeeder(outname, rootname, vll, vln, avghouse, avgcommercial):
22872287
22882288 write_voltage_class (model , h , 'node' , op , vln , vll , secnode )
22892289 write_voltage_class (model , h , 'meter' , op , vln , vll , secnode )
2290- if forERCOT == False :
2290+ if not forERCOT :
22912291 write_voltage_class (model , h , 'load' , op , vln , vll , secnode )
22922292 if len (Eplus_Bus ) > 0 and Eplus_Volts > 0.0 and Eplus_kVA > 0.0 :
22932293 print ('////////// EnergyPlus large-building load ///////////////' , file = op )
0 commit comments