.BusinessSimulation.Functions.allocateTriangular

Information

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

The function returns the fraction of capacity or demand that matches the allocated amount of a scarce resource given the clearing attractiveness c, the attractiveness a (e.g., utility), and the width w of a triangular distribution function that describes the priority profile for the recipient.


Graph of the allocateTriangular Function (Distribution Shown Scaled for Clarity)
Graph.svg

Syntax


Functions.allocateTriangular(c, a, w);

Examples


Functions.allocateTriangular(3.5, 5, 3); // 1.0
Functions.allocateTriangular(5.0, 5, 3); // 0.5
Functions.allocateTriangular(6.5, 5, 3); // 0.0

See also

allocateUniform, allocateNormal, allocateExtremeValue

Interface

encapsulated function allocateTriangular
  import ICON = BusinessSimulation.Icons.Function;
  extends ICON;
  input Real x "Clearing attractiveness";
  input Real a "Attractiveness of recipient";
  input Real w "Width of distribution (i.e., span of the triangular distribution)";
  output Real y "Fraction of total capacity or demand allocated to the recipient";
end allocateTriangular;

Revisions


Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos