Scenario Inheritance
Scenario Manager will pass changes made in a scenario to linked attributes of its descendants, allowing multiple scenarios to be modified in one operation and maintain similarity between scenarios where desired.
Any attribute whose value is the same as that of the scenario’s parent is linked to the parent. In turn, if the parent’s attribute value is the same as that of its parent, then the child’s attribute is linked to its grandparent. This ancestral linking of attributes can exist across any number of generations. A change made to a scenario will be passed downward to its children, grandchildren, etc., as far as the link exists. Changes are NOT passed upward from child to parent.
Once an attribute is changed within a scenario, the link is broken to that individual attribute. Subsequent changes in the scenario’s ancestors, parent, grandparent, etc., will no longer affect that attribute, but all other attributes within the scenario will remain linked. The Model Data window with Ancestral Data enabled shows how the data changes between scenarios.
Scenario Logic Examples
Scenario Manager is easier to understand when the coding logic behind its implementation is explained. If a field is blank for children, grandchildren, or other descendants, the data is inherited from the parent (base). The Base Scenario always contains complete data and never has blank fields (see Table 1). Data flows downward but never upward.
Table 1: Blank fields in the Child and Grandchild scenarios inherit data from the parent, and any changes to the Base scenario update all descendants
If a child scenario does not have a blank field, then data for that property is initiated at that scenario level (see Table 2).
Table 2: Since the Child scenario does not have a blank field, its Diameter is 2 instead of 3, and the same applies to the Grandchild
If a scenario is changed, and its child has different data, then the change will not pass downwards (see Table 3).
Table 3: Changing the Base Scenario Diameter from 3 to 6 does not affect the Child or its descendants, whereas changing the Length from 25 to 40 updates the Length in the Child, Grandchild, and all their descendants
If a child scenario has data that is different than the parent, its children cannot relink to the parent (see Table 4).
Table 4: Even if the Grandchild scenario's Diameter matches the Base, it is not linked to the Base since neither it nor its parent is blank
If a child scenario’s data, which was previously changed and is thus different from the parent, is changed back to the same vale as the parent, the inheritance link is re-established (see Table 5). Its descendant’s link is also re-established.
Table 5: If the Child's Diameter is changed to match the Base, it will be blanked out and relinked the next time the scenario loads, and the same applies to the Grandchild if its Diameter also matches the Base
Table 6 shows data for two pipe properties across three scenarios. The data that would be used when each scenario is loaded is as follows:
- Base scenario
-
Diameter = 3
-
Length = 25
-
Changes to Diameter will not pass downwards
-
Changes to Length will affect only Child #1.
- Child #1 scenario
-
Diameter = 2
-
Length = 25
-
Changes to Base Diameter will not affect Diameter
-
Changes to Base Length will affect Length
- Grandchild #1 scenario
-
Diameter = 2
-
Length = 15
-
Changes to Base Diameter will not affect Diameter
-
Changes to Child #1 Diameter will affect Diameter
-
Changes to Base Length or Child #1 Length will not affect Length
Table 6: Input data for these properties explained in the text.
Re-Establishing Broken Scenario Links
A link may be re-established by returning the attribute to the same value as that of its parent. This can be done manually by entering the value or selecting the Copy Data From Pipe list and selecting the Parent Pipe Data option. Within other data windows, it is done by selecting the Same As Parent option in Output Control, Analysis Setup, Cost Settings, or Library Manager.
Since links are identified by comparing attribute values of pipes or junctions with the same Workspace ID number, renumbering a scenario will break the links of all pipes and junctions renumbered. Since numbers must be unique, once a link has been broken by renumbering, it may not be re-established.