Documentation >
MAC-PAC Reference Library >
Distribution >
Expert Configurator >
Key Concepts and Procedures >
Matrix Variable
Matrix Variable
These seven variables are used in rule syntax. The correct format for a syntax expression is (V1.operand.V2) The user-defined code for the type of variable must be placed before the variable with a hyphen. For example:
(O-ENGINE,=,4.3) Where ENGINE is an option defined on a screen generation rule. The variable codes are defined in category Y01 on the Reference File.
The Expert Configurator has the capability to use matrices for determining a value. A matrix is a multi-dimensional table, with 1-5 variable keys and a unique result value for each combination of the keys. For example, if there is a matrix with keys SIZE, COLOR, and SHAPE, there will be a value associated with each combination of valid values of those keys (is SIZE=big, COLOR=red, and SHAPE=round, then RESULT=3.141). Matrices can be used in rules of any database type (sales order, pricing, manufacturing) and are plant specific.
Matrices are divided into two parts; matrix header and matrix detail. the matrix header defines the matrix number, part number, and database type of the matrix (matrices are defined uniquely by a combination of matrix number, part number, and database type). In addition, the header defines the matrix type (what type of values, alphanumeric or numeric, are valid for the result fields), the number of keys (1-5), the definition of each key, and access mode. Option, internal, and secondary variables are valid key types. The key type, size, and decimal precision must match the original definition of the key to prevent unexpected results.
The matrix detail contains the data of the matrix. This data defines the valid combination of the keys and the result field values associated with the combinations. Many versions of data can exist, but only one version may be active at a time. Versions are activated on the matrix header.
Groups, subgroups, and *ALL may be used in place of a part number. If two matrices have the same matrix number and database type (but one is defined for a part number and the other is defined for a group, for example), the system will use the following hierarchy to determine which matrix will be used based for the part number (specific to general):
specific part -> subgroup -> group -> *ALL
For example, if two matrices exist with the matrix number A1, but one has a part number of PART1 and the other has group number GROUP1 in place of the part number, the matrix defined for PART1 will be used. Similarly, two matrices were defined for a subgroup and *ALL, the subgroup will be used.
The access mode has three valid entries:
= equal to
< less than or equal to
> greater than or equal to
These access modes enable you to define how matrix data is to be retrieved. It eliminates the need to enter data for every possible combination by allowing levels of data. For example, a single key matrix to retrieve a price, in which the key is the quantity: You can define the quantity key with an access mode of less than or equal to. Matrix data for the Quantity Key could be set up by 10:
|
|
0
|
100
|
10
|
200
|
20
|
300
|
30
|
400
|
If you enter an order with a quantity of 8, the price returned would be $100.00 (0 is less than or equal to 8). If the Quantity Key had been defined with an access mode of equal to (=) using the same data, and an order requesting a quantity of 8 is placed, the error message Matrix Line Not Found would be displayed and configuration would end.