**Defined in theory: Parametric-constraints****Source code: parametric-constraints.lisp**

**Documentation:**A constraint is a description that limits the permissible values for parameters and other properties of objects in a design. In this theory, constraints are objects with a slot called constraint.expression, whose value is a KIF sentence of type constraint-expression. This expression describes a constraint over parameters mentioned in the constraint. The constraint expression may also zero or one free variable. If the expression has not variables, then the constaint is called a parametric-constraint -- it is only over global parameters. If the expression contains a free variable, the constraint is called an object-constraint -- the variable represents the object being constrained.

The existence of a constraint does not imply that the constraint.expression is a true sentence. The semantics of the constraint expressions, including how "binding" to objects works, is provided by the predicates SATISFIED-CONSTRAINT and SATISFIES-CONSTRAINT. Satisfied-constraint is for parametric constraints; in this case, the constraint is satisfied iff the sentence is true. (Determining the truth of a constraint-expression may require finding the values of parameters mentioned in the sentence, but these parameters are not logical variables.) Object constraints are satisfied with respect to some object. The predicate SATISFIES-CONSTRAINT takes an object and a constraint-expression and holds when the expression, with the object substituted for the free variable, is a true sentence.

One may specify constraints with quoted expressions. For example, for the constraint C1, we can say that its constraint expression is a sentence relating two parameters, P1 and P2 as follows:

(= (constraint.expression C1) '(

*<*P1 P2))

C1 is satisfied if the sentence '(

*<*P1 P2) is true. If (= P1 10) and (= P2 20), then (*<*P1 P2) and therefore C1 is satisfied.**Exhaustive-Subclass-Partition:**{Parametric-constraint, Object-constraint}

**Constraint.Expression:***Slot-Cardinality:*1*Slot-Value-Type:*Constraint-expression

**Example:**(constraint c1)

(= (constraint.expression c1) (quote (

*<*x y)))

**Example:**(constraint c2)

(= (constraint.expression c2) (quote (=> (> capacity 5000) (= model-name model 43b))))

- SEE-ALSO
**Satisfied-Constraint:**satisfies-constraint