File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -499,15 +499,7 @@ def _solution_handler(
499
499
"""Method to handle the preferred action for the solution"""
500
500
symbol_map = SymbolMap ()
501
501
symbol_map .default_labeler = NumericLabeler ('x' )
502
- try :
503
- model .solutions .add_symbol_map (symbol_map )
504
- except AttributeError :
505
- # Something wacky happens in IDAES due to the usage of ScalarBlock
506
- # instead of PyomoModel. This is an attempt to fix that.
507
- from pyomo .core .base .PyomoModel import ModelSolutions
508
-
509
- setattr (model , 'solutions' , ModelSolutions (model ))
510
- model .solutions .add_symbol_map (symbol_map )
502
+ model .solutions .add_symbol_map (symbol_map )
511
503
legacy_results ._smap_id = id (symbol_map )
512
504
delete_legacy_soln = True
513
505
if load_solutions :
You can’t perform that action at this time.
0 commit comments