Newer Version Available
Constraints
Constraints enforce rules and conditions on types, variables, and relationships. Use
constraints to define logical restrictions and ensure consistency within the
model.
For more information about the supported constraints, see:
- Logical Constraints
- Table Constraints
- Using Proxy Variables with Constraints on Types and Relationships
- Group Type
- Message Rule
- Preference Rule
- Require Rule
- Require Rule vs Constraint
- SetDefault Rule
- Exclude Rule
- Action Rule
- Hide/Disable Rule
- Recommendation Rule
- Set Product Selling Model in a Constraint
Supported Logic Operators
These logic operators are supported in CML.
Arithmetic Operators
- Multiplication (*)
- Division (/)
- Remainder (%)
- Addition (+)
- Subtraction (-)
Relational Operators
- Greater than (>)
- Greater than or equal to (>=)
- Less than (<)
- Less than or equal to (<=)
Equality Operators
- Equal (==)
- Not equal (!=)
Logic Operators
- Not (!)
- And (&&)
- XOR/Exclusive or (^)
- Or (||)
- Bi-conditional (<->)
- Conditional (?:)
- Implication (->)
Operator Precedence
In resolving equations, operator precedence determines the order in which operations are performed. Operators in CML have precedence in this order:
- Arithmetic operators have the first precedence.
- Relational operators have the second precedence.
- Equality operators have the third precedence.
- Logic operators have a lower precedence than equality operators, in decreasing order as listed, with Implication having the lowest precedence.
Constraint Annotation
Here are the details of abort, a constraint annotation.
| Annotation | Possible Values | Description |
|---|---|---|
| abort | true, false | Specifies that, if this constraint fails, abort search and return false for configuration. |