Context: I am a CS student currently in a non-CS internship (logistics, supply chain).
My manager wants to leverage my knowledge of programming to build a program to solve the following problem:
As a company, we have different units of product that we have to distribute to our stores. Some stores are good at selling, others not so much. Sometimes, we don't have enough of our product to give every store what they need, therefore, we have to decide where to send the product so that it sells as fast as possible / makes the most profit. So the inputs would be the historical and current data of the performance of each store, as well as how many units we want to distribute and the output would be how many units to allocate in each store.
My approach is the following: Using historical data, use scipy.curve_fit
function to fit the data of each store to a distribution (how do I pick which distribution to fit?) with sales and level of inventory for a day as the axis for each store. Then, from this function, construct a multi variable global profit function, and then maximize this function with the constraints (how many units we have to distribute) using scipy.optimize
.
So for example, if we decide that a simple square root function fits our data the best, and after using scipy.cure_fit
we estimate that for store A Profit = $2\sqrt{3x}$ and for Store B Profit = $5\sqrt{y}$, where $x$ and $y$ are the number of units in each store, then the global profit function would be Profit = $2\sqrt{3x} + 5\sqrt{y}$. If we only have 500 units to allocate for example, then we have to optimize the function $2\sqrt{3x} + 5\sqrt{y}$ with the constraint that $x + y \leq 500$.
My questions:
Does my general approach make sense? Is there a better way to approach this?
scipy.curve_fit
takes a distribution for fitting. What is the best way to pick a distribution given my data?In my approach, I use SciPy a lot. Are there other technologies that would be better to use?
How can I include lead time (time for the product to get to the store) in this model?
Would Machine Learning be of possible use here? My manager is interested in ML and I think it would be kinda cool to include it somehow.