Syntax
state = Utilities.initialStateWithXorshift6star(localSeed, globalSeed, nState);
Description
The Xorshift64star
random number generator is used to fill a state vector of length nState (nState ≥ 1) with random numbers and return
this vector. Arguments localSeed and globalSeed are any Integer numbers (including zero or negative number)
that characterize the initial state.
If the same localSeed, globalSeed, nState is given, the same state vector is returned.
Example
parameter Integer localSeed;
parameter Integer globalSeed;
Integer state[33];
initial equation
state = Utilities.initialStateWithXorshift64star(localSeed, globalSeed, size(state,1));
function initialStateWithXorshift64star
import Modelica.Math.Random.Generators.Xorshift64star;
extends Modelica.Icons.Function;
input Integer localSeed "The local seed to be used for generating initial states";
input Integer globalSeed "The global seed to be combined with the local seed";
input Integer nState(min = 1) "The dimension of the state vector (>= 1)";
output Integer[nState] state "The generated initial states";
end initialStateWithXorshift64star;
Date | Description |
June 22, 2015 |
|
Generated at 2024-11-21T19:25:40Z
by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos