functionlogit2D

Mapping two continuous inputs to a binary output through a 2-dimension logistic relation

Extends from Modelica.Icons.Function (Icon for functions).

Information

This function generates a random binary variable with two inputs x1 and x2 from a 2-dimension logistic relation.

The probability of being 1 is calculated from the inputs x1 and x2 from a 2D logistic relation with three predefined parameters A (mutiplier for x1), B (mutiplier for x2) and C (intercept). Then a random generator generates the output, which should be a binary variable.

Inputs

TypeNameDefaultDescription
Realx1The first input variable
Realx2The second input variable
RealA1.0Parameter defining the 2D logistic relation: mutiplier for the first input
RealB1.0Parameter defining the 2D logistic relation: mutiplier for the second input
RealC1.0Parameter defining the 2D logistic relation: intercept
Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState]stateInState of the random number generator

Outputs

TypeNameDefaultDescription
BooleanyBinary variable
Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState]stateOutNew state of the random number generator

Revisions

  • December 6, 2024, by Michael Wetter:
    Refactored implementation of random number calculations, transfering the local state of the random number generator from one call to the next.
    This is for #4069.
  • July 20, 2018, by Zhe Wang:
    First implementation.