Open
Description
Pyomo should have functions that can create a copy of a component. There are many transformations that do this manually (create a new component and copy the necessary "flags" over). This is error prone where individual developers may forget to copy a particular flag (e.g., active, mutable), or lead to broken code if (when) we add a new attribute to a particular component. These methods should also work with component data objects (i.e., be able to create a scalar version of an element from an indexed component).