Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmundt committed Jan 26, 2024
1 parent b6395ab commit f126bc4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pyomo/contrib/solver/ipopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,17 @@ def solve(self, model, **kwds):
if config.load_solution:
results.incumbent_objective = value(nl_info.objectives[0])
else:
results.incumbent_objective = value(replace_expressions(
nl_info.objectives[0].expr,
substitution_map={
id(v): val
for v, val in results.solution_loader.get_primals().items()
},
descend_into_named_expressions=True,
remove_named_expressions=True,
))
results.incumbent_objective = value(
replace_expressions(
nl_info.objectives[0].expr,
substitution_map={
id(v): val
for v, val in results.solution_loader.get_primals().items()
},
descend_into_named_expressions=True,
remove_named_expressions=True,
)
)

results.solver_configuration = config
results.solver_log = ostreams[0].getvalue()
Expand Down

0 comments on commit f126bc4

Please sign in to comment.