Work item prioritization with external compute - IBM/intelligence-suite-supply-chain-solutions GitHub Wiki
Why prioritize?
Basic functionality of a work item is twofold:
- Attention: Brings forth a specific issue/data that requires user attention.
- Action: Might require the user to act on a resolution mechanism to resolve the issue.
Work queue is a list of related work items - for example, approaching out of stock (AOOS) work queue contains all AOOS work items. Inventory with non-zero on-hand quantity, but less than the defined threshold, gets listed as an AOOS work item.
As there can be tens and even hundreds of unresolved work items, it would be helpful to prioritize the work items based on the severity for efficient resource utilization. The notion of severity varies across organizations, work queues, and even work items. The prioritization logic can be customized by the clients (or third party developers) with external compute and the results can be integrated with SCIS.
This tutorial illustrates the external compute capability for AOOS work queue. In the following, we briefly outline the business logic.
Naive (myopic) solution
A naive solution without external compute for AOOS is to sort the work items based on the shortage of on-hand inventory with respect to the safety stock or threshold.
The above figure shows the prioritization or sorting of AOOS work items with respect to the field quantity below lower threshold. This naive solution essentially uses the on-hand inventory as the severity measure. Instead, one can look into the future and estimate an inventory trajectory, say, for next 30 days. The estimated inventory trajectory would help decision makers to proactively work on resolution mechanisms to preempt any out-of-stock and back orders. We present such a solution that takes into account the supply and demand plans.
Lookahead (non-myopic) solution
Consider the items CO-RD-S282
and CO-RD-R296
with quantity below lower threshold values 60 and 20, respectively. Let us gather the supply plans and the demand plans for next 30 days, and estimate the lookahead inventory.
The lookahead inventory is a projected trajectory of inventory dynamics for next 30 days, which needs to be converted to a priority score, such that the score captures the severity of out-of-stock situations.
We first convert the lookahead inventory into a list of penalties for 30 days. For any given day, the penalty is zero if the lookahead inventory is above the threshold and the penalty increases with the shortage. Next, we use a weighting function that gives more weightage to penalties in near future than to the ones that are further away in time.
We then combine the penalties and weights, and normalize them to get a score between 0 and 100. Higher the score, higher the priority, and hence the severity of out-of-stock.
The above figure illustrates that the item CO-RD-R296
which is relatively safe with respect to current on-hand inventory, has a higher priority score if we take into account the lookahead inventory. If attended to on time, the impending out-of-stock scenarios could be avoided.
Further, the prioritization score is subject to external events that modifies the supply or demand plans. Consider the item CO-RD-S282
with priority score 44. If there is a change in the supply plan by vendor, the prioritization is re-calculated and in the instance shown below, it is increased to 74.
Code, Demo, and Tutorial
The Python notebooks implementing the above prioritization, along with interactive demo and tutorial are available here.
The notebooks can be of help in the following:
- Setting up an external compute environment in Python
- GraphQL queries and mutation to SCIS with
gql
package - Understanding and customizing the priority score computation logic
Prerequisites
- Proficiency in Python notebooks
- Active account in SCIS (for some notebooks)