Skip to content

Commit

Permalink
removed _treemaker, not used
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklise committed Apr 30, 2024
1 parent db48a25 commit e68c415
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions pyomo/contrib/parmest/parmest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# TODO: move use_mpisppy to a Pyomo configuration option

# Redesign TODOS
# TODO: _treemaker is not used in parmest, the code could be moved to scenario tree if needed
# TODO: Create additional built in objective expressions in an Enum class which includes SSE (see SSE function below)
# TODO: Clean up the use of theta_names through out the code. The Experiment returns the CUID of each theta and this can be used directly (instead of the name)
# TODO: Clean up the use of updated_theta_names, model_theta_names, estimator_theta_names. Not sure if estimator_theta_names is the union or intersect of thetas in each model
Expand Down Expand Up @@ -239,42 +238,6 @@ def _experiment_instance_creation_callback(
return instance


# # =============================================
# def _treemaker(scenlist):
# """
# Makes a scenario tree (avoids dependence on daps)

# Parameters
# ----------
# scenlist (list of `int`): experiment (i.e. scenario) numbers

# Returns
# -------
# a `ConcreteModel` that is the scenario tree
# """

# num_scenarios = len(scenlist)
# m = scenario_tree.tree_structure_model.CreateAbstractScenarioTreeModel()
# m = m.create_instance()
# m.Stages.add('Stage1')
# m.Stages.add('Stage2')
# m.Nodes.add('RootNode')
# for i in scenlist:
# m.Nodes.add('LeafNode_Experiment' + str(i))
# m.Scenarios.add('Experiment' + str(i))
# m.NodeStage['RootNode'] = 'Stage1'
# m.ConditionalProbability['RootNode'] = 1.0
# for node in m.Nodes:
# if node != 'RootNode':
# m.NodeStage[node] = 'Stage2'
# m.Children['RootNode'].add(node)
# m.Children[node].clear()
# m.ConditionalProbability[node] = 1.0 / num_scenarios
# m.ScenarioLeafNode[node.replace('LeafNode_', '')] = node

# return m


def SSE(model):
"""
Sum of squared error between `experiment_output` model and data values
Expand Down

0 comments on commit e68c415

Please sign in to comment.