Tables in ConstraintsYou can use tables in constraints to:
Restrict the allowed values of characteristics using restrictable characteristics (see Example: Restricting a Characteristic with a Table ).
Infer values.
Enter conditions in the CONDITIONS section.
Inferring Values
You can use tables in constraints to set characteristic values, as in actions and procedures. The difference is that you can process the table in several different directions in constraints, because you can define different value assignment alternatives.
Configurable material BIKE has characteristics DYNAMO and HEADLAMP. The values of these 2 characteristics influence each other.
Choose
Create table T_LIGHT and assign your 2 characteristics to it.
All characteristics are single-value, so you use the same characteristics in the table and in the class.
The difference is that you can define several value assignment alternatives, so you can use either characteristic to infer a value from the other.
Characteristics |
Alternative 1 |
Alternative 2 |
HEADLAMP |
X |
|
DYNAMO |
X |
Choose and enter the following combinations of values:
HEADLAMP |
DYNAMO |
Halogen |
Elektra |
Lumotec |
Axa |
FER |
FER dynamo |
Create a dependency net with the following constraint:
OBJECTS:
BK IS_A (300)BIKE
RESTRICTIONS:
TABLE T_LIGHT
(HEADLAMP = BK.HEADLAMP,
DYNAMO = BK.DYNAMO)
INFERENCES:
BK.HEADLAMP, BK.DYNAMO
Allocate the dependency net to the configuration profile.
As soon as you assign a value to characteristic HEADLAMP or DYNAMO, the value for the other characteristic is inferred by the table call.