(function from pyomo.contrib.gdpopt.create_oa_subproblems)
pyomo.contrib.gdpopt.create_oa_subproblems
This collects variables from active Constraints and Objectives. It descends into Disjuncts, but does not collect any indicator variables that do not appear in algebraic constraints pre-transformation.