randomizeInputVariable

fun randomizeInputVariable(rnStream: RNStreamIfc = KSLRandom.defaultRNStream(), name: String = problemDefinition.randomInputName(rnStream)): InputMap(source)

Randomly generates a new value for the named input variable and returns a new input map. Randomization is uniformly distributed over the range of the input variable with no memory of its current value.

Return

the newly created instance

Parameters

rnStream

the stream to use when generating random points within the input range space. By default, this uses the default random number stream KSLRandom.defaultRNStream

name

the name of the input variable to randomize. Must be a valid name for the input map and thus for the problem. The default is a randomly selected name from the problem using the supplied random number stream.