Skip to content

Commit 0da850a

Browse files
committed
need_solution=False for FWPH iteration
1 parent e5f101e commit 0da850a

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

mpisppy/extensions/reduced_costs_fixer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def sync_with_spokes(self, pre_iter0 = False):
124124
Field.OBJECTIVE_OUTER_BOUND,
125125
self.reduced_costs_spoke_index,
126126
)
127+
if self.opt.cylinder_rank == 0:
128+
print(f"RCFixer, reduced costs bound: {self.outer_bound_buf.value_array()[0]}")
127129
if self.reduced_cost_buf.is_new() and self.reduced_cost_buf.id() == self.outer_bound_buf.id():
128130
reduced_costs = self.reduced_cost_buf.value_array()
129131
this_outer_bound = self.outer_bound_buf.value_array()[0]

mpisppy/opt/fwph.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ def fwph_main(self, finalize=True):
113113
if (self.ph_converger):
114114
self.convobject = self.ph_converger(self)
115115

116-
if self.options.get("FW_LP_start_iterations", 1000) > 0:
116+
if self.options.get("FW_LP_start_iterations", 0) > 0:
117117
global_toc("Starting LP PH...")
118-
lp_iterations = self.options.get("FW_LP_start_iterations", 1000)
118+
lp_iterations = self.options["FW_LP_start_iterations"]
119119
total_iterations = self.options["PHIterLimit"]
120120
self.options["PHIterLimit"] = lp_iterations
121121
integer_relaxer = pyo.TransformationFactory('core.relax_integer_vars')
@@ -150,7 +150,7 @@ def fwph_main(self, finalize=True):
150150
tee=teeme,
151151
verbose=self.options["verbose"],
152152
# sdm_iter_limit=20,
153-
# FW_conv_thresh=-1,
153+
# FW_conv_thresh=1e-8,
154154
)
155155
global_toc("Starting FW PH")
156156

@@ -407,6 +407,10 @@ def SDM(self, model_name, mip_solver_options, dtiming, tee, verbose, sdm_iter_li
407407
dtiming=dtiming,
408408
tee=tee,
409409
verbose=verbose,
410+
# if the problem isn't feasible,
411+
# becuase of the cutoff, we should
412+
# probably keep going ??
413+
need_solution=False,
410414
)
411415
self._remove_objective_cutoff(mip)
412416
# tmipsolve = time.perf_counter() - tbmipsolve

mpisppy/utils/cfg_vanilla.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ def _fwph_options(cfg):
434434
"FW_verbose": cfg.verbose,
435435
"mip_solver_options": mip_solver_options,
436436
"qp_solver_options": qp_solver_options,
437+
"FW_LP_start_iterations": cfg.fwph_lp_start_iterations,
437438
}
438439

439440
return fw_options

mpisppy/utils/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ def fwph_args(self):
534534
domain=float,
535535
default=1e-4)
536536

537+
self.add_to_config("fwph_lp_start_iterations",
538+
description="Number of iterations to operate on LP relaxation to warmstart fwph duals",
539+
domain=int,
540+
default=0)
541+
537542

538543
def lagrangian_args(self):
539544

0 commit comments

Comments
 (0)