File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1313# elec_load = mlt.GetElectricLoad(r'..\testbed_load.txt')
1414# print(elec_load.data)
1515
16- testload = [randrange (120 , 1100 ) for x in range (0 , 40 )]
16+ testload = [randrange (120 , 1000 ) for x in range (0 , 40 )]
1717testresource = [randrange (200 , 300 ) if x < 4000 else 0 for x in range (0 , 40 )]
1818#
1919#
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ def __init__(self, gensets: tuple):
2020 self .gendict_mol = {item .ident :item .mol for item in gensets }
2121 self .gencombos = powerset (self .gendict_mol )
2222 self .gendict_cap = {item .ident :item .capacity for item in gensets }
23+ self .min_mol = min (self .gendict_mol .values ())
2324
2425 # finding all the possible combinations of the minimum operating load
2526 self .combo_mol_caps = {}
Original file line number Diff line number Diff line change @@ -56,13 +56,12 @@ def src_diesel_out(self):
5656 calculates the actual diesel output based on minimum operating load of the diesel
5757 :param min_operating_load: minimum operating load of the diesel in kW
5858 """
59- min_mol = min (self .powerhouse .combo_mol_caps , key = self .powerhouse .combo_mol_caps .get )
60- if self .powerhouse .combo_mol_caps [min_mol ] > self .elec_load ['electric_load' ].min ():
59+ if self .powerhouse .min_mol > self .elec_load ['electric_load' ].min ():
6160 warnings .warn ('Electric load below powerhouse minimum operating load: the electric load has 1 or more '
6261 'instances where its value is below the minimum output of the powerhouse. '
6362 'Energy balance calculations may be invalid' , stacklevel = 4 )
6463
65- self .calc_frame ['src_diesel_output' ] = self .calc_frame ['dummy_diesel' ].clip (self .powerhouse .combo_mol_caps [ min_mol ] , None )
64+ self .calc_frame ['src_diesel_output' ] = self .calc_frame ['dummy_diesel' ].clip (self .powerhouse .min_mol , None )
6665
6766 def dsrc_resource_out (self ):
6867 """
You can’t perform that action at this time.
0 commit comments