As of Pyomo 4.2, the results are automatically loaded back into the instance that you solved – so it is as simple as:
model.myvar.display()
to show the value of any single variable,
model.display()
to show all variables (and a lot of other information) about the model.
If you really need to recreate the old results object with the solution embedded within it, you can store the solution that is currently in the model into the results object with:
model.solutions.store_to(results)
This change (and the reasons why) have been previously discussed in the forum, for example: https://groups.google.com/d/topic/pyomo-forum/wjjY2XvmG2w/discussion
john
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.