Ignore:
Timestamp:
Dec 1, 2010 12:47:21 PM (10 years ago)
Author:
jwatson
Message:

Corrected issue with cvar generation introduced a while back.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/scenariotree.py

    r3261 r3263  
    2929   #
    3030   def _update_solution_map(self, variable, match_template, scenario_instance_map):
    31 
    32 
    3331
    3432      # don't bother copying bounds for variables, as the values stored
     
    237235   # add a new variable to the stage, which will include updating the solution maps for each associated ScenarioTreeNode.
    238236   #
    239    def add_variable(self, variable, match_template):
     237   def add_variable(self, variable, match_template, scenario_instance_map):
    240238
    241239      self._variables.append((variable, match_template))
     240      match_indices = extractVariableIndices(variable, match_template)
    242241
    243242      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)
    245245
    246246class Scenario(object):
Note: See TracChangeset for help on using the changeset viewer.