Changeset 3263 for coopr.pysp/trunk/coopr/pysp/scenariotree.py
- Timestamp:
- Dec 1, 2010 12:47:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.pysp/trunk/coopr/pysp/scenariotree.py
r3261 r3263 29 29 # 30 30 def _update_solution_map(self, variable, match_template, scenario_instance_map): 31 32 33 31 34 32 # don't bother copying bounds for variables, as the values stored … … 237 235 # add a new variable to the stage, which will include updating the solution maps for each associated ScenarioTreeNode. 238 236 # 239 def add_variable(self, variable, match_template ):237 def add_variable(self, variable, match_template, scenario_instance_map): 240 238 241 239 self._variables.append((variable, match_template)) 240 match_indices = extractVariableIndices(variable, match_template) 242 241 243 242 for tree_node in self._tree_nodes: 244 tree_node._update_solution_map(variable, match_template) 243 tree_node._variable_indices[variable.name] = match_indices 244 tree_node._update_solution_map(variable, match_template, scenario_instance_map) 245 245 246 246 class Scenario(object):
Note: See TracChangeset
for help on using the changeset viewer.