Creates an automatic local seed from the instance name
Syntax
seed = Utilities.automaticLocalSeed(path);
Description
Returns an automatically computed seed (Integer) from the hash
value of the full path name of an instance (has to be inquired in
the model or block where this function is called by
getInstanceName()). Contrary to automaticGlobalSeed(), this is a
pure function, that is, the same seed is returned, if an identical
path is provided.
Example
parameter Boolean useAutomaticLocalSeed = true;
parameter Integer fixedLocalSeed = 10;
final parameter Integer localSeed = if useAutomaticLocalSeed then
automaticLocalSeed(getInstanceName())
else
fixedLocalSeed;
See also
automaticGlobalSeed.
function automaticLocalSeed
input String path "Full path name of the instance (inquire with getInstanceName())";
output Integer seed "Automatically generated seed";
end automaticLocalSeed;
| Date |
Description |
| June 22, 2015 |
|
Generated at 2026-04-02T18:18:35Z by OpenModelicaOpenModelica 1.26.3 using
GenerateDoc.mos