allocateAvailableAllocate an available amount using priority profiles given by distributions |
![]() |
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
).
Functions.allocatedAmounts(x, vecA, vecC, vecW, pp); Functions.allocatedAmounts(x, vecA, vecC, vecW);
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.. }
allocateUniform, allocateTriangular, allocateNormal, allocateExtremeValue
x |
Type: Real Description: Available amount to be allocated |
---|---|
vecA |
Type: Real[:] Description: Vector of attractiveness (i.e., priority) scores for recipients |
vecC |
Type: Real[size(vecA, 1)] Description: Vector of supply capacities or demand saturation levels |
vecW |
Type: Real[size(vecA, 1)] Description: Vector of width parameters for priority distributions |
pp |
Default Value: PP.uniform Type: PriorityProfiles Description: Priority distribution to be used for allocation |
tolerance |
Default Value: 100 * eps Type: Real |
y |
Type: Real[size(vecA, 1)] Description: Allocated amounts |
---|