perturbedBy

fun perturbedBy(stepSize: Double, rnStream: RNStreamIfc = KSLRandom.defaultRNStream()): InputMap(source)

Perturbs the current input values by the supplied step size. Each input is randomly increased or decreased by the step size. The likelihood of increasing or decreasing the value is equally likely.

If the perturbation causes the value to be outside the defined input range, then the closest bound is used as the value. If the step size is less than the granularity for the input, then the granularity is used as the step size. The returned InputMap should be input range-feasible but may not be feasible with respect to linear or functional constraints.

Return

a new InputMap based on the current input map

Parameters

stepSize

the amount of the perturbation. Must be greater than 0.0

rnStream

the stream to use in randomly choosing the direction of the step