From 11655f09dedfc058ad7ec8f63a09f5e0a70c1b5f Mon Sep 17 00:00:00 2001 From: Bernard Knueven Date: Tue, 12 Mar 2024 21:14:26 -0600 Subject: [PATCH] removing status collection for sub-blocks --- pyomo/contrib/solver/base.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pyomo/contrib/solver/base.py b/pyomo/contrib/solver/base.py index 43d168a98a0..4e826053815 100644 --- a/pyomo/contrib/solver/base.py +++ b/pyomo/contrib/solver/base.py @@ -419,12 +419,8 @@ def _map_results(self, model, results): ] legacy_soln.status = legacy_solution_status_map[results.solution_status] legacy_results.solver.termination_message = str(results.termination_condition) - legacy_results.problem.number_of_constraints = model.nconstraints() - legacy_results.problem.number_of_variables = model.nvariables() - number_of_objectives = model.nobjectives() - legacy_results.problem.number_of_objectives = number_of_objectives - if number_of_objectives == 1: - obj = get_objective(model) + obj = get_objective(model) + if obj is not None: legacy_results.problem.sense = obj.sense if obj.sense == minimize: