# Simple inventory control with stochastic demand

There is a factory that produces one unit of stock uniformly so that $$q$$ units of stock are produced during a day. The warehouse near a factory has the maximal capacity of $$q$$ items, i.e. a daily production. We assume if at any given time there is an excess inventory of stock - it is destroyed. At the beginning of a day the warehouse holds $$q$$ units of stock.

There is a stochastic demand for a stock that follows a Poisson process with an intensity that is a function of premium $$\delta$$ we charge for the item. For simplicity, each time there is a demand - it is for one unit. We know how the intensity depends on the charged premium and this is a convex and decreasing function in premium.

We control the premium and may change it at any time. We need to find a schedule that solves the following optimisation problem.

$$\delta_t = argmax_\delta( \mbox{number of items sold during a day})$$ such that $$q_t > 0, \mbox{for all t}$$

where $$q_t$$ is the inventory of a warehouse at time $$t$$. I.e. we want to sell as much items as possible never running out of the inventory at a warehouse. The time horizon for this optimisation problem is one day. We assume factory refills the warehouse at night.

How one would approach this problem? If the condition on the warehouse capacity is an issue I am ok to add it to the objective function as a penalty term. Also, if there is a mathematically sound heuristic solution - this is also fine.

• Welcome to OR.SE. As you mentioned produces one unit of stock uniformly so that q units of stock are produced during a day, you do have a hard constraint to replenish the warehouse smoothly during the day. It means that you cannot deliver the products more than the replenishment quantity of the warehouse. Would you say please, how you have faced the inventory shortage if the mean of the demand (Poisson function) might be greater than the mean of refilling the warehouse? Jan 23, 2022 at 8:21
• I think it is important to explain our real use case for this problem. We have a critical 3rd party API connection that has a limit on the number of requests per second. When we initiate a connection with this API we are given say 100 requests. Every second one request is added to our limit but this number cannot be more than 100. When users want to view data from this API we can decide to show them an outdated data or use one request from our limit. We do not know when users request this data so this is safely to assume that these users requests have exponentially distributed interarrivals Jan 23, 2022 at 14:30
• When we deplete our limit the third party API will ban us for 10 minutes therefore this must not happen. And naturally we want to serve our users the most relevant data we can. Jan 23, 2022 at 14:33
• I am not sure understand your problem, as it is most likely referred to software engineer. But, As a statistical overview, you could try depicting the appropriated distribution function of your data by the curve fitting method to estimate which function really fits your data. After that, you could simulate your queue system w.r.t. this information for interpreting the noisy intervals that you want. I hope it helps. Jan 25, 2022 at 5:51
• Can you explain the "premium" more? Wouldn't you like to assign values (e.g., group of customers, or types of request) to requests in the objective? In the current problem, what keeps you away from setting the premium to zero, driving maximum demand, selling "fresh" output when remaining capacity is positive and "stale" output otherwise? I believe there should be 1) a value per sales (e.g., premium) and cost of providing a stale output or 2) a target service level, possibly agreed by contract. Jan 25, 2022 at 19:46