<< Chapter < Page | Chapter >> Page > |
An electronic store stocks a certain type of DVD player. At the end of each week, an order is placed for early delivery the following Monday. A maximum of fourunits is stocked. Let the states be the number of units on hand at the end of the sales week: . Two possible actions:
Units sell for $200. If demand exceeds the stock in hand, the retailer assumes a penalty of $40 per unit (in losses due to customer dissatisfaction, etc.).Because of turnover, return on sales is considered two percent per week, so that discount is on a weekly basis.
In state 0, there are three possible actions: order 0, 2, or 4. In states 1 and 2 there are two possible actions: order 0 or 2. In states 3 and 4, the only actionis to order 0. Customer demand in week is represented by a random variable . The class is iid, uniformly distributed on the values 0, 1, 2, 3, 4. If X n is the state at the end of week n , then is independent for each n .
Analyze the system as a Markov decision process with type 3 gains, depending upon current state, action, and demand. Determine the transition probability matrixPA (properly padded) and the gain matrix (also padded). Sample calculations are as follows:
For state = i , action = a , and demand = k , we seek
Data file
% file orderdata.m
% Version of 4/5/94% Data organized for computation
type = 3;states = 0:4;
= [0 2 4 ... % Actions (padded)0 2 02 ...
0 2 02 ...0 00 00 ...
0 00 00];
C = [0 -300 -480 ... % Order costs (padded)0 -300 -300 ...
0 -300 -300 ...0 0 0 ...
0 0 0];
SP = 200; % Selling priceBP = 40; % Backorder penalty
PD = 0.2*ones(1,5); % Demand probabilities
The procedure
% file reorder.m
% Version of 4/11/94% Calculates PA and GA for reorder policy
states = input('Enter row vector of states ');A = input('Enter row vector A of actions (padded) ');
C = input('Enter row vector C of order costs (padded) ');D = input('Enter row vector D of demand values ');
PD = input('Enter row vector PD of demand probabilities ');SP = input('Enter unit selling price SP ');
BP = input('Enter backorder penalty cost BP ');m = length(states');
q = length(A);na = q/m;
N = length(D);S = ones(na,1)*states;
S = S(:)';[d,s] = meshgrid(D,S);a = A'*ones(1,N);
ca = C'*ones(1,N);TA = (s + a - d).*(s + a - d>= 0);
for i = 1:qPA(i,:) = tdbn(states,TA(i,:),PD);
endPA
GA = ca + SP*d - (SP + BP)*(d -s -a).*(d>s+a)
Notification Switch
Would you like to follow the 'Topics in applied probability' conversation and receive update notifications?