diff --git a/pyomo/contrib/parmest/experiment.py b/pyomo/contrib/parmest/experiment.py index 69474a32bb0..4f797d6c89c 100644 --- a/pyomo/contrib/parmest/experiment.py +++ b/pyomo/contrib/parmest/experiment.py @@ -13,16 +13,17 @@ class Experiment: """ The experiment class is a template for making experiment lists - to pass to parmest. - - An experiment is a Pyomo model "m" which is labeled + to pass to parmest. + + An experiment is a Pyomo model "m" which is labeled with additional suffixes: * m.experiment_outputs which defines experiment outputs * m.unknown_parameters which defines parameters to estimate - + The experiment class has one required method: * get_labeled_model() which returns the labeled Pyomo model """ + def __init__(self, model=None): self.model = model diff --git a/pyomo/contrib/parmest/parmest.py b/pyomo/contrib/parmest/parmest.py index 8f98ab5cd5a..aecc9d5ebc2 100644 --- a/pyomo/contrib/parmest/parmest.py +++ b/pyomo/contrib/parmest/parmest.py @@ -408,7 +408,7 @@ def _expand_indexed_unknowns(self, model_temp): Expand indexed variables to get full list of thetas """ model_theta_list = [k.name for k, v in model_temp.unknown_parameters.items()] - + # check for indexed theta items indexed_theta_list = [] for theta_i in model_theta_list: @@ -419,11 +419,11 @@ def _expand_indexed_unknowns(self, model_temp): indexed_theta_list.append(theta_i + '[' + str(ind) + ']') else: indexed_theta_list.append(theta_i) - + # if we found indexed thetas, use expanded list if len(indexed_theta_list) > len(model_theta_list): model_theta_list = indexed_theta_list - + return model_theta_list def _create_parmest_model(self, experiment_number):