at my company, we have a product level forecast that we run through a model which pulls out an hours number for our retail outlets.

We do this by binning various products into categories and give them a time value lets call this tmv (timed minute values). So product coffee gets a tmv of 0:50 s per quantity.

we then do a simple product * tmv and aggregate up while accounting for certain constraints, such as minimum hours required to run a shop floor, management hours and so forth.

when I inherited this beast, it was all written in excel which I ported into SQL and Python, although a lot of work has gone into it, there is little statistical modeling, optimization, or basic ML applied. Although, I'm not sure what could be done to better optimize this.

I wonder what more to-date tech companies do to allocate their work-force in a retail environment.


This problem can be converted to a mathematical model and be solved using the approaches which are admissible with respect to the conditions of the problem. Generally, in optimization, limited resources allocated to some demands while optimizing (minimizing/maximizing) the objective function. So to successfully model your problem you need to verify the followings:

  • Variables (can be the number of a specific product to be produced)
  • Constraints ( demands should be satisfied, limitations on the available resources)
  • The objective function (Maximizing the profit, minimizing the wasted time on the production line, etc.)

After defining the mentioned concepts, the mathematical model, which needs to cover as many details as it can, should be written. The solving approach depends on the type of objective function and constraints that you have in the model. In this link, you can find a set of examples for mathematical modeling of real-life problems.

| improve this answer | |
  • 1
    $\begingroup$ This is awesome, I'll have a read of that now. I'll leave the question open for now to see if anyone else is able to add any value. Thanks Oguz! $\endgroup$ – Datanovice Jul 20 '19 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.