The algorithm first evaluates the load factor of the
reference load shape x, which is
defined by the ratio of average to peak value. If the target load
factor is greater than reference level, then all base
values are multiplied by a number > 1. If the target
load factor is less than reference level, then all base values are
multiplied by a number < 1. The multipliers increase/decrease
linearly and are applied to the based values after ordered.
If \(x'\) is the ordered version of \(x\), then \(x'_{i}\)
will be multiplied by \(1-(i-1)*\beta\), where \(\beta\) is
a constant calculated as:
$$\beta = \frac{\sum_{i=1}^n x'_{i} - target\ load\ factor }
{\sum_{i=1}^n x'_{i}(i-1)}$$
The load factor of the derived series matches the target.
For \(target < base\), \(\beta\) is positive and vice-versa.
The algorithm attempts hard to match the load factor of the derived
load shape to the base load factor. \(\beta\) becomes large in
magnitude for large difference of base and target load factor.
In case \(\beta > 1\), it is possible to get negative
multipliers which force the values to be negative. This particular
situation can occur when target load factor is significantly smaller
than the base load factor.
If the target load factor is much bigger than the base
load factor, one/both of the followings can occur:
As a linearly increasing function is multiplied
by a decreasing function (\(x'\)), it is possible
that the maximum of the product can exceed the maximum value
of the base (\(x'\)), resulting in a different load factor.
As a linearly increasing function is multiplied
by a decreasing function (\(x'\)), it is possible
that the product is not strictly decreasing. The product
array is re-ordered to produce the final values.
The return object contains a data frame df, having the
following columns:
x_index: An index given to the original load
shape x, starting from 1 to length(x).
x: The original array x, unaltered.
x_rank: The rank of the data points of the
given array x, from 1 for the peak to
length(x) for the lowest value.
x_ordered: Sorted x (largest to smallest).
x_pu: Per unit x, derived by diving x
by max(x).
x_ordered_pu: Per unit x, sorted from largest
to smallest.
mult: Derived multipliers, would be applied to
sorted per unit x.
y_ordered_pu: Product of per unit sorted x
and mult.
y_ordered_pu2: y_ordered_pu, sorted again,
in case y_ordered_pu does not become decreasing.
y_pu: Resultant load shape in per unit. This is
derived by re-ordering y_ordered_pu2 with respect to their
original rank.
y: Resultant load shape. This is derived by
multiplying y_pu by taget_max / base_max