.Buildings.Occupants.BaseClasses.linear1D

Information

This function generates a random binary variable with the input of a continuous variable x from a linear relation.

The probability of being 1 is calculated from the input x with the slope A and the intercept B. Then a random generator generates the output, which should be a binary variable.

Interface

function linear1D
  extends Modelica.Icons.Function;
  input Real x "Continuous variable";
  input Real A = 1 "Slope of the linear function";
  input Real B = 0 "Intercept of the linear function";
  input Integer globalSeed "Seed for the random number generator";
  output Boolean y "Binary variable";
end linear1D;

Revisions


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