Purpose
You can use tables in constraints to:
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.
Process flow
Configurable material BIKE has characteristics DYNAMO and HEADLAMP. The values of these 2 characteristics influence each other.
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 |
HEADLAMP |
DYNAMO |
Halogen |
Elektra |
Lumotec |
Axa |
FER |
FER dynamo |
OBJECTS:
BK IS_A (300)BIKE
RESTRICTIONS:
TABLE T_LIGHT
(HEADLAMP = BK.HEADLAMP,
DYNAMO = BK.DYNAMO)
INFERENCES:
BK.HEADLAMP, BK.DYNAMO
Result
As soon as you assign a value to characteristic HEADLAMP or DYNAMO, the value for the other characteristic is inferred by the table call.