Skip to Main Content Skip to Search
Product Documentation

se_randomizeseeds - Randomize seeds

Syntax

se_randomizeseeds(obj,Name,Value)
se_randomizeseeds(obj,'Mode','All',Name,Value)
se_randomizeseeds(obj,'Mode','Identical',Name,Value)
se_randomizeseeds(obj,'Mode','SpecifySeeds',sv,Name,Value)

Description

se_randomizeseeds(obj,Name,Value) or se_randomizeseeds(obj,'Mode','All',Name,Value) assigns the seeds of all SimEvents blocks that use random number generators within blocks indicated by obj. If obj represents a system or subsystem, the function assigns seeds in subsystems of obj at any depth. Zero or more Name,Value pair arguments specify additional options. Unless the syntax includes the GlobalSeed option, the new seeds are unique in the system obj.

se_randomizeseeds(obj,'Mode','Identical',Name,Value) assigns only those seeds in the system or subsystem obj that appear multiple times in obj.

se_randomizeseeds(obj,'Mode','SpecifySeeds',sv,Name,Value) assigns only those seeds whose current value appears in the vector sv.

Tips

Input Arguments

obj

Location of seeds to assign. obj is either a string representing a system name, subsystem path name, or block path name, or a cell array of such strings.

sv

Vector of seed values. Each number is an integer between 0 and 232–1.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'GlobalSeed'

For a given value, the function generates seeds in a repeatable way, assuming that the underlying systems or blocks specified in obj do not change. To ensure repeatability, this syntax does not guarantee uniqueness of generated seed values. The value of this option is a nonnegative integer.

'Verbose'

Indicates whether the function explicitly reports the status of each seed assignment. Values are 'on' and 'off'.

Default: 'off'

See Also

se_getseeds | se_setseeds

Tutorials

  


Free Discrete Event Simulation Technical Kit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS