Summary
When performing a deepcopy of SolverResults, they keys become duplicated.
Steps to reproduce the issue
import copy
import pyomo.environ as pyo
m = pyo.ConcreteModel()
m.a = pyo.Var(bounds=(0, 1))
m.b = pyo.Var(bounds=(0, 1))
m.obj = pyo.Objective(rule=m.a+m.b)
opt = pyo.SolverFactory('highs')
result = opt.solve(m)
print(result.keys())
# ['Problem', 'Solver', 'Solution', 'Timing info']
result2 = copy.deepcopy(result)
print(result2.keys())
# ['Problem', 'Solver', 'Solution', 'Timing info', 'Problem', 'Solver', 'Solution', 'Timing info']
Information on your system
Pyomo version: 6.9.2
Python version: 3.10.17
Operating system: Mac
How Pyomo was installed (PyPI, conda, source): PyPI
Solver (if applicable): NA
Additional information
I haven't throughly checked the remaining state of the copied SolverResults to see if there are any other issues.
Summary
When performing a deepcopy of
SolverResults, they keys become duplicated.Steps to reproduce the issue
Information on your system
Pyomo version: 6.9.2
Python version: 3.10.17
Operating system: Mac
How Pyomo was installed (PyPI, conda, source): PyPI
Solver (if applicable): NA
Additional information
I haven't throughly checked the remaining state of the copied SolverResults to see if there are any other issues.