.BusinessSimulation.Functions.allocatedAmounts

Information

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

The function returns the allocated amounts of a scarce resource given the clearing attractiveness x, the vector of attractiveness scores vecA (i.e., utilities/priorities), the vector of available capacities or demand saturation levels vecC, the vector of widths vecW, and the type of priority distribution used for allocation pp (default = PriorityProfiles.uniform).

Syntax


Functions.allocatedAmounts(x, vecA, vecC, vecW, pp);
Functions.allocatedAmounts(x, vecA, vecC, vecW);

Examples


Functions.allocatedAmounts( 6.5, {10, 6}, {10, 20}, {2,2},PriorityProfiles.uniform      ); // { 10.0, 5.0 }
Functions.allocatedAmounts( 6.5, {10, 6}, {10, 20}, {2,2},PriorityProfiles.triangular   ); // { 10.0, 2.5 }
Functions.allocatedAmounts( 6.5, {10, 6}, {10, 20}, {2,2},PriorityProfiles.normal       ); // { 10.0, 1.3361.. }
Functions.allocatedAmounts( 6.5, {10, 6}, {10, 20}, {2,2},PriorityProfiles.extremeValue ); // { 10.0, 2.4589.. }

See also

allocateUniform, allocateTriangular, allocateNormal, allocateExtremeValue

Interface

encapsulated function allocatedAmounts
  import PP = BusinessSimulation.Types.PriorityProfiles;
  import ICON = BusinessSimulation.Icons.Function;
  import BusinessSimulation.Functions.{allocateUniform,allocateTriangular,allocateNormal,allocateExtremeValue};
  extends ICON;
  input Real x "Clearing attractiveness";
  input Real[:] vecA "Vector of attractiveness (i.e., priority) scores for recipients";
  input Real[size(vecA, 1)] vecC "Vector of supply capacities or demand saturation levels";
  input Real[size(vecA, 1)] vecW "Vector of width parameters for priority distributions";
  input PP pp = PP.uniform "Priority distribution to be used for allocation";
  output Real[size(vecA, 1)] y "Allocated amounts";
end allocatedAmounts;

Revisions


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