DM_setItemConstr

Intelligent Miner® supports constraints that are based on taxonomies. Taxonomies are classes or categories of items. For example, if 'drink' is a taxonomy parent of 'juice' and 'milk', and 'juice' is a taxonomy parent of 'orange juice', you can define an item constraint for the taxonomy parent 'drink'. This item constraint has the following effect:
  • If the constraint is positive (constraintType 1,2 or 3), only the rules or the sequences that contain 'drink' in the body (1), in the head (2), or in the entire sequence or rule (3) pass the filter.
  • If the constraint is negative (constraintType -1, -2 or -3), only the rules or the sequences pass the filter that neither contain 'drink' nor any of its direct or indirect taxonomy siblings ('juice', 'milk', 'orange juice') in the body (-1), in the head (-2), or in the entire sequence or rule (-3).

Syntax

Method syntax

Read syntax diagramSkip visual syntax diagramruleFltr..DM_setItemConstr(item ,constraintType,disjunctiveGroup )

Function syntax

Read syntax diagramSkip visual syntax diagramDM_setItemConstr(ruleFltr ,item,constraintType, disjunctiveGroup)

Parameters

ruleFltr
A value of type DM_RuleFilter
item
A value of type VARCHAR(1024) . The name of an item or a taxonomy parent of an item, for example, an item category.
constraintType
A value of type INTEGER . The following list shows valid integers that indicate the kind of the constraint:
1
The item must exist in the rule body.
2
The item must exist in the rule head.
3
The item must exist in the rule.
11
At least one item of this category, or the category name, must exist in the rule body.
12
At least one item of this category, or the category name, must exist in the rule head.
13
At least one item of this category, or the category name, must exist in the rule.
-1
The item must not exist in the rule body.
-2
The item must not exist in the rule head.
-3
The item must not exist anywhere in the rule.
-11
An item of this category must not exist in the rule body.
-12
An item of this category must not exist in the rule head.
-13
An item of this category must not exist in the rule.
disjunctiveGroup
A value of type INTEGER . The unique ID of a disjunctive group of item constraints. By default, item constraints are concatenated by the logical 'AND operator'. This means, if there are two item constraints with different disjunctive group values (or with at least one of the disjunctive groups being NULL), only the rules that satisfy both constraints are included in the model to be created. However, the item constraints with identical disjunctive group IDs different from NULL are supposed to be concatenated by the logical 'OR operator'. This means that a rule must satisfy only at least one of the item constraints in that group.

Return Value

The return value is of type DM_RuleFilter

  • If item is NULL and constraintType is not NULL, the following error occurs:

    IDM1236E: For the function "Variable3", the variable item is outside of the valid range NULL setItemConstr

  • If item is NULL and constraintType is NULL, the value ruleFltr is returned. The given disjunctive group of item constraints is removed, or all groups are removed if the disjunctive group is NULL.
  • If constraintType is NULL, the value ruleFltr is returned. The given item is removed from the given disjunctive group or from the default group if the disjunctive group is NULL.
  • If constraintType is invalid, the following error occurs:

    IDM1236E: For the function "Variable3", the variable constraintType is outside of the valid range { 1, -1, 2, -2, 3, -3, 11, -11, 12, -12, 13, -13 } setItemConstr

  • If none of the conditions above apply the value ruleFltr is returned. It contains an item constraint for the given item and the given constraint type in the given disjunctive group (or in a new 'atomic' disjunctive group if the given disjunctive group value is NULL).