3.6.3.6. Multiple ranges

We have seen that it is possible to interpret the range of variation as a percentage of the nominal value. This is often enough to adapt the range to very different nominal values. However, in some contexts it can be useful to really modify the range of a factor.

This information can also be read from a data file. For example, our previous file can be modified to add a new attribute representing the range of one of the factors:

#FILE_NAME: myNominalValues.dat            
#COLUMN_NAMES: x1 | x2 | rx1

0.0   10.0   2.0
5.0    3.0   0.4
-5.0   17.0   6.0

Tip

The name of the attribute and the order in which it appears in the file is meaningless. Actually, any attribute can be considered as a range.

The modifications of “step 1” and the removal of “step 2” in the example of Multiple sets of nominal values are still valid, while “step 4” must be modified in order to tell the OAT sampler that the range of “x1” is represented by another attribute:

    // step 4
    Bool_t use_percentage = kTRUE;
    oatSampler->setRange("x1", "rx1");
    oatSampler->setRange("x2", 40.0, use_percentage);

Now, for each new set of nominal values, the value of “rx1” will become the range of “x1”.

The result of the modified script (which can be found in Macro “samplingOATRange.C” is:

************************************************************************************
*    Row   * tds__n__iter *   x1 *   x2 *  rx1 * __nominal_set__ * __modified_att_ *
************************************************************************************
*        0 *            1 *    0 *   10 *    2 *               1 *              -1 *
*        1 *            2 *   -1 *   10 *    2 *               1 *               0 *
*        2 *            3 *    1 *   10 *    2 *               1 *               0 *
*        3 *            4 *    0 *    8 *    2 *               1 *               1 *
*        4 *            5 *    0 *   12 *    2 *               1 *               1 *
*        5 *            6 *    5 *    3 *  0.4 *               2 *              -1 *
*        6 *            7 *  4.8 *    3 *  0.4 *               2 *               0 *
*        7 *            8 *  5.2 *    3 *  0.4 *               2 *               0 *
*        8 *            9 *    5 *  2.4 *  0.4 *               2 *               1 *
*        9 *           10 *    5 *  3.6 *  0.4 *               2 *               1 *
*       10 *           11 *   -5 *   17 *    6 *               3 *              -1 *
*       11 *           12 *   -8 *   17 *    6 *               3 *               0 *
*       12 *           13 *   -2 *   17 *    6 *               3 *               0 *
*       13 *           14 *   -5 * 13.6 *    6 *               3 *               1 *
*       14 *           15 *   -5 * 20.4 *    6 *               3 *               1 *
************************************************************************************

If we compare this design to the previous one, we can see that the column for “x2” is unchanged, while “x1” is modified according to the value of “rx1”. We can also note that “rx1” is never modified (in the OAT way). This is because no call to the function setRange was done for it. Only the attributes with an associated range are modified by the sampling procedure.