.BusinessSimulation.Functions.normalizationConstant

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The output y is the area under a piecewise linear probability distribution function specified by a list of points p1, p2, ... pn.

Syntax

Functions.normalizationConstant({{x1,y1},{x2,y2}, ...});

Implementation


y := 0.0;
for i in 1:n - 1 loop
  y := y + areaLineSegment(plPDF[i], plPDF[i + 1]);
end for;

Examples


normalizationConstant({{1,1},{2,2}});    // 1.5
normalizationConstant({{0,1},{10,1}});   // 10.0

Interface

encapsulated function normalizationConstant
  import ICON = BusinessSimulation.Icons.Function;
  import BusinessSimulation.Functions.areaLineSegment;
  extends ICON;
  input Real[:, 2] plPDF "Piecewise linear probability density function, i.e., { p1, p2, ... }";
  output Real y "Area under the probability density function";
end normalizationConstant;

Revisions


Generated at 2024-12-21T19:25:56Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos