Constraints

This dependency type is mainly for intensively interactive configuration tasks and for configuration tasks in which you need to take into account the dependencies between the characteristics of several objects. The main purpose of a constraint is to monitor the consistency of a configuration.

Constraints have the following distinguishing features:

  • You can use constraints to describe the dependencies between completely different objects and their characteristics.

  • Constraints are used to store information on which conditions must be fulfilled if the configuration is to be consistent.

  • Constraints are not directly allocated to individual objects. They are grouped together to form dependency nets and allocated to a configurable material in the configuration profile.

  • In constraints, you enter objects in their general form of expression, without using $SELF, $ROOT, or $PARENT to identify objects. As a rule, you refer to objects in constraints by entering the class to which the objects are allocated.

  • Constraints are declarative dependencies. The processing sequence of constraints and the point in time when constraints are processed are not relevant.

  • Constraints are not processed in a specific order. You cannot determine when a specific constraint is used.

In any processing situation, a constraint is only processed once. If a value that is relevant to the constraint is changed, the constraint is triggered again.

Structure of Constraints

There are four sections in a constraint. Each part is identified by a keyword. The keyword is followed by a colon. Each section ends with a period.

  • OBJECTS:

In this section, you enter the objects that are relevant to the constraint. You must enter the relevant objects in all constraints. You can also define variables for objects or characteristics.

  • CONDITION:

The condition entered here must be fulfilled in order for the constraint to be used. You do not need to enter a condition in a constraint. You can leave out the keyword CONDITION: if required. However, if you enter the keyword you must enter a condition.

  • RESTRICTIONS:

In this section, you enter the relation that must exist between the objects and characteristics if the configuration is to be consistent. You must enter a restriction in a constraint.

  • INFERENCES:

In this section, you enter the characteristics for which characteristic values are to be inferred. The main purpose of constraints is to check the consistency of a configuration. Usually, values are only inferred if you make an entry in this section.

For reasons of performance, only use constraints to infer values if it is really necessary.

Constraints are grouped together to form dependency nets. The dependency net is allocated to a configurable material in the configuration profile.

For more information on constraints, refer to: