- Basic Express Structure
- Changing Valid/Invalid Expression Type
- Boolean Operators (AND, OR, XOR)
- Conditional Expressions (valid {} / invalid {})
- Constraint Expression in Various Feature/Product Setup
Basic Express Structure
A basic constraints expression will usually consist of these 3 words:
1.Feature code 2.“code” syntax 3.Option code which enclosed in quotation marks (“ ”)
We will use F1,F2,F… to represent feature codes and O1,O2,O3 to indicate the option codes within every features.
Expression example:
F1.code = “O1”
Basic Operators (Equal/Not Equal)
1. Equal sign(=/ ==)
F1.code = “O2”
2. Not Equal sign (!=)
F1.code != “O2”
3. Not operator !()
!(F1.code = “O1”)
Changing Valid/Invalid Expression Type
A user can select if the expressions should be interpreted as valid or invalid expressions via the Expression Type column of the Constraints.
Check If the users want to change the equal expression to not equal, instead of changing the expression, they can simply change the expression type to invalid.
Boolean Operators (AND, OR, XOR)
Boolean Operators -
Performs logical Boolean operations when two or more features are constrained together
1. AND
F1.code = “O1” and F2.code = “O1”
2. OR
F1.code = “O1” or F2.code = “O1”
2. XOR
F1.code = “O1” xor F2.code = “O1”
Top-Down Implementation
Example:
F1.code = “O1" and F2.code = “O1”
Explanation:
If option “O1" is set first for F1 then only option available for F2 is “O1” because F2 is below F1. However, if option “O1" is set first for F2, F1 will still show all options because F1 is above F2 and not being constrained.
Conditional Expressions (valid {} / invalid {})
Used to set conditional statements for constraints.
1. Valid condition without default
valid { case F1.code=“O1": F2.code=“O2"; }
If F1 is O1 then O2 is the only valid option in F2. If the user select any other options for F1, F2 will have no available option.
2. Valid condition with default
valid { case F1.code=“O1": F2.code=“O2"; default: F2.code = “O1"; }
If F1 is O1 then O2 is the only valid option in F2 otherwise by default O1 is the only valid option in F2.
3. Invalid condition without default
invalid { case F1.code=“O1": F2.code=“O2"; }
If F1 is O1 then O2 is the only option that is not available in F2.
4. Invalid condition with default
invalid { case F1.code=“O1": F2.code=“O2"; default: F2.code = “O1"; }
If F1 is O1 then O2 is the only option that is not available in F2 otherwise by default O2 and O3 are the only valid options in F2.
Collection ( {} )
With collections, all option codes in the selection will be constrained (available/unavailable) if the constraint is applied
Expression:
F1.code in { “O2”, “O3”}
Constraint Expression in Various Feature/Product Setup
1.Catalogue with special characters in feature codes
Any feature code with special characters needs to be wrapped in \( \)
Example : Feature code = F_1@
Expression:
\(F_1@\).code = “O1“
2. Optional feature
Make specific options checked/unchecked for optional features depending on the constraint type.
Expression:
F1.O1.checked = true (to make the options available/checked)
F1.O1.checked = false (to make the options unavailable/unchecked)
3. Nested Feature
Create an expression with nested features by adding the feature codes with a . after each feature followed by .code at the end
Scenario: F3 is the sub feature of F2 in O2 and F2 is the sub feature of F1 in O1.
Expression:
F1.F2.F3.code = “O1”
4. SKU and functional selection product
- Constraints for parent and child products should be applied when placing the root product in drawing space
- Placing constraints meant for the child product onto the parent product will trigger the Product Constraint Validation
- If the constraint consist of both parent and child product feature (such as in the Boolean expression), it’s advisable to place the constraints onto the child product so that it won’t trigger the Product Constraint Validation
5. Additional product
- The constraints will only take effect on the features in the respective product only.
- Boolean expression between main product and additional product will not work.
6. Feature with numeric options
(i) Feature with option code contains code ranges
Expression:
F1.code = O1
(ii) Numeric feature with feature domain
Expression:
F1.value > 40
(iii) Numeric feature without step ranges within the feature domain
Expression:
F1.value in 90mm..1200mm
(iv) Numeric feature with step ranges within the feature domain
Expression:
F1.value in 90mm..1200mm step=10mm
Comments
0 comments
Please sign in to leave a comment.