propagateUp Annotation

propagateUp is a Constraint Modeling Language (CML) annotation that controls aggregation propagation between children and parent elements.

AnnotationpropagateUp
Applicable toRelationship
Value Type/Valuestrue, false
DescriptionIf propagateUp is not specified, the engine sets it implicitly as false for the relationship. If the propagateUp annotation is specified as true, the engine aggregates values from children to parent elements (upward propagation). The engine cannot modify this value from the parent level (e.g. via constraint), so the children relation domain will not be affected; or If the propagateUp is specified as false, both upward and downward propagations are applicable. The engine aggregates values from children to parent elements (upward propagation). Meanwhile the engine can modify this value (e.g. via constraint) from the parent level. The value is propagated downward and might affect the relation domain (downward propagation).

Example 1 

In this example, the propagateUp annotation is not specified for the relationship (warranties). The model contains technical variable (coverageDays) and constraint.

1type GeneratorSet {
2
3        relation warranties : Warranty {
4        totalDays = sum(coverageDays);
5    }
6    constraint(warranties.totalDays <= 299);
7}
8
9type Warranty {
10    int coverageDays = 100;
11}
12
13type Warranty_PRP : Warranty;
14
15type Warranty_DCC : Warranty;
16
17type Warranty_ESP : Warranty;

Example 2 

In this example, the propagateUp annotation is defined as false for the relationship (warranties). The model contains technical variable (coverageDays) and constraint.

1type GeneratorSet {
2
3        @(propagateUp = false)
4        relation warranties : Warranty {
5        totalDays = sum(coverageDays);
6    }
7    constraint(warranties.totalDays <= 299);
8}
9
10type Warranty {
11    int coverageDays = 100;
12}
13
14type Warranty_PRP : Warranty;
15
16type Warranty_DCC : Warranty;
17
18type Warranty_ESP : Warranty;

Example Description and Configurator Result 

In example 1, the warranties relation is not specified with the propagateUp annotation, and the system considers it as false by default. In example 2, the relation is explicitly defined with a false annotation value. Each product of the warranties relation is assigned with the technical coverageDays variable equalled to 100. The totalDays calculates the coverageDays sum of selected warranties products. As a result, the system validates the constraint and relation domain in the following way:

  • The user selects one warranties product (e.g. Warranty_PRP). The system calculates the totalDays aggregated value for the relation (equal to 100). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is satisfied (100<= 299). The system also verifies the possibility to add extra products to the relation. The capacity of the constraint allows to add one more product to the relation, so the system will not reduce the relation domain.
  • The user selects the second warranties product (e.g. Warranty_DCC). The system calculates the totalDays aggregated value for the relation (equal to 200). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is satisfied (200<= 299). The system verifies the possibility to add extra products to the relation. The capacity of the constraint (300<= 299) does not allow to add one more product to the relation, so the system will reduce the relation domain.
  • The user unselects one of the selected warranties products (e.g. Warranty_PRP). The system calculates the totalDays aggregated value for the relation (equal to 100). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is satisfied (100<= 299). The system verifies the possibility to add extra products to the relation. The capacity of the constraint allows to add one more product to the relation, so the system will not reduce the relation domain (both Warranty_DCC and Warranty_ESP products are available for selection).

Example 3 

In this example, the propagateUp annotation is specified for the relationship (warranties) as true. The model contains technical variable (coverageDays) and constraint.

1type GeneratorSet {
2
3        @(propagateUp = true)
4        relation warranties : Warranty {
5        totalDays = sum(coverageDays);
6    }
7    constraint(warranties.totalDays <= 299);
8}
9
10type Warranty {
11    int coverageDays = 100;
12}
13
14type Warranty_PRP : Warranty;
15
16type Warranty_DCC : Warranty;
17
18type Warranty_ESP : Warranty;

Example Description and Configurator Result 

In example 3, the relation is specified with propagateUp annotation as true value. Each product of the warranties relation is assigned with the technical coverageDays variable equalled to 100. The totalDays calculates the coverageDays sum of selected warranties products. As a result, the system validates the constraint and relation domain in the following way:

The user selects one warranties product (e.g. Warranty_PRP). The system calculates the totalDays aggregated value for the relation (equal to 100). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is satisfied (100<=299);

The user selects the second warranties product (e.g. Warranty_DCC). The system calculates the totalDays aggregated value for the relation (equal to 200). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is satisfied (200<=299);

The user selects the third warranties product (e.g. Warranty_ESP). The system calculates the totalDays aggregated value for the relation (equal to 300). The system validates the constraint on the parent based on the calculated aggregation variable. The constraint is not satisfied (300<=299). The system rejects the selection of one of the warranties products to satisfy the constraint.

As a best practice, use the propagateUp = true for models with few relationships and rare constraint violations, since it minimizes propagation work and avoids extra domain updates. Meanwhile, set the propagateUp = false for large product structures or frequent violations, since bidirectional propagation prevents invalid states early and reduces expensive backtracking.

propagateUp Configuration Settings 

Associated ExampleProduct Group StructureApplicable to”propagateUp” annotationUser ActionEngine ActionUI Behavior
Example 1Individual productRelationshipnot specifiedSelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint, limitation of the relation domain when the constraint capacity is used upDisplays the selected products. When constraint capacity is used up, in addition to the selected products the limited list of the available to be added products will be displayed(if any)
Example 2Individual productRelationshipFALSESelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint, limitation of the relation domain when the constraint capacity is used upDisplays the selected products. When constraint capacity is used up, in addition to the selected products the limited list of the available to be added products will be displayed(if any)
Example 3Individual productRelationshipTRUESelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint, rejection of the user selection when the constraint validation is failedDisplays the selected products. No limitations for the list of available products
N/AProduct ClassificationRelationshipnot specifiedSelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint. The engine might replace one of the previously selected products with a newly selectedDisplays the selected products. No limitations for the list of available products in the browse popup for the classification
N/AProduct ClassificationRelationshipFALSESelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint. The engine might replace one of the previously selected products with a newly selectedDisplays the selected products. No limitations for the list of available products in the browse popup for the classification
N/AProduct ClassificationRelationshipTRUESelects or deselects the productsCalculates the aggregation variable value on the relation, validation of the constraint, rejection of the user selection when the constraint validation is failedDisplays the selected products. No limitations for the list of available products in the browse popup for the classification