.Modelica.Math.Random.Utilities.initialStateWithXorshift64star

Information

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));

Interface

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;

Revisions

Date Description
June 22, 2015
DLR logo Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f