diff --git a/Buildings/Occupants/BaseClasses/binaryVariableGeneration.mo b/Buildings/Occupants/BaseClasses/binaryVariableGeneration.mo
index e5b614fdacd..0e2f8fbc581 100644
--- a/Buildings/Occupants/BaseClasses/binaryVariableGeneration.mo
+++ b/Buildings/Occupants/BaseClasses/binaryVariableGeneration.mo
@@ -1,10 +1,11 @@
within Buildings.Occupants.BaseClasses;
function binaryVariableGeneration "Binary variables random generator"
+ 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";
protected
- Integer localSeed "Local seed";
+ Integer localSeed = 0 "Local seed";
Integer state[Modelica.Math.Random.Generators.Xorshift1024star.nState];
Real r(min=0, max=1) "Generated random number";
algorithm
@@ -24,6 +25,11 @@ Higher p
indicates a higher chance of generating true
.