The Allocator element doesn't support non-scalar data types. This means you would have to create multiple Allocator elements for each item of an array input, which would be very cumbersome. This model includes a looping Container ("Looping_Method") performing the same functionality of an Allocator element except that it works with a Vector data type for the amount to be allocated.
The first step is to determine how many demands you will use. This model uses 4: Demands[1], Demands[2], Demands[3] and Remainder. The first 3 are defined using a matrix Data element and the Remainder is calculated by GoldSim. Since we have 4 demand fractions, we must also define an Array Label Set with 4 items in it (called "Allocations"). Each of our Split entries consists of 4 values as does the Amount we are allocating. You can add more demand items to the script by editing the array label set called "Set1."
Included in this example is a container called "Testing" where multiple allocators are constructed for the first two rows of input data. Expression elements compare then compares results with the looping container allocator method.
Comments
0 comments
Please sign in to leave a comment.