Require Rule vs Constraint

In Constraint Modeling Language (CML), constraint() and require() can both enforce behavior, but they operate differently: constraint focuses on logical consistency, require focuses on physical presence of products.

Here’s a comparison between constraint() and require().

Featureconstraint()require()
Primary goalValidates if a condition is met (LHS) and operates on the result (RHS).Forces a product to be present.
Engine actionResolves the constraint or displays an error if there are no options to resolve.Adds the required product to the quote.