File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,12 @@ def _scen_indep_denom(self):
119119 denom_max = max (max (denom ) for denom in global_denoms .values ())
120120 scen_indep_denom = {}
121121 for ndn , global_denom in global_denoms .items ():
122- for i , v in enumerate (global_denom ):
123- if (scen_indep_denom [ndn , i ]) <= self .denom_bound * v :
124- scen_indep_denom [ndn , i ] = max (denom_max , self .denom_bound * v )
122+ for i , denom in enumerate (global_denom ):
123+ # xbar is for rescaling, e.g., if the variable value is "naturally" small
124+ if denom <= self .denom_bound * xbars [ndn , i ]._value :
125+ scen_indep_denom [ndn , i ] = max (denom_max , self .denom_bound * xbars [ndn , i ]._value )
125126 else :
126- scen_indep_denom [ndn , i ] = v
127+ scen_indep_denom [ndn , i ] = denom
127128
128129 return scen_indep_denom
129130
You can’t perform that action at this time.
0 commit comments