Supply Chain Calculations
These functions are designed specifically to handle supply chains.
Function | Notes |
---|---|
storage([incoming], [outgoing], [opening]) |
Creates a storage node that, for each time period, both adds (incoming ) and removes (outgoing ) from the storage. The opening balance at time t = 0 is specified using opening |
storageavailable([storagenode]) |
The storage available for the time period (i.e. the opening value + the incoming value) |
storageclosing([storagenode]) |
The closing value of the time period (i.e. the available value - the outgoing value) |
storageopening([storagenode]) |
The opening value for a time period (i.e. the same as yesterday’s closing value) |
Arrays can be used with storage nodes. The limitation is that the arrays must be the same dimensions. The names of the array rows must match (e.g. row 0 is Product 1 and Product 1, row 1 is Product 2 and Product 2… etc) in both arrays, and the names of the first column must match (e.g. Tonnes and Tonnes).
Using Arrays and Storage Nodes
Arrays can be used in combination with storage nodes to keep track of multiple products and their descriptive quantities, such as tonnes and grade (i.e. keeping track of analytes). Storage nodes expect nodes as input, meaning inputs cannot be array values. Therefore incoming, outgoing, and opening must be separate arrays (and therefore nodes).
The following image shows an example of an opening values array which contains two products each with two analytes:
In this example, the calculation node contains multiple arrayrow()
entries with each corresponding to a product and its quantities:
This can be repeated for both incoming and outgoing arrays. All three arrays can then be input into the storage node for calculations to occur.