Changeset 3567


Ignore:
Timestamp:
02/01/11 11:19:54 (3 years ago)
Author:
jwatson
Message:

Fixes to the PySP scenario tree to deal with singleton variables.

File:
1 edited

Legend:

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

    r3263 r3567  
    774774      for stage in self._stages: 
    775775         for (stage_var, match_template) in stage._variables: 
    776             if (variable.name == stage_var.name) and (index in match_indices): 
    777                return stage 
     776            if (variable.name == stage_var.name): 
     777               if ((index is None) and (len(match_indices)==0)) or (index in match_indices): 
     778                  return stage 
    778779 
    779780         # IMPT: this is a temporary hack - the real fix is to force users to 
Note: See TracChangeset for help on using the changeset viewer.