WOLFRAM SYSTEM MODELER

initialStateWithXorshift64star

Return an initial state vector for a random number generator (based on xorshift64star algorithm)

Wolfram Language

In[1]:=
SystemModel["Modelica.Math.Random.Utilities.initialStateWithXorshift64star"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

Syntax

state = initialStateWithXorshift64star(localSeed, globalSeed, nState)

Inputs (3)

localSeed

Type: Integer

Description: The local seed to be used for generating initial states

globalSeed

Type: Integer

Description: The global seed to be combined with the local seed

nState

Type: Integer

Description: The dimension of the state vector (>= 1)

Outputs (1)

state

Type: Integer[nState]

Description: The generated initial states

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