EM: Unconstrain the demand using the Expectation-Maximization...

Description Usage Arguments Details Value Author(s) References Examples

Description

EM unconstrains demand data in quantity-based revenue management.

Usage

1
EM(demand = demand, eps = 0.005)

Arguments

demand

demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained.

eps

small number used as the stopping criterion. The default value is 0.005.

Details

EM unconstrains demand data in quantity-based revenue management. The observed demand entries, some of which are constrained because the product class was closed, are assumed to be realizations from an underlying normal distribution with mean μ and standard deviation σ. The objective is to find the parameters μ and σ of this underlying demand distribution.

Value

param

parameters of demand distribution

niter

number of iterations

demand

unconstrained demand vector

history

parameter convergence history

Author(s)

Tudor Bodea tudor.bodea@ihg.com
Dev Koushik dev.koushik@ihg.com
Mark Ferguson mark.ferguson@mgt.gatech.edu

References

Talluri, K. T. and Van Ryzin, G. (2004) The Theory and Practice of Revenue Management. New York, NY: Springer Science + Business Media, Inc. (Pages 474–477).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# SPECIFY THE SEED
set.seed(333)
# SPECIFY REAL PARAMETERS OF THE DEMAND DISTRIBUTION
rmean <- 20
rsd <- 4
nrn <- 20
# GENERATE REAL DEMAND
rdemand <- round(rnorm(nrn, rmean, rsd))
# GENERATE BOOKING LIMITS
bl <- round(rnorm(nrn, rmean, rsd))
# GENERATE OBSERVED DEMAND
demand <- rdemand * (rdemand <= bl) + bl * (rdemand > bl)
# IDENTIFIED PERIODS WITH CONSTRAINED DEMAND: 1 - CONSTRAINED DEMAND
names(demand) <- as.character(as.numeric(rdemand>bl))
demand
# UNTRUNCATE DEMAND
EM(demand)
EM(demand, eps=0.005)
EM(demand, eps=0.00005)
# MODIFY DEMAND VECTOR - NO CONSTRAINED INSTANCES ARE OBSERVED
names(demand) <- rep(0, length(demand))
# ATTEMPT TO UNTRUNCATE THE DEMAND
EM(demand, eps=0.005)

Example output

Loading required package: msm
 1  1  0  1  0  0  0  0  0  1  0  0  0  0  0  1  0  0  1  1 
17 24 12 20 14 19 25 23 21 11 16 17 20 18 17 18 21 20 18 13 
$param
[1] 19.83  3.73

$niter
[1] 7

$demand
    1     1     0     1     0     0     0     0     0     1     0     0     0 
21.27 25.88 12.00 22.92 14.00 19.00 25.00 23.00 21.00 19.92 16.00 17.00 20.00 
    0     0     1     0     0     1     1 
18.00 17.00 21.75 21.00 20.00 21.75 20.12 

$history
   Mean StDev
1 18.69  3.43
2 19.56  3.65
3 19.76  3.69
4 19.81  3.71
5 19.82  3.73
6 19.83  3.73
7 19.83  3.73

$param
[1] 19.83  3.73

$niter
[1] 7

$demand
    1     1     0     1     0     0     0     0     0     1     0     0     0 
21.27 25.88 12.00 22.92 14.00 19.00 25.00 23.00 21.00 19.92 16.00 17.00 20.00 
    0     0     1     0     0     1     1 
18.00 17.00 21.75 21.00 20.00 21.75 20.12 

$history
   Mean StDev
1 18.69  3.43
2 19.56  3.65
3 19.76  3.69
4 19.81  3.71
5 19.82  3.73
6 19.83  3.73
7 19.83  3.73

$param
[1] 19.83  3.74

$niter
[1] 12

$demand
    1     1     0     1     0     0     0     0     0     1     0     0     0 
21.27 25.88 12.00 22.92 14.00 19.00 25.00 23.00 21.00 19.92 16.00 17.00 20.00 
    0     0     1     0     0     1     1 
18.00 17.00 21.75 21.00 20.00 21.75 20.12 

$history
    Mean StDev
1  18.69  3.43
2  19.56  3.65
3  19.76  3.69
4  19.81  3.71
5  19.82  3.73
6  19.83  3.73
7  19.83  3.73
8  19.83  3.74
9  19.83  3.74
10 19.83  3.74
11 19.83  3.74
12 19.83  3.74

[1] "Warning: All demand instances are unconstrained"

RM2 documentation built on May 2, 2019, 9:23 a.m.

Related to EM in RM2...