Use Case Retail

Sales-Driven Unit Distribution

The model addresses the problem of distributing 𝑋 units across multiple categories to each store in such a way that the resulting stock ratios after the shipment closely resemble the sales ratios from the previous day. The primary objective is to maintain a balanced stock distribution across categories by minimizing both excess and shortfall, while striving to preserve the desired sales-based ratios.

In cases where there are insufficient units available in some categories, the model prioritizes sending 𝑋 units to ensure that the store maintains a non-empty stock. However, to avoid overstocking in other categories, the model imposes a sobreratio constraint. This constraint ensures that the post-shipment stock ratio for each category does not deviate excessively from the target sales ratio and is capped at a predefined threshold, such as a 10% deviation.

Challenges

It seems a simple optimization equation, but there are several potential challenges:

Stock shortages

Ensuring sufficient inventory allocation while avoiding empty stock situations in stores with high demand.

Incomplete or outdated sales ratio

Relying on historical sales data that may not accurately reflect real-time demand fluctuations, leading to imbalanced distribution.

Tuning the sobreratio threshold

Defining an optimal deviation threshold that prevents excessive stock imbalance without negatively impacting sales performance.

Solution

We initially defined the mathematical objective function to minimize. First, we implemented a linear approach using IBM ILOG CPLEX.
Subsequently, we developed a quadratic formulation that ensures the sobreratios are consistent across categories, meaning we avoid large discrepancies such as 15% and 5% deviations, and instead aim for balanced deviations like 10% and 10%.

This quadratic approach improves uniformity in stock distribution across categories. Finally, we integrated this process into the API used by our client, which calculates the number of units to send to each store.

Tech stack

Results

Currently, the implementation is still in progress, and we have not yet defined or gathered any key performance indicators (KPIs).

We have been testing the solution times of various optimization solvers, with a preference for using an open-source solver.

The integration tests that we designed have been successfully passed.

Let’s stay in touch !