Please enable JavaScript to view this site.

Vensim Help

One-to-many allocation takes a fixed quantity, the amount available, and allocates it to a number of requesters.  It can be used to allocate a fixed demand among suppliers, and to allocate a fixed supply among demanders.  If you do not want either one of the demand or supply to be fixed you should look at the section on many-to-many allocation, which allows both supply and demand to vary.

The Vensim function for one-to-many allocation is ALLOCATE AVAILABLE.  This function is a generalization of the older ALLOCATE BY PRIORITY (which is itself an alternative implementation of the original functions MARKETP and ALLOC P).  It takes as its argument the quantity available, the amounts requested, and priority profiles of the requesters that will be used to do the allocation should the amounts requested not be satisfied with what is available.

Though there are only 3 arguments to the ALLOCATE AVAIALBLE function, the priority profiles are passed with an additional subscript as described in the previous section.  

To illustrate the use of ALLOCATE AVAILABLE consider the case where a store needs to allocate its available supply to different branches.  

branch : Boston,Dayton,Fresno

pprofile : ptype, ppriority, pwidth, pextra

demand[Branch] = 500,300,750 

Units: Widget/Month

priority[Boston,pprofile] = 1,5,2,0

priority[Dayton,pprofile] = 1,7,4,0

priority[Fresno,pprofile] = 1,3,4,0

Units: Dmnl

Shipments[branch] = ALLOCATE AVAILABLE(demand[branch],
       priority[branch,ptype],supply available)

Units: Widget/Month

Notice that the priority argument is passed with the first subscript element ptype and not the subscript range pprofile.  The other elements of ppriority will be referenced internally by the function, but because ppriority does not appear on the left, it can’t appear on the right.  

If supply available ramps from 0 to 2000 then the resulting allocations appear as:

If we change ptype to be 3, and cut the pwidth elements to ½ of their values for all of the branches, we would get:

By experimenting with the priorities, shapes and widths you should be able to get something that meets your needs.

Multiple Subscripts

You can use ALLOCATE AVAILABLE with multiple subscripts, but the additional subscripts must all come before those active in the allocation.  For example, suppose that for the above example there are 5 different items that need to be allocated.  We would modify the above equations to:

branch : Boston,Dayton,Fresno

pprofile : ptype, ppriority, pwidth, pextra

item : (i1-i4)

demand[item,Branch] = 500,300,750;
                               50,30,40;
                               10,100,10;
                               20,1,40;

Units: Widget/Month

priority[Boston,pprofile] = 1,5,2,0

priority[Dayton,pprofile] = 1,7,4,0

priority[Fresno,pprofile] = 1,3,4,0

Units: Dmnl

Shipments[item,branch] = ALLOCATE AVAILABLE(
demand[item,branch],priority[branch,ptype],
supply available[item])

Units: Widget/Month

Note that the priority values do not depend on the item.  If you wanted them to depend on item you would need equations such as

priority[i1,Boston,pprofile] = 1,5,2,0

and so on.  

In the above example the subscript order item,branch is not the natural subscript order.  Normally big things come first, then small things so branch,item would be a more common choice.  However, if you use the subscript order branch,item it won’t work.  You can use this in other model variables but not in the input to the ALLOCATE AVAILABLE function and not for the result.

ALLOCATE BY PRIORITY

The ALLOCATE BY PRIORITY function behaves the same way as the ALLOCATE AVAILABLE function except that there is no choice on shape, priority is passed as a vector on the subscript being allocated across and the width is passed as a single parameter common across all subscripts.  While this function will continue to be supported for backward compatibility, its use is not recommended.