mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Allow components to return stats, instead of modifying in-place
Added for compatibility with Julia.
This commit is contained in:
@@ -47,7 +47,9 @@ class LearningSolver:
|
|||||||
relaxed.optimize()
|
relaxed.optimize()
|
||||||
relaxed.extract_after_lp(h5)
|
relaxed.extract_after_lp(h5)
|
||||||
for comp in self.components:
|
for comp in self.components:
|
||||||
comp.before_mip(h5_filename, model, stats)
|
comp_stats = comp.before_mip(h5_filename, model, stats)
|
||||||
|
if comp_stats is not None:
|
||||||
|
stats.update(comp_stats)
|
||||||
model.optimize()
|
model.optimize()
|
||||||
model.extract_after_mip(h5)
|
model.extract_after_mip(h5)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user