A physicist view on Operations Research (I) — Generalized Wilson model

Gil-Arnaud Coche
6 min readDec 1, 2020

--

Wilson’s formula is a great tool to find an optimal schedule. It does have one major caveat though: it is only truly valid when the demand rate is constant. When that rate is not constant, the warehouse manager is faced with stock shortage risks or increased storage costs depending on the demand dynamics. That is why I suggest a simple model to circumvent all of these caveats.

In memory of Wilson’s work , I will coin the model Generalized Wilson’s model.

Problem

Say I am the manager of a warehouse. That warehouse stores a good that my company sells to our clients. I have storage and delivery costs. I need to plan my procurement with my suppliers for the next year.

If I order all my projected demand right away, I end up with crazy high storage costs. Invertly, if I ask for too frequent deliveries, my delivery costs sky rocket.

How can I get a trade off that would allow me to minimize my overall costs?

Model

Variables

We consider a time span [0, T] where T is about a year long. The delivery schedule is a set of time deliveries tᵢ and delivered quantities Qᵢ as shown on the figure above. There are (N+1) scheduled deliveries.

The stock level for any given time t is Sₜ and we assume that S₀ = 0. The cost of storing one unit of good for an infinitesimal time dt (a day for example) is γdt and the cost for delivering a quantity Qᵢ is Γ (no matter the quantity).

We also introduce the demand rate in good such dₜ such that for an extended period of span [T1, T2] the total demand is D(T₁, T₂) is the integral of dₜ over the time span.

Finally we make the following hypothesis about the demand rate.

Hypothesis Demand rate is deterministic and perfectly known by the warehouse manager.

Stock dynamics

The stock level is increased at every delivery by Qᵢ and decrease everyday to satify the demand. Therefore its mathematical expression is

Cost function

Now that we have the stock level equation, as the total cost over [0, T] is the sum of the delivery and the storage costs

we can get a more precise expression by replacing the stock level with its mathematical expression

Minimizing costs

Our objective if to minimize the above function while satisfying all the demand. As the demand rate is deterministic and perfectly known by me, the warehouse manager, I can assume that the delivered quantity Qᵢ matches exactly the coming demand until the next procurement.

Therefore the minimization problem is simply

where the optimization variables are the time deliveries tᵢ.

Wilson formula

Operations research is very familiar with the infamous Wilson Formula also known as the Economic Order Quantity. It even has a dedicated wikipedia page.

Let’s try and find it from the minimization problem above.

First, we need to make another hypothesis.

Hypothesis — Demand rate is constant and equal to d⁰.

So the cost function is changed to

Second we need to minimize according to the time deliveries tᵢ the sum. By cancelling the gradient, we can see that the durations between consecutive tᵢ’s are all constant. And after somme algebra we find that the cost function has a very simple expression.

Where D⁰ is the total demand over the period.

Third, we need to find the value of N that minimizes the above term. Some more algebra leads to

and to the Wilson formula

Being able to recoved the Wilson formula with our model is a good sign: it means that the quantities that we have considered are relevant and capture the fundamental aspect of the problem.

We are on the right track, let us now try to solve the problem with a more general demand rate and compare the results to what we would have had with the Wilson model.

Numerical experiment

Say that storing one unit of good for a day costs 40 cents of euros and that a delivery is 3000 euros. Say also that the demand in my good is very high before Xmas, low in fall and spring and medium during the summer sales as shown on the figure below.

The dotted lines are the average daily demand (blue) and the cumulative demand respective to it (red).

This data comes from my imagination and is meant to be realistic. The dotted lines are the demand information that we will use in the computations of the Wilson model.

With scipy’s optimize library, I used this optimizer

to find the optimal schedule of our demand rate. And the results clearly indicate that a closer fit to the demand brings lower costs.

Stock levels for the Generalized Wilson Model (blue) and the Wilson Model (red)

The Generalized Wilson Model suggests three deliveries while the Wilson Model suggests only two deliveries as the figure above shows. It also adjusts better to the varying demand as the stock level drops to zero before a delivery. Using the Wilson schedule, we end up not selling everything before the second procurement inducing unnecessary storage of units of good along the time period. And despite an additional delivery, the Generalized Wilson model has a better cost performance than the Wilson model.

This is the juicy part. If we now calculate the total costs for both strategies, we can assess which one really performs better. Those who are really comfortable with the maths above already know the anwser, but it will not be uninformative to have precise numbers.

For this set of parameters and demand profile, using the strategy of the Wilson model cost of 16 263.74 euros whereas the Generalized Wilson Model gives a storage strategy that costs 13 783.10 euros.

This difference in costs is quite significant and amounts to 15.25 %!

Wrapping Up

This short document demonstrate that with a precise cost model, it is possible to manage efficiently stock levels to satisfy a deterministic demand of a given good. Of course the application presented here is very simplistic however, it is possible to go much further with these same economical fundaments. One could for example:

  • consider the capacity constraint of the warehouse,
  • consider more products,
  • consider more suppliers with different supply prices,
  • consider random effect and the risk of stock shortage,
  • consider other branches of the supply chain, as long as gain and cost functions are correctly written,
  • etc.

--

--

Gil-Arnaud Coche
Gil-Arnaud Coche

Written by Gil-Arnaud Coche

What am I? I am not sure... An engineer? A physicist? A mathematician? What I know is that I terribly enjoy to model stuff.

Responses (1)