Skip to content

Commit e68c415

Browse files
committed
removed _treemaker, not used
1 parent db48a25 commit e68c415

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

Diff for: pyomo/contrib/parmest/parmest.py

-37
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# TODO: move use_mpisppy to a Pyomo configuration option
1717

1818
# Redesign TODOS
19-
# TODO: _treemaker is not used in parmest, the code could be moved to scenario tree if needed
2019
# TODO: Create additional built in objective expressions in an Enum class which includes SSE (see SSE function below)
2120
# 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)
2221
# 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
@@ -239,42 +238,6 @@ def _experiment_instance_creation_callback(
239238
return instance
240239

241240

242-
# # =============================================
243-
# def _treemaker(scenlist):
244-
# """
245-
# Makes a scenario tree (avoids dependence on daps)
246-
247-
# Parameters
248-
# ----------
249-
# scenlist (list of `int`): experiment (i.e. scenario) numbers
250-
251-
# Returns
252-
# -------
253-
# a `ConcreteModel` that is the scenario tree
254-
# """
255-
256-
# num_scenarios = len(scenlist)
257-
# m = scenario_tree.tree_structure_model.CreateAbstractScenarioTreeModel()
258-
# m = m.create_instance()
259-
# m.Stages.add('Stage1')
260-
# m.Stages.add('Stage2')
261-
# m.Nodes.add('RootNode')
262-
# for i in scenlist:
263-
# m.Nodes.add('LeafNode_Experiment' + str(i))
264-
# m.Scenarios.add('Experiment' + str(i))
265-
# m.NodeStage['RootNode'] = 'Stage1'
266-
# m.ConditionalProbability['RootNode'] = 1.0
267-
# for node in m.Nodes:
268-
# if node != 'RootNode':
269-
# m.NodeStage[node] = 'Stage2'
270-
# m.Children['RootNode'].add(node)
271-
# m.Children[node].clear()
272-
# m.ConditionalProbability[node] = 1.0 / num_scenarios
273-
# m.ScenarioLeafNode[node.replace('LeafNode_', '')] = node
274-
275-
# return m
276-
277-
278241
def SSE(model):
279242
"""
280243
Sum of squared error between `experiment_output` model and data values

0 commit comments

Comments
 (0)