Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion pyomo/contrib/solver/solvers/highs.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,20 @@ def _postsolve(self, stream: io.StringIO):
results.objective_bound = None
else:
results.objective_bound = info.mip_dual_bound
results.iteration_count = info.simplex_iteration_count

if info.valid:
# The method that ran will have a non-negative iteration count
# and the others will be 0 or -1.
max_iters = max(
info.simplex_iteration_count,
info.ipm_iteration_count,
info.mip_node_count,
info.pdlp_iteration_count,
info.qp_iteration_count,
)
results.iteration_count = max_iters if max_iters != -1 else 0
else:
results.iteration_count = 0

if config.load_solutions:
if has_feasible_solution:
Expand Down
Loading