.Buildings.Occupants.BaseClasses.binaryVariableGeneration

Information

Function that generates a random binary variable with the input of probability p.

The input p denotes the probability of being true. Higher p indicates a higher chance of generating true.

Interface

function binaryVariableGeneration
  extends Modelica.Icons.Function;
  input Real p(min = 0, max = 1) "Probaility of 1";
  input Integer globalSeed "Seed for the random number generator";
  output Boolean y "Random number";
end binaryVariableGeneration;

Revisions


Generated at 2024-04-25T18:15:59Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos