EM {RM2} | R Documentation |
EM
unconstrains demand data in quantity-based revenue management.
EM(demand = demand, eps = 0.005)
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. |
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.
param |
parameters of demand distribution |
niter |
number of iterations |
demand |
unconstrained demand vector |
history |
parameter convergence history |
Tudor Bodea tudor.bodea@ihg.com
Dev Koushik dev.koushik@ihg.com
Mark Ferguson mark.ferguson@mgt.gatech.edu
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).
# 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)