The Newsvendor model is an abstraction of a problem of industrial inventory management.
A retailer sells seasonal items. The relatively short duration for sales coupled with the order lead time makes it impossible to acquire new inventory once the season has started. Inventory must be purchased for the upcoming season. On the one hand, too much inventory will have to be sold off at the end of the season at deeply discounted prices. On the other hand, too little inventory will result in lower revenues. A balance must be struck.
Here are relevant data for this example:
The first step is to record the problem’s parameters:
P = 600; // per unit wholesale price
m = 0.25; // per unit retail markup factor
s = 0.10; // per unit salvage markdown factor
dMIN = 20; // lower limit on demand
dMAX = 40; // upper limit on demand
The next step is to define key economic variables, namely, realized profit, revenue and cost.
Realized profit equals Revenue less Cost, and depends on the inventory ordered at the beginning of the season (Q) and the realized demand (d):
Profit(Q, d) = Revenue(Q, d) - Cost(Q);
Revenue accrues from two sources, sales that occur during the season, and salvage sales that occur at the end of the season:
Revenue(Q, d) = seasonSales(Q, d) + salvageSales(Q, d);
seasonSales(Q, d) = (1+m)*P*min(Q, d);
salvageSales(Q, d) = s*P*max(Q-d, 0);
Cost is merely the wholesale price multiplied by the number of units ordered:
Cost = P*Q;
To compute the profit for all values of demand in the forecast range,
private profitResults = collect (d = 20 to 40) {Profit(30, d)};
Click here to view the Hava program created so far.
We choose the inventory quantity Q to maximize a suitable objective function, for example, expected profit.
Since demand is uniformly distributed between its lower and upper limits,
private prob(d) = 1/(dMAX - dMIN +1);
expected profit can be written as:
expectedProfit(Q) = sum(d = dMIN to dMAX) {Profit(Q, d)•prob(d)};
Click here to see the code created so far. To calculate the expected profit for the midpoint policy,
midpointExpectedProfit = expectedProfit(30);
Finding the optimal policy can be computed with this Hava statement:
optQ = argmax(Q = dMIN to dMAX) {expectedProfit(Q)};
optExpectedProfit = expectedProfit(optQ);
Click here to see the code created so far.
You can now use this Hava program to answer such questions as:
This Hava program can be modified to solve these extensions of the basic problem.
private prob(d) = exp(-lambda)*lambda^d/factorial(d);
private factorial(n) = if (n>0) {n*factorial(n-1)} else {1};