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 or decrease with a sigmoid pattern.
The sigmoid function is a transformed version of
$$
f(x)=\frac{L}{1 - exp(-k(x-x_0))}
$$
Parameter \(k\) is shape parameter, shaping the
"sigmoidness" of the function. Larger value of k
indicates more steepness in the function and lower value
results in changes in multipliers in more linear fashion.
Location parameter \(x_0\) controls the inflection point
of the function and derived from inf_pos.
inf_pos = 0.5 indicates the inflection point of
the sigmoid multipliers is halfway.
The \(L\) parameter in the sigmoid is numerically solved.
The number of iterations is equal to the iter argument,
optimized based on the minimum difference between the derived
and target load factor.
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