Newsvendor Model in Rail Contract to Transport Gasoline in Thailand
Kannapha Amaruchkul
Graduate Program in Logistics Management, School of Applied Statistics,
National Institute of Development Administration (NIDA), Bangkok, Thailand
Keywords:
Newsvendor model, Rail freight, Stochastic Model Applications in logistics management.
Abstract:
A long-term contract between a railroad company and a shipper who wants to transport gasoline daily is
studied. The contract specifies an upfront payment for reserving bogies and a per-container freight rate. The
shipper also uses a trucking company to transport the excess demand, but its per-liter transportation cost
is higher. The shipper’s problem is to determine the number of bogies to reserve at the beginning of the
contract duration, before daily demand is revealed. Since demand is perishable, we formulate the problem as
a newsvendor model. The expected cost function is not convex. We show that the expected cost is unimodal
and derive an optimal solution under certain conditions, which are not very restrictive. We also provide a
sensitivity analysis with respect to the change in the contract parameter.
1 INTRODUCTION
Global demand for gasoline and diesel continue to
grow over the next few decades (Organization of the
Petroleum Exporting Countries (OPEC), 2013). Pop-
ulation growth is one of the key drivers in growing
demand for transportation and motor gasoline con-
sumption (Energy Information Administration (EIA),
2008). The supply chain for fuel starts from crude oil
sources and ends at gas stations, passing through re-
finery factories and storages (e.g., tank farms, depots,
terminals, and so on). From the distribution centers
to gas stations, gasoline and diesel can be transported
through road, rail, or pipeline if exists.
Pipeline is environment-friendlyand always avail-
able all year round 24-7-365 with high service level
at a relatively low cost. Products are delivered on
time via pipelines, because the flows can be contin-
uously monitored and controlled by a computer, and
they are not affected by weather or climate conditions.
Spills or product losses are minimal, compared to
trucks or trains. Accidents involving trucks or trains
with petroleum products are fairly common. Never-
theless, in some developing countries, e.g., Thailand,
pipelines for refined products are not extensive and
cover only a limited geographic area. In this article,
pipeline is not considered.
In Thailand, gasoline and diesel are transported
among regional depots by road or rail. Rail is better
for the environment, produces less greenhouse emis-
sion gas, and the transportation cost is usually lower.
On the other hand, road usually allows faster speed,
better delivery consistency, and less product losses.
A rail company serves both passengers and cargo
shippers/freighters. Bogies (under-carriage assem-
blies commonly referred to as trucks” in US) are
needed for both cargo tanks and passenger rail cars.
When there are not enough bogies for both, the rail
company often allocates bogies first to the passen-
ger cars and then box cars for general commodities
or tanks for liquid and gas.
To alleviate the problem of bogie availability,
some petroleum companies enter a long-term contract
with the railroad company. The long-term contract we
study is found in practice between the State Railway
of Thailand and one of the biggest petroleum com-
panies in Thailand. The contract specifies an upfront
payment for reserving bogies and a per-liter freight
rate. For each day during the contract period, the
number of bogies provided by the railroad company
is at most that reserved at the beginning of the con-
tract period. If daily demand is greater than total ca-
pacity of reserved bogies, then the excess demand is
handled by a trucking company. A per-liter charge by
the trucking company is typically higher. The shipper
needs to decide how many bogies to reserve before
knowing actual daily demand.
The shipper’s problem is similar to the newsven-
dor problem, in which an order quantity must be de-
termined prior to the start of the selling season. In
237
Amaruchkul K..
Newsvendor Model in Rail Contract to Transport Gasoline in Thailand.
DOI: 10.5220/0005198102370246
In Proceedings of the International Conference on Operations Research and Enterprise Systems (ICORES-2015), pages 237-246
ISBN: 978-989-758-075-8
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
both ours and the newsvendor problem, a fixed quan-
tity is committed before random demand is material-
ized. Reviews of the newsvendor model can be found
in e.g., (Qin et al., 2011) and (Khouja, 1999). Stan-
dard textbooks in operations research/management
science also discuss a newsvendor problem; e.g.,
Chapter 10 in (Silver et al., 1998), Chapter 11 in (Ca-
chon and Terwiesch, 2009) and Chapter 5 in (Nah-
mias, 2009). In the standard newsvendor model, the
total expected cost is shown to be convex, whereas
ours is not convex, because the daily transportation
rail cost is based on the number of containers actu-
ally used, not the demand actually served, as in the
standard newsvendor model.
A newsvendor model with standard-sized contain-
ers is studied in e.g., (Pantumsinchai and Knowles,
1991) and (Yin and Kim, 2012). Quantity discount
pricing is offered to the shipper. In these papers, if a
larger container is used, the per-unit rate is cheaper.
Nevertheless, their transportation costs are based on
the volume actually shipped, not the number of con-
tainers as in ours. Although we do not have quantity
discount as in theirs, we have a fixed upfront payment
and variable transportation costs. They do not have an
upfront payment or a secondary transportation option.
Our contract scheme is related to returns policies
or buyback contracts in the newsvendor setting. In
our model, the total payment from the shipper to the
rail companyconsists of two parts, namely the upfront
payment proportional to the number of reserved bo-
gies, and the variable payment proportional to the ac-
tual number of bogies actually used. In the newsven-
dor model in which a supplier and a buyer enter into
a buyback contract, the buyer who places an order
quantity of x pays wx to the supplier, where w is the
per-unit wholesale price. After demand D material-
izes, the supplier buys back all unsold units from the
buyer at a per-unit buyback price b. The net payment
from the buyer to the supplier is
wx b(x D)
+
= (w b)x+ bmin(x,D)
where (t)
+
= max(t,0) denotes the positive part of a
real number t. The payment under the buyback con-
tract can be viewed as two parts, namely the “upfront”
payment, (w b)x, proportional to the committed or-
der quantity and the variable payment, bmin(x,D),
proportional to the actual sales. The order quantity
in the newsvendor model is analogous to the num-
ber of reserved bogies in ours, and the actual sales
to the actual number of bogies actually used. Lit-
erature on buyback contracts in the newsvendor set-
ting is extensive; see reviews in (Cachon, 2003) and
(Lariviere, 1999). Ours differs from the buyback con-
tract, because our variable payment is not linear on
the actual volume shipped via rail but on the actual
number of bogies used. For each realization of de-
mand D = d, the variable payment bmin(x,d) in the
buyback contract is continuous piecewise linear func-
tion in d, whereas our payment is not linear, not con-
tinuous in d and has some jumps.
Demands in the newsvendor model and ours are
perishable. In our model, demand to transport gaso-
line must be met on daily basis. The rail company can
segment customers, e.g., by freight types. Different
freight types can be changed at different prices. The
rail company is interested in maximizing revenue be-
cause variable costs are small, compared to the fixed
sunk cost of acquiring rail cars. Rail freight is a prime
candidate for perishable-asset revenue management
(RM) techniques. However, papers on railway RM
are quite limited, compared to those in “traditional”
RM industries, e.g., airline, hotel and car rental. Rail-
way RM papers include, e.g., (Armstrong and Meiss-
ner, 2010) and (Kraft et al., 2000).
The rest of the paper is organized as follows: Sec-
tions 1 and 2 give an introduction and a formulation
of the problem. We provide an analysis and a numer-
ical example in Section 3. Section 4 contains a short
summary and a few future research directions.
2 FORMULATION
Throughout this article, let Z
+
denote the set of non-
negative integers, and R
+
the set of nonnegative real
numbers.
Consider a shipper who needs to transport fuel
(e.g., diesel and gasoline) daily using either road or
rail. Let D
i
be a random demand (volume in liters)
for transport on day i for each i = 1,2,...,n, where n
is the length of the planning horizon. Prior to the start
of the planning horizon, the shipper and the rail com-
pany establish a long-term contract: The rail company
guarantees to provide up to y Z
+
bogies on each day
throughout the planning horizon, and the shipper pays
an upfront of
˜
fy where
˜
f is the per-bogie upfront fee.
The upfront payment is collected at the beginning of
the planning horizon.
Throughout the planning horizon, the shipper also
pays an additional transportation cost, which is lin-
early proportional to the number of tanks actually
used on that day. Let κ be the capacity of the tank
(in liters). For day i = 1,2, ..., n, the number of tanks
actually used by the shipper is
Z
i
= min(y,D
i
/κ) (1)
=
(
y if y D
i
/κ
D
i
/κ if y > D
i
/κ.
(2)
ICORES2015-InternationalConferenceonOperationsResearchandEnterpriseSystems
238
=
(
y if D
i
κy
D
i
/κ if D
i
< κy.
(3)
To ship total volume of D
i
liters, we need D
i
/κ
tanks. (We divide the total demand by the tank capac-
ity and round up to its ceiling, because the number of
tanks has to be an integer.) However, the rail company
provides up to the number of reserved bogies y. One
tank needs one bogie. Hence, the number of tanks
actually used is the minimum of these two quanti-
ties. Detailed explanation is as follows: Suppose the
demand is larger than the total capacity of reserved
bogies (D
i
> κy). The number of reserved bogie is
less than or equal to the number of tanks actually re-
quired to accommodate all demand (y D
i
/κ) All
reserved bogies are used; this corresponds to the up-
per case in (2) and (3). On the other hand, suppose
that the demand is less than the capacity of reserved
bogies (D
i
< κy). We do not need to use all bogies
(y > D
i
/κ), and only D
i
/κ is actually needed to
carry all demand D
i
. This corresponds to the lower
case in (2) and (3).
0e+00 1e+05 2e+05 3e+05 4e+05 5e+05
0 5 10 15
y
D
i
/κ
D
i
/κ
Z
i
Z
i
D
i
Figure 1: Number of bogies actually used Z
i
=
min(y, D
i
/κ) versus demand, D
i
.
Figure 1 shows the number of bogies actually
used, when demand ranges from 0 up to 500000 given
that capacity is κ = 30000 and the number of reserved
bogies is y = 12 (shown in the horizontal dashed-
dotted line). The number of bogies needed for all
demand is D
i
/κ, the stepwise nondecreasing func-
tion shown in the dotted line. (The quantity inside
the ceiling D
i
/κ is a linear increasing function shown
in the dashed line.) The solid line in Figure 1 is the
number of bogies actually used, Z
i
= min(y,D
i
/κ)
as in (1). (In fact, two bogies are often fitted to each
carriage train at the two ends. By “one bogie,” we ac-
tually mean one pair of bogies. Furthermore, we do
not consider a double-stack car/well wagon.)
The additional payment of gZ
i
is transferred to
the rail company, where the per-liter rail contract rate
is r, and the per-tank transportation fee is g = rκ. If
demand exceeds the total volume of tanks initially
reserved upfront, κy, then the excess (D
i
κy)
+
is
transported by the trucking company at a per-liter
rate t, where 0 < r < t. The expected total transporta-
tion cost incurred by the shipper is
ψ(y) =
˜
fy+ E
n
i=1
gmin(y,D
i
/κ) + t(D
i
κy)
+

= E
n
i=1
fy+ gmin(y,D
i
/κ) + t(D
i
κy)
+

(4)
where f =
˜
f/n the upfront payment fee per day.
Inside the square brackets in (4), the first term is the
fixed cost of reserving y bogies, whereas the second
and third terms are the random transportation costs by
a train and a truck, respectively. Note that (4) is also
valid at y = 0: If we do not use rail and use only truck,
then the expected cost is ψ(0) = t
n
i=1
E[D
i
], the per-
unit truck cost times the expected total demand.
The shipper’s problem is to determine y Z
+
the
number of bogies to reserve upfront at the beginning
of the planning horizon. The trade-offs are obvious:
The shipper must commit y before daily demand is
materialized. If y is larger than the number of bogies
actually needed on that day Z
i
, no refund in provided
for unused bogies, and the shipper pays too much up-
front. On the other hand, if y < Z
i
, the excess vol-
ume needs to be transported by truck, whose per-liter
freight rate is more expensive. A firm commitment is
hedged against demand uncertainty; this is similar to
the newsvendor problem.
Despite some similarity, our payment does differ
from that in the newsvendor model. In the standard
newsvendor problem, the objective function is based
on the demand actually served, min(x,D), where D
is a random demand and x is the order quantity.
If the daily payment to the rail company were lin-
early proportional to daily volume actually shipped,
then the standard newsvendor problem would be ap-
plied directly. Nevertheless, the daily payment to the
rail company is linearly proportion to the total vol-
ume of tanks actually used, κmin(y,D
i
/κ), which
is greater than or equal to the total volume actually
shipped, min(κy,D
i
). Then,
gmin(y,D
i
/κ) = r{κmin(y,D
i
/κ)}
rκmin(y,D
i
/κ) = r[min(κy,D
i
)].
(5)
The left-hand-side (LHS) can be viewed as the freight
rate times the total volume of tanks, whereas the right-
hand-side (RHS) is the freight rate times the total vol-
ume actually carried in the tanks. The total volume
NewsvendorModelinRailContracttoTransportGasolineinThailand
239
of tanks (LHS), the term inside the curly brackets,
is at least the total volume actually carried (RHS),
the term inside the square brackets. Our scheme im-
plies higher payment to the rail company, compared to
other schemes based on the volume actually shipped.
In the analysis below, we will show that, because of
this payment scheme, the expected cost is not convex,
whereas that in the newsvendor model is convex.
3 ANALYSIS
Assume that the vector of daily demands
D
1
,D
2
,...,D
n
are independent and identically
distributed R
+
-valued random variables. Let F be the
common distribution and D the random variable with
such distribution, i.e., the random daily demand. Let
¯
F be the complementarycumulativedistribution func-
tion; i.e.,
¯
F(t) = P(D > t) = 1P(D t) = 1F(t).
Let F
1
denote the quantile function. Define the
first-order loss function of D as L(x) = E[(Dx)
+
] =
R
x
¯
F(u)du. Also define the limited expected
value as LEV(x) = E[min(x,D)] =
R
x
0
¯
F(u)du. For
well-known continuous distributions (e.g., lognor-
mal, gamma, Weibull, beta), the formulas for the
limited expected value and the loss function are
readily available. Furthermore, if an expression
for L(x) = E[(D x)
+
] is available, then we can
easily obtain a formula for LEV(x) = E[min(x,D)]
by using E[min(x,D)] = E[D] E[(D x)
+
].
Define the expected daily cost, if the number of
reserved bogies is y, as follows:
π(y) = fy+ gE[min(y, D/κ)] + tE[(D κy)
+
]
(6)
= fy+ g
y1
i=0
¯
F(iκ) + t
Z
κy
¯
F(u)du. (7)
Then, the total expected cost over n day is
ψ(y) = nπ(y) (8)
since the expectation of the sum of random variables
is the sum of the expected values. [Derivation of (7) is
provided in Appendix.] Henceforth, we focus on the
expected daily cost. Note that expression (7) provides
an easy way to evaluate π(y): The last term E[(D
x)
+
] =
R
x
¯
F(u)du where x = κy is the first-order loss
function of D.
Proposition 1 characterizes an optimal solu-
tion y
= argmin π(y) when demand is deterministic;
specifically, P(D = d) = 1. Proofs of all propositions
are given in Appendix.
Proposition 1. Suppose f (t r)κ.
1. If d < ( f + g)/t, y
= 0, and only truck is used.
2. If ( f + g)/t d κ, y
= 1, only train is used.
3. If d > κ, both train and truck are used, and
y
= argmin{π(d/κ),π(d/κ)}.
Suppose f > (t r)κ. Then, y
= 0 and only truck is
used.
The results in Proposition 1 make sense economically.
If the fixed upfront is very large (i.e., f > (t r)κ),
then we use only truck. On the other hand, suppose
that the fixed upfront is not that large. Then we have
to take into account the size of demand. If demand is
smaller than the cutoff ( f + g)/t, we use only truck
to avoid paying upfront. If demand is larger than the
cutoff and less than the bogie capacity, then it is opti-
mal to reserve only one bogie, and no truck is needed,
because all demands can be put into one bogie. If de-
mand is larger than the bogie capacity, then we use
both truck and train.
For shorthand, denote (y) = π(y+ 1) π(y). If
the expected daily cost were convex, then we could
easily derive an optimality condition,
argminπ(y) = argmin
yZ
+
{(y) 0}. (9)
Unfortunately, π(y) is not convex: Figure 2
shows π(y), with constant demand P(D = d) = 1
where d = 458000, κ = 30000, r = 0.3691, t = 0.49,
f = 2000.
0 5 10 15 20 25
200000 210000 220000
y
π(y)
Figure 2: Expected daily cost π(y) is not convex on Z
+
.
There are two kinks at d/κ = 15 and d/κ =
16.
Henceforth, we consider the problem with random
demand. In Proposition 2 we identify a condition un-
der which the optimality condition (9) holds, and pro-
vide a closed-form optimal expression for the num-
ber of reserved bogies, which minimizes the expected
daily cost. Let ζ denote a density function of F.
ICORES2015-InternationalConferenceonOperationsResearchandEnterpriseSystems
240
Proposition 2. Assume that
κζ(κy)
F(κ(y+ 1)) F(κy)
t
r
(10)
for all y Z
+
.
1. The expected cost π(y) is unimodal and attains its
minimum at y
= argmin
yZ
+
{(y) 0} where
(y) = f + rκ
¯
F(κy) t
Z
κ(y+1)
κy
¯
F(u)du. (11)
Furthermore, if f κ(t r), then π(y) attains its
minimum at y
= 0.
2. The optimal number of reserved bogies increases
if one or more of the following conditions hold:
(i) the fixed upfront payment f decreases; (ii) the
rail freight rate r decreases; (iii) the truck freight
rate t increases.
If the fixed upfront payment is sufficiently large, e.g.,
at least κ(t r), then the shipper should not use rail
service; all daily demand should be accommodated by
truck. Part 2 also gives a sensitivity analysis with re-
spect to a change in a contract parameter. The results
make economically sense.
To find an optimal solution using (11) in Propo-
sition 2, we need to be able to evaluate the definite
integral
R
κ(y+1)
κy
¯
F(u)du. This can be written as the
difference of the two loss functions
Z
κ(y+1)
κy
¯
F(u)du =
Z
κy
¯
F(u)du
Z
κ(y+1)
¯
F(u)du
= L(κy) L(κ(y+ 1)).
Alternatively, it can be computed as the difference of
the two limited expected values
Z
κ(y+1)
κy
¯
F(u)du =
Z
κ(y+1)
0
¯
F(u)du
Z
κy
0
¯
F(u)du
= LEV(κ(y+ 1)) LEV(κy).
As previously mentioned, a closed-form expression
for either loss function or limited expected value can
be found in standard probability and statistics text-
books. A numerical example, which describes how
to find an optimal solution, is given in at the end of
this section.
Although the expected cost π(y) is not convex, it
is unimodal, and an optimal solution can be found an-
alytically, when condition (10) holds. We argue that
this condition is not very restrictive. Recall that the
cumulative distribution function is the area under the
density curve: F(t) =
R
t
0
ζ(u)du. Then,
F(κ(y+ 1)) F(κy) κζ(κy). (12)
In (12), the LHS is the area under the density curve
from t
1
= κy to t
2
= κ(y+ 1), whereas the RHS is the
area of the rectangle with height equal to density at t
1
,
ζ(κy), and width equal to the length of interval [t
1
,t
2
],
κ. With this approximation, condition (10) becomes
1
κζ(κy)
F(κ(y+ 1)) F(κy)
t
r
.
In our model, the truck rate is strictly greater than the
rail rate, t > r; so condition (10) usually holds.
We now turn our attention to a heuristic solution.
We approximate the expected daily cost by removing
the ceiling function in (6):
ν(y) = fy+ gE[min(y,D/κ)] + tE[(D κy)
+
]
= fy+ rE[min(κy,D)] + tE[(D κy)
+
].
The approximated cost ν(y) differs from the exact
cost π(y) only on the second term: In ν(y), the cost
charged by the rail company is based on the total
volume actually shipped, whereas in π(y) it is based
on the total volume of tanks actually used; see (5).
Clearly, the approximated cost is a lower bound on
the exact cost, by the definition of the ceiling func-
tion. The approximated cost ν(y) is continuously dif-
ferentiable, and a one-line formula for a minimizer is
derived in Proposition 3.
Proposition 3. If f < κ(t r), then the approximated
cost ν(y) is convex and attains its minimum at
y
a
=
1
κ
F
1
1
f/κ
t r
. (13)
We refer to 1 f/[κ(t r)] as the critical ratio.
Recall that in the newsvendor model with overage
c
o
and underage c
u
, the optimal order quantity is
F
1
(c
u
/(c
u
+ c
o
)) where F is the demand distribu-
tion, and c
u
/(c
u
+ c
o
) is the so-called critical ratio.
In analogous, the overage is f/κ, the per-liter cost
of reserving too much and some bogies are not used.
The underage occurs if we do not reserve enough bo-
gies and need to use both road and rail; so the per-
liter underage is t r f/κ. The underage can be
viewed as the incremental per-liter cost if truck is
used. Specifically, it is t (r+ f/κ), the per-liter cost
by truck t minus the per-liter cost by rail, which is
the sum of the per-liter freight rate and the per-liter
upfront (r+ f/κ).
Our heuristic solution is to reserve
y
a
=
(
y
a
if π(y
a
) π(y
a
)
y
a
otherwise
Our heuristic solution requires evaluation of the ex-
pected daily cost function π(y) and compares the ex-
pected values at the floor and ceiling.
In practice, the per-liter rates by train and truck, r
and t, may depend on daily crude oil or gas price;
NewsvendorModelinRailContracttoTransportGasolineinThailand
241
they may be random when the contract is signed, and
their values are realized daily. Then, the expected to-
tal cost (4) becomes
E
n
i=1
fy+ κR
i
min(y,D
i
/κ) + T
i
(D
i
κy)
+

where R
i
and T
i
are per-liter rates by train and truck
on day i, respectively. We further assume that the
per-liter rates are independently and identically dis-
tributed and that they are independent of demands.
Our formulation and analysis remain valid, if we now
interpret r = E[R
1
] and t = E[T
1
] as the expected per-
liter rates by train and truck, respectively.
Suppose that the expected per-liter rates are ex-
ogenously specified. Assume that the shipper makes
decision according to (13). If the rail company wants
to allocate exactly y
u
Z
+
bogies to the shipper, then
the daily upfront payment should be
f = κ(t r)[1 F(y
u
κ)]. (14)
We obtain (14) simply by solving (13) for the fixed
upfront f.
NUMERICAL EXAMPLE
Consider one of the biggest petroleum companies
in Thailand, who wants to transport hi-speed diesel
from Saraburee province in the central region to Phare
province in the northern region. Two modes of trans-
portation are available: 1) road, service offered by a
3PL trucking company, and 2) rail from Baan Pok Pak
station in Saraburee to Denchai station in Phare, ser-
vice offered by State Railway of Thailand. The dis-
tance is about 500 kilometers. Either truck or train
can make a round trip within a single day.
The 310-day demands in year 2013 are collected,
and its histogram is shown in Figure 3. We fit a log-
normal distribution with parameters µ = 12.756 and
σ = 0.488. (These parameters are obtained using a
fitdistr
command in R.) The corresponding den-
sity is superimposed over the histogram in Figure 3.
The daily demand has mean
E[D] = exp(µ+ σ
2
/2) = 390456.6 liters
and standard deviation
p
var(D) =
q
exp(2µ+ σ
2
)(exp(σ
2
) 1)
= 202470.4 liters.
The coefficient of variation is 0.52; in words, the stan-
dard deviation is about half of the mean. The capac-
ity of a tank is κ = 33000 liters. The rail per-liter
rate is r = 0.3169 Thai Baht (THB), the per-tank cost
is g = rκ = 10457.7, and the truck per-liter rate is
t = 0.49 THB.
Daily volume
Density
0 400000 800000 1200000
0.0e+00 1.5e−06 3.0e−06
Figure 3: Histogram of daily demand.
Assume that one year has n = 310 days. It follows
from Proposition 2 Part 1 that if the fixed daily upfront
is greater than κ(tr) = 5712.3 THB (or equivalently
the fixed upfront is
˜
f = nf = 1770813 THB per bogie
per year), then the shipper would not use rail service
at all.
Suppose that the daily upfront is f = 1000 THB.
For the given daily demand distribution, we choose
the maximum number of reserved bogies to be y
m
=
60; this y
m
is sufficient to accommodate daily demand
roughly 99.99 percent of the time. We can verify that
condition (10) holds for each y = 1,2,...,y
m
; see Fig-
ure 4.
0 10 20 30 40 50 60
0.0 0.2 0.4 0.6 0.8 1.0
LHS of (10)
y
Figure 4: Sufficient condition is verified: LHS values of
(10) are at most t/r = 1.54622.
Then, we can use (11) to find an optimal solu-
tion. The difference (y) is evaluated for each y =
1,2, ...,y
m
; see last column in Table 1.
The first y at which the difference is nonnegative
is y
= argmin{(y) 0} = 16. The optimal solu-
tion given in Proposition 2 requires the shipper to re-
serve y
= 16 bogies.
At the optimal solution, on each day the expected
ICORES2015-InternationalConferenceonOperationsResearchandEnterpriseSystems
242
Table 1: Expected daily total cost π(y), rail
cost gE[min(y,D/κ)], truck cost tE[(D κy)
+
],
upfront fy, and (y).
y upfront cost.truck cost.rail π(y) (y)
1 1000 175153.72 11457.70 186611.42 -4711.08
2 2000 158984.94 22915.39 181900.33 -4683.55
3 3000 142847.23 34369.55 177216.78 -4556.35
4 4000 126886.69 45773.75 172660.44 -4281.27
5 5000 111398.11 56981.05 168379.17 -3874.89
6 6000 96736.04 67768.24 164504.28 -3386.85
7 7000 83204.85 77912.57 161117.42 -2868.02
8 8000 71000.09 87249.31 158249.40 -2357.12
9 9000 60201.56 95690.71 155892.28 -1878.85
10 10000 50794.65 103218.78 154013.43 -1446.41
11 11000 42699.89 109867.13 152567.02 -1064.89
12 12000 35800.17 115701.96 151502.13 -734.20
13 13000 29961.64 120806.28 150767.93 -451.25
14 14000 25047.97 125268.71 150316.67 -211.43
15 15000 20929.22 129176.03 150105.24 -9.58
16 16000 17486.66 132609.00 150095.66 159.44
17 17000 14614.86 135640.24 150255.10 300.46
18 18000 12222.10 138333.46 150555.56 417.82
19 19000 10229.71 140743.67 150973.38 515.31
20 20000 8570.95 142917.74 151488.69 596.23
21 21000 7189.66 144895.26 152084.92 663.35
22 22000 6038.81 146709.45 152748.26 719.02
23 23000 5079.23 148388.06 153467.29 765.22
24 24000 4278.37 149954.13 154232.51 803.57
25 25000 3609.24 151426.84 155036.08 835.43
26 26000 3049.47 152822.04 155871.51 861.93
27 27000 2580.58 154152.87 156733.45 883.99
28 28000 2187.26 155430.18 157617.44 902.38
29 29000 1856.85 156662.98 158519.83 917.73
30 30000 1578.88 157858.68 159437.56 930.56
31 31000 1344.66 159023.46 160368.12 941.29
32 32000 1147.00 160162.41 161309.41 950.29
33 33000 979.94 161279.76 162259.71 957.85
34 34000 838.53 162379.03 163217.55 964.20
35 35000 718.62 163463.12 164181.75 969.54
36 36000 616.81 164534.48 165151.29 974.05
37 37000 530.21 165595.13 166125.34 977.86
38 38000 456.45 166646.75 167103.20 981.08
39 39000 393.53 167690.75 168084.28 983.81
40 40000 339.77 168728.32 169068.09 986.12
41 41000 293.77 169760.44 170054.21 988.09
42 42000 254.35 170787.94 171042.29 989.76
43 43000 220.53 171811.53 172032.06 991.19
44 44000 191.45 172831.79 173023.24 992.40
45 45000 166.44 173849.21 174015.64 993.44
46 46000 144.88 174864.21 175009.09 994.33
47 47000 126.27 175877.15 176003.42 995.10
48 48000 110.19 176888.32 176998.51 995.75
49 49000 96.28 177897.99 177994.26 996.31
50 50000 84.23 178906.35 178990.58 996.80
51 51000 73.77 179913.60 179987.37 997.21
52 52000 64.69 180919.90 180984.59 997.57
53 53000 56.79 181925.37 181982.16 997.88
54 54000 49.91 182930.14 182980.04 998.15
55 55000 43.91 183934.29 183978.20 998.39
56 56000 38.68 184937.91 184976.58 998.59
57 57000 34.10 185941.07 185975.17 998.76
58 58000 30.10 186943.83 186973.93 998.92
59 59000 26.60 187946.25 187972.85 999.05
60 60000 23.52 188948.37 188971.90
number of tanks actually used is E[min(y
,D/κ)] =
11.15, and the expected total volume of tanks
is κE[min(y
,D/κ)] = 367950, whereas the ex-
pected total volume actually shipped via rail is
E[min(κy
,D)] = 354769.5, and the expected volume
shipped via road is E[(D κy
)
+
] = 35687.
Alternatively, the optimal solution can be found
via enumeration. In addition to (y), Table 1 shows
the expected total daily cost π(y) along with its com-
ponents, namely the expected rail cost, expected truck
cost, and the upfront payment.
0 10 20 30 40 50 60
0 50000 100000 150000
y
cost
upfront
cost.truck
cost.rail
π(y)
Figure 5: Expected total cost as function of number of bo-
gies.
These costs are plotted in Figure 5. The lowest
point of the expected total cost occurs at y
= 16.
If one did not take into account any cost pa-
rameters and ignored demand uncertainty, then one
could estimate the number of reserved bogies by di-
viding the daily mean demand by the tank capacity
and rounding up, E[D]/κ = 11.84 = 12, and the
expected volume shipped via road would be E[(D
12κ)
+
] = 73061.58, an increase of 105% from that
using the optimal solution. Note that the optimal so-
lution y
is larger than the mean demand divided by
capacity: The number of reserved bogies would be
less than the optimal solution by 25%. The expected
additional cost if one did not use an optimal solution
would be π(12) π(y
) = 151502 150096 = 1406
THB per day, or equivalently (310)(1406) = 435860
THB per year.
To find a heuristic solution, we compute the criti-
cal ratio 1 f/[κ(t r)] = 0.8259; the corresponding
quantile divided by the capacity is y
a
= 16.59. Since
π(16) = 150096 < 150255 = π(17), from our heuris-
tic the number of reserved bogies y
a
= 16. At this
particular problem instance, the heuristic solution is
exactly equal to the optimal solution. To evaluate per-
NewsvendorModelinRailContracttoTransportGasolineinThailand
243
formance of our heuristic approach, more numerical
examples can be conducted in the future.
Suppose that the rail company can allocate at most
y
u
= 7 bogies on this leg (origin-destination pair).
Further assume that the shipper makes decision ac-
cording to (13). Then, the rail company should offer
a daily upfront payment of at least (14), which is equal
to 4553.78 THB, or equivalently
˜
f = 1411669 THB
per bogie per year.
Throughout our numerical example, the LEV
function is used extensively to evaluate (y) and
π(y). For the lognormal distribution with parame-
ters µ and σ, the LEV function is
E[min(D,x)] = exp(µ+ σ
2
/2)Φ
log(x) µ σ
2
σ
+ x
h
Φ
log(x) µ
σ
i
where Φ is the cumulative distribution function of the
standard normal distribution. All calculations in our
numerical example are done in R. (For instance, R
command for the cumulative distribution function of
lognormal is
plnorm
and that of normal is
pnorm
.)
4 CONCLUSION
In summary, we formulate a newsvendor model in
which the shipper determines how many bogies to
be reserved before random daily demand is materi-
alized. If the number of reserved bogies is very large,
we may end up paying a large upfront fee for unused
bogies. On the other hand, if we reserve not enough
bogies, we incur a large transportation cost via truck.
We want to determine an optimal number of bogies
to reserve in order to minimize the expected cost. In
the analysis, we show that under certain condition, the
expected cost is unimodal and a closed-form optimal
solution is derived. An easy-to-implement heuristic
solution is also proposed. Some sensitivity analysis is
provided: The number of reserved bogies decreases,
if the upfront payment increases, or the rail freight
rate increases, or the truck freight rate decreases. In
the numerical example, we show that the optimal so-
lution and the heuristic solution coincide. Further-
more, if we did not take into account of demand un-
certainty as in our model, then the number of reserved
bogies could differ from the optimal solution by 25%
and would result in a significant increase in trans-
portation cost.
Some future research directions are identified be-
low. Recall that, in the analysis, we assume demands
are independent and identically distributed. Note that
the expected total cost (4) can be written as
ψ(y) = E[
n
i=1
ψ
i
(y)] =
n
i=1
E[ψ
i
(y)] (15)
where ψ
i
(y) is the random cost on day i
ψ
i
(y) = fy+ gmin(y,D
i
/κ) + t(D
i
κy)
+
.
Equation (15) always holds (whether or not demands
are independent) since the expectation of the sum of
random variables is equal to the sum of the expecta-
tion. If demands are not independent but identically
distributed, then all of our results remain unchanged,
because ψ(y) = nE[ψ
1
(y)] as in (8), and we can focus
on the expected daily cost, E[ψ
1
(y)] = π(y) in (6).
However, if demands are not identically distributed,
then we cannot minimize each term E[ψ
i
(y)] sepa-
rately: We need to minimize the total expected cost
n
i=1
[ψ
i
(y)]. Cases when demands are nonstationary
(i.e., neither independent nor identically distributed)
would be an interesting research extension.
Recall that our model considers a contract prob-
lem on a single leg in the railroad network. One ex-
tension would be to study a contract to transport gaso-
line over the entire railroad network. Furthermore,
for each leg, there may be multiple types of contain-
ers, depending on their capacities. The upfront fee
depends on the container type, and the per-container
charge depends on the container capacity and the dis-
tance between an origin and a destination.
Another interesting extension is a railroad’s con-
tract design problem. Our model allows the shipper
to choose the number of bogies to be reserved. In the
contract design problem, we would allow the railroad
company to choose the parameters of the contract,
e.g., the upfrontpayment and the per-containerfreight
charge. The contract design problem can be modeled
using a game-theoretical framework. We hope to pur-
sue these or related problems in the future.
ACKNOWLEDGEMENTS
The problem was materialized after some discussions
with Mr. Apichat Gunthathong, our part-time master
student who has been working at the petroleum com-
pany (in the numerical example) for 12 years. His
independent project, a part of requirement for a mas-
ter degree in logistics management at the school, was
related to our model.
REFERENCES
Armstrong, A. and Meissner, J. (2010). Railway revenue
managment: Overview and models. Working paper
ICORES2015-InternationalConferenceonOperationsResearchandEnterpriseSystems
244
(available at http://www.meiss.com), Lancaster Uni-
versity Management School.
Cachon, G. (2003). Supply chain coordination with con-
tracts. In de Kok, A. and Graves, S., editors, Hand-
books in Operations Research and Management Sci-
ence: Supply Chain Management. Elsevier, Amster-
dam.
Cachon, G. and Terwiesch, C. (2009). Matching Supply
with Demand: An Introduction to Operations Man-
agement. MccGraw-Hill, New York.
Energy Information Administration (EIA) (2008). Motor
gasoline consumption 2008: A historical perspective
and short-term projections. Retrieved August 2, 2014
from www.eia.gov/forecasts/steo/special/pdf/.
Khouja, M. (1999). The signle-period (news-vendor) prob-
lem: Literature review and suggestions for future re-
search. Omega, 27(5):537–553.
Kraft, E., Srika, B., and Phillips, R. (2000). Revenue
management in railroad applications. Transportation
Quarterly, 54(1):157–176.
Lariviere, M. (1999). Supply chain contracting and coordi-
nation with stochastic demand. In Tayur, S., Gane-
shan, R., and Magazine, M., editors, Quantitative
Models for Supply Chain Management. Kluwer Aca-
demic Publishers, Boston.
Nahmias, S. (2009). Production and Operations Research.
McGraw-Hill, Inc., New York.
Organization of the Petroleum Exporting Countries (OPEC)
(2013). World oil outlook 2013. Retrieved August 2,
2014 from
www.opec.org
.
Pantumsinchai, P. and Knowles, T. (1991). Standard con-
tainer size discounts and the single-period inventory
problem. Decision Sciences, 22(3):612–619.
Qin, Y., Wang, R., Vakharia, A., Chen, Y., and Seref, M.
(2011). The newsvendor problem: Review and direc-
tions for future research. European Journal of Opera-
tional Research, 213(2):361–374.
Silver, E., Pyke, D., and Peterson, R. (1998). Inventory
Management and Production Planning and Schedul-
ing. John Wiley & Sons, Inc., New York.
Yin, M. and Kim, K. (2012). Quantity discount pricing
for container transportation services by shipping lines.
Computers & Industrial Engineering, 63(1):313–322.
APPENDIX
Derivation of (7)
For shorthand, denote M = D/κ. Since D is a non-
negative random variable with distribution F, M is a
Z
+
-valued random variable. The cumulative distribu-
tion function of M is as follows: For any t R
+
P(M t) = P(D/κ t)
= P(D/κ t)
= F(tκ).
We use the tail-sum formula for expectation:
E[min(t,M)] =
j=0
P(min(t,M) > j)
=
t⌋−1
j=0
P(M > j)
=
t⌋−1
j=0
¯
F( jκ).
The finite sum in the second term in (7) is obtained.
The last term is the first-order loss function of D.
Proof of Proposition 1
Proof. For shorthand, let
˜
π(y) = [ f (t r)κ]y+ td
ˆ
π(y) = f y + gd/κ.
Given that demand is constant and equal to d, the
daily cost (6) becomes
π(y) = fy+ gmin(y, d/κ) + t(d κy)
+
=
(
fy+ gy+ t(d κy) ify = 0, 1,2,..., d/κ
fy+ gd/κ if y = d/κ,. ..
=
(
˜
π(y) if y = 0,1, 2,.. .,d/κ
ˆ
π(y) if y = d/κ,d/κ + 1, ...
In particular, if d < κ,
π(0) = td
π(y) = fy+ g if y = 1, 2,...
Since both
˜
π(y) and
ˆ
π(y) are linear, π(y) is a piece-
wise linear function. Note that
ˆ
π(y) is strictly increas-
ing since f > 0. Let y
= argmin π(y).
Suppose f > (t r)κ. Both
˜
π and
ˆ
π are increas-
ing functions, so y
= 0. In words, if the fixed upfront
is sufficiently large, we use only truck and do not re-
serve any bogies (y
= 0).
Suppose f (t r)κ. That is, ( f + g)/t κ since
g = rκ.
1. If d < ( f +g)/t, then in this case d < κ and π(0) =
td ( f + g) = π(1), so y
= 0, and we use only
truck.
2. If ( f +g)/t d < κ, then π(0) > π(1), so y
= 1;
i.e., we reserve one bogie. Since demand does not
exceed capacity, one bogie is enough to accom-
modate entire demand; we do not need any truck.
3. If d κ, then π(y) is linearly decreasing up
to d/κ and increasing from d/κ. Specifi-
cally, the coefficient of y in
˜
π(y) is negative when
f (t r)κ, so
˜
π(y) is linearly decreasing and
NewsvendorModelinRailContracttoTransportGasolineinThailand
245
minimized at d/κ. Since
ˆ
π(y) is increasing, it is
minimized at d/κ. Thus, the global minimizer
is argmax{
ˆ
π(d/κ),
˜
π(d/κ)}.
Proof of Proposition 2
Proof. From (7) we have that
(y) = f + g
¯
F(κy) t
Z
κ(y+1)
κy
¯
F(u)du,
and
(y) = κgζ(κy) + κt[F(κ(y+ 1)) F(κy)].
Recall g = rκ. If (10) holds, then
(y) 0, or equiva-
lently (y) is increasing; thus, the expected cost func-
tion π(y) is unimodal. Let y
= argmin
yZ
+
{(y)
0}. Then, π(y) switches from decreasing to increas-
ing at y
; hence, π(y) attains its minimum at y
.
Finally, note that
(0) = f + κr t
Z
κ
0
¯
F(u)du f κ(t r)
since 0
¯
F(u) 1. If f κ(t r), (0) 0; π(y)
is increasing on Z
+
and is, thus, minimized at y
=
0. Part 2 follows from (11) and the fact that (y) is
increasing.
Proof of Proposition 3
Proof. For convenient let x = κy and define
ξ(x) = ( f/κ)x+ rE[min(x,D)] +tE[(D x)
+
]
Then, argminν(y) = (argminξ(x))/κ since ν(y) =
ξ(x). After some simplifications, we get
ξ(x) = ( f/κ)x+ rE[D] + (t r)E[(D x)
+
].
The first and second derivatives with respect to x are
ξ
(x) = f/κ (t r)
¯
F(x)
ξ
′′
(x) = (t r)F
(x) = (t r)ζ(x) 0
respectively. The approximated cost function ξ(x) is
convex. If f < κ(t r), then the optimality condi-
tion is that ξ
(x) = 0; i.e., x = F
1
(1 f/[κ(t r)])
and (13) follows immediately.
ICORES2015-InternationalConferenceonOperationsResearchandEnterpriseSystems
246