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.


function binaryVariableGeneration
  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;


Generated at 2021-04-18T01:03:03Z by OpenModelicaOpenModelica 1.18.0~dev-228-gf450566 using GenerateDoc.mos