Skip to content

Commit d84ea25

Browse files
committed
fixing naming per code review
1 parent 7c8423e commit d84ea25

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Diff for: examples/netdes/netdes_cylinders.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _parse_args():
2424
cfg.ph_args()
2525
cfg.fwph_args()
2626
cfg.lagrangian_args()
27-
cfg.subgradient_args()
27+
cfg.subgradient_ob_args()
2828
cfg.xhatshuffle_args()
2929
cfg.slammax_args()
3030
cfg.cross_scenario_cuts_args()
@@ -50,7 +50,7 @@ def main():
5050
xhatlooper = cfg.xhatlooper
5151
xhatshuffle = cfg.xhatshuffle
5252
lagrangian = cfg.lagrangian
53-
subgradient = cfg.subgradient
53+
subgradient_ob = cfg.subgradient_ob
5454
slammax = cfg.slammax
5555
cross_scenario_cuts = cfg.cross_scenario_cuts
5656

@@ -94,7 +94,7 @@ def main():
9494
scenario_creator_kwargs=scenario_creator_kwargs,
9595
rho_setter = None)
9696

97-
if subgradient:
97+
if subgradient_ob:
9898
subgradient_spoke = vanilla.subgradient_spoke(*beans,
9999
scenario_creator_kwargs=scenario_creator_kwargs,
100100
rho_setter = None)
@@ -125,7 +125,7 @@ def main():
125125
list_of_spoke_dict.append(fw_spoke)
126126
if lagrangian:
127127
list_of_spoke_dict.append(lagrangian_spoke)
128-
if subgradient:
128+
if subgradient_ob:
129129
list_of_spoke_dict.append(subgradient_spoke)
130130
if xhatlooper:
131131
list_of_spoke_dict.append(xhatlooper_spoke)

Diff for: examples/sslp/sslp_cylinders.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _parse_args():
3030
cfg.fwph_args()
3131
cfg.lagrangian_args()
3232
cfg.xhatshuffle_args()
33-
cfg.subgradient_args()
33+
cfg.subgradient_ob_args()
3434
cfg.reduced_costs_args()
3535
cfg.coeff_rho_args()
3636
cfg.integer_relax_then_enforce_args()
@@ -54,7 +54,7 @@ def main():
5454
xhatlooper = cfg.xhatlooper
5555
xhatshuffle = cfg.xhatshuffle
5656
lagrangian = cfg.lagrangian
57-
subgradient = cfg.subgradient
57+
subgradient_ob = cfg.subgradient_ob
5858
reduced_costs = cfg.reduced_costs
5959

6060
if cfg.default_rho is None:
@@ -107,7 +107,7 @@ def main():
107107
lagrangian_spoke = vanilla.lagrangian_spoke(*beans,
108108
scenario_creator_kwargs=scenario_creator_kwargs,
109109
rho_setter = None)
110-
if subgradient:
110+
if subgradient_ob:
111111
subgradient_spoke = vanilla.subgradient_spoke(*beans,
112112
scenario_creator_kwargs=scenario_creator_kwargs,
113113
rho_setter = None)
@@ -133,7 +133,7 @@ def main():
133133
list_of_spoke_dict.append(fw_spoke)
134134
if lagrangian:
135135
list_of_spoke_dict.append(lagrangian_spoke)
136-
if subgradient:
136+
if subgradient_ob:
137137
list_of_spoke_dict.append(subgradient_spoke)
138138
if xhatlooper:
139139
list_of_spoke_dict.append(xhatlooper_spoke)

Diff for: mpisppy/generic_cylinders.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ def _parse_args(m):
6262
cfg.two_sided_args()
6363
cfg.ph_args()
6464
cfg.aph_args()
65-
cfg.sub_args()
65+
cfg.subgradient_args()
6666
cfg.fixer_args()
6767
cfg.integer_relax_then_enforce_args()
6868
cfg.gapper_args()
6969
cfg.fwph_args()
7070
cfg.lagrangian_args()
7171
cfg.ph_ob_args()
72-
cfg.subgradient_args()
72+
cfg.subgradient_ob_args()
7373
cfg.xhatshuffle_args()
7474
cfg.xhatxbar_args()
7575
cfg.converger_args()
@@ -144,7 +144,7 @@ def _do_decomp(module, cfg, scenario_creator, scenario_creator_kwargs, scenario_
144144
rho_setter = rho_setter,
145145
all_nodenames = all_nodenames,
146146
)
147-
elif cfg.SUB:
147+
elif cfg.SUBGRAD:
148148
# Vanilla Subgradient hub
149149
hub_dict = vanilla.subgradient_hub(
150150
*beans,
@@ -265,7 +265,7 @@ def _do_decomp(module, cfg, scenario_creator, scenario_creator_kwargs, scenario_
265265

266266

267267
# subgradient outer bound spoke
268-
if cfg.subgradient:
268+
if cfg.subgradient_ob:
269269
subgradient_spoke = vanilla.subgradient_spoke(*beans,
270270
scenario_creator_kwargs=scenario_creator_kwargs,
271271
rho_setter = rho_setter,
@@ -314,7 +314,7 @@ def _do_decomp(module, cfg, scenario_creator, scenario_creator_kwargs, scenario_
314314
list_of_spoke_dict.append(lagrangian_spoke)
315315
if cfg.ph_ob:
316316
list_of_spoke_dict.append(ph_ob_spoke)
317-
if cfg.subgradient:
317+
if cfg.subgradient_ob:
318318
list_of_spoke_dict.append(subgradient_spoke)
319319
if cfg.xhatshuffle:
320320
list_of_spoke_dict.append(xhatshuffle_spoke)

Diff for: mpisppy/utils/config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ def aph_args(self):
420420
domain=float,
421421
default=0.01)
422422

423-
def sub_args(self):
423+
def subgradient_args(self):
424424

425-
self.add_to_config(name="SUB",
425+
self.add_to_config(name="SUBGRAD",
426426
description="Use subgradient hub instead of PH (default False)",
427427
domain=bool,
428428
default=False)
@@ -636,7 +636,7 @@ def lagranger_args(self):
636636
default=None)
637637

638638

639-
def subgradient_args(self):
639+
def subgradient_ob_args(self):
640640

641641
self.add_to_config('subgradient',
642642
description="have a subgradient spoke",

0 commit comments

Comments
 (0)