A matrix may be “stacked” from two or more square input .ufm files either into the internal matrix for internal analysis, modification etc, or else directly into an output .ufm file. The “levels” in the stacked matrix must correspond to the order of the input matrix files although, optionally, not all the input matrix files need be stacked.
Note that it is not possible to directly include the internal matrix as one of the matrices to be stacked, although this may be done indirectly by first outputting the internal matrix to a .ufm file and including it as an input .ufm file (in which case it will appear as the lowest level).
The output stacked .ufm file may be stacked either in “levels” or in “blocks” as selected by the user; see 10.2.4.
There are three alternative procedures to stack matrices (by levels” using pre-prepared .bat files with slightly different conventions and restrictions: MXSTACK as described in 10.20.9, STACK in 10.20.11 and UFMSTACK in 10.20.17.
Note in particular that MXSTACK is restricted to 8 or fewer matrices to be stacked; the other two are not restricted as to number. STACK defines its input matrix filenames by numerical suffixes to a root filename, e.g., mat1.ufm, mat2.ufm … from the “root” filename mat.ufm. UFMSTACK defines each stacked matrix filename explicitly in a control file.
Conversely, if the internal matrix is itself a stacked matrix with L “levels” it may be subdivided into a set of L individual square .ufm output matrix files. For example an internal matrix of 40 rows and 10 columns could give 4 10 x 10 output matrices, one per level. Alternatively, post 10.9.20, a single level may be selected for output as a square matrix, an operation referring to as “cutting” a matrix. See 10.4.2 for the reverse “paste” procedure to input a single level.
In Version 10.7 an option has been added to allow the output “unstacked” matrices to take their filenames from a “root” filename. Thus, if the root filename were mat.ufm then the output files are mat1.ufm, mat2.ufm, etc. etc. This is a slightly more convenient procedure than having to explicitly define a filename for each output matrix.
The same convention is also used by the batch file UNSTACK (see 10.20.12) which is the reverse of STACK (10.20.11) which stacks a set of square matrices mat1.ufm, mat2.ufm etc. etc. into a stacked matrix mat.ufm.
We also note here (although strictly it should be included within 10.4) that if a stacked .ufm matrix is input to MX, options exist to read only a single level into an internal (square) matrix or to sum all the levels into a single aggregate square matrix. Use the latter option, e.g. to obtain a total trip matrix from a set of stacked, say, trip purpose matrices.