We use \(q\) to denote a shipper’s real demand where \(q\) is a random variable and has a uniform distribution in (0, 1). We use \(x\) to denote the booked slots, and \(x\) is a decision variable for the shipper and has a uniform distribution in (0, 1). The shipper’s demand is unknown; therefore, there are three cases of the actual and the booked quantity of container slots presented as follows.
(a) If \(q<x\), the shipper books more container slots from the carrier than it really needs. Thus, the shipper needs to cancel \(q-x\) slots. Note that the reservation fee is non-refundable in this case.
(b) If \(q=x\), the number of booked slots matches the actual demand. As this case is rare in practice because the numbers of \(q\) and \(x\) are several tens or even several hundreds, we do not consider it in this study.
(c) If \(q>x\), the shipper books fewer container slots from the carrier than it really needs. Therefore, the shipper needs to obtain \(x-q\) more slots from the shipping market. In order to transport the cargo to the destination port on time, the shipper needs to find container slots in a limited time, and such urgent demand leads to the growth of the container slot booking fee as a consequence. Thus, the market price for a slot is higher than the price provided by the carrier (Sofreight 2020).
We further define some parameters to calculate the shipper’s cost. We use \(\theta\) (USD) to represent the reservation fee of each slot booked. We assume that the transportation fee of each container slot is \(\alpha\) (USD) offered by the carrier and \(\alpha\) > \(\theta\), and the market price of each slot is \(\beta\) (USD). As the price for the \(x\) container slots are decided by both the carrier and the shipper and is lower than the market price, we have \(\beta\) > \(\alpha\). Therefore, a shipper’s cost includes two parts, the reservation fee and transportation fee.
We start by calculating the cost of the shipper in the first case where \(x > q\). In this case, the shipper books more container slots than the actual demand and the carrier only transports \(q\) containers. Therefore, the total cost of the shipper includes the transportation fee for \(q\) container slots and the reservation fee for \(x-q\) container slots.
We denote by \(C_{1}\) the total cost in the first case. The objective function can be formulated as follows:
$$C_{1} = \alpha q + \theta \left( {x - q} \right).$$
(1)
We then calculate the shipper’s cost in the case where \(x < q\), which means that the shipper needs to book \(q-x\) more container slots from the shipping market with price \(\beta\). We denote by \({C}_{3}\) the total cost of the shipper in this case, and the total cost can be formulated as follows:
$$C_{3} = \alpha x + \beta \left( {q - x} \right).$$
(2)
The shipper’s optimal order quantity
The problem of finding a shipper’s optimal order quantity is an instance of the newsvendor problem. The newsvendor or newsboy problem, also called a single-period inventory management problem, is an inventory management model that seeks to identify an optimal order quantity to maximize the expected profit in a period (Khouja 1999; Qin et al. 2011). The key insights stemming from the analysis of this newsvendor problem have a broad range of application in managing inventory decisions in many industries, such as hospitality, airline, and fashion goods. Therefore, this study applies the newsvendor model to determine the optimal order quantity of container slots for a shipper.
At the beginning of a single period, the shipper is interested in determining the optimal order quantity of container slots, denoted by \({x}^{*}\). The shipper’s booking demand is assumed to be stochastic and characterized by a random variable \(x\) with the probability density function as \(f(x)\) and the cumulative distribution function as \(F(x)\). The carrier is assumed to operate with sufficient capacity and no capacity restrictions and zero lead time of supply. Therefore, the order placed by the shipper from the carrier at the beginning of a period is immediately fulfilled. The sales of the container slots occur during or at the end of a period. Thus, the actual cost at the end of the period for the shipper is
$$C=\left\{\begin{array}{c}\alpha q+\theta \left(x-q\right),q<x;\\ \alpha x+\beta \left(q-x\right), q>x.\end{array}\right.$$
(3)
As the demand is not realized at the beginning of the period, the shipper cannot observe the actual cost. Hence, a normal approach to analyzing the problem is to allow the shipper to make the optimal decision on ordering quantity at the beginning of the period to maximize the carrier’s expected total profit. Thus, the total expected profit for the carrier can be formulated as follows:
$$\begin{aligned} E\left( C \right) & = \mathop \smallint \limits_{0}^{x} [\alpha q + \theta \left( {x - q} \right)]f\left( q \right)dq + \mathop \smallint \limits_{x}^{1} \left[ {\alpha x + \beta \left( {q - x} \right)} \right]f\left( q \right)dq \\ & = \theta x + \beta + \left( {\beta - \alpha + \theta } \right)\mathop \smallint \limits_{0}^{x} qf\left( q \right)dq + \left( {\beta - \alpha + \theta } \right)\mathop \smallint \limits_{x}^{1} xf\left( q \right)dq \\ \end{aligned}$$
(4)
Next, by calculating the partial derivative of the expd profit for \(x\), we obtain
$$\begin{aligned} \frac{\partial E\left( C \right)}{{\partial \theta }} & = \theta + \left( {\beta - \alpha + \theta } \right)\left[ {xf\left( x \right) + \mathop \smallint \limits_{x}^{1} f\left( q \right)dq + xf\left( x \right)} \right] \\ & = \theta + \left( {\beta - \alpha + \theta } \right)\left( {1 - x} \right). \\ \end{aligned}$$
(5)
Therefore, by setting \(\partial E\left(C\right)/\partial \theta =0\), we can obtain the optimal order quantity \({x}^{*}\) as follow:
$${x}^{*}=\frac{\beta -\alpha }{\beta -\alpha +\theta }.$$
(6)
The carrier’s maximum profit
In this study, we assume that the carrier’s marginal cost is 0, and thus the carrier’s profit equals the shipper’s cost. We denote \(P\) by the carrier’s profit. As we have found the optimal order quantity \({x}^{*}\), we can use \({x}^{*}\) to substitute the carrier's profit function. Accordingly, we have
$$P=\left\{\begin{array}{c}\alpha q+\theta \left({x}^{*}-q\right), q<{ x}^{*};\\ \alpha {x}^{*}, q>{ x}^{*}.\end{array}\right.$$
(7)
We need to find the optimal values of \(\theta\) and \(\alpha\) to maximize the carrier’s profit. In doing so, we first find the carrier’s expected profit denoted by \(E(P)\). Next, we can obtain the objective function as follows
$$\begin{aligned} E\left( P \right) & = \mathop \smallint \limits_{0}^{{ x^{*} }} [\alpha q + \theta \left( {x^{*} - q} \right)]dq + \mathop \smallint \limits_{{ x^{*} }}^{1} \alpha x^{*} dq \\ & = \alpha x^{*} - \frac{1}{2}\left( {\alpha - \theta } \right)x^{*2} \\ & = \frac{\beta - \alpha }{{2\left( {\beta - \alpha + \theta } \right)^{2} }}\left[ {\alpha \left( {\beta - \alpha } \right) + \theta \left( {\alpha + \beta } \right)} \right]. \\ \end{aligned}$$
(8)
Next, we calculate the partial derivative of the expected profit for \(\theta\) as follows
$$\frac{\partial E(P)}{\partial \theta }= \frac{\left({\beta }^{2}-{\alpha }^{2}\right){\left(\beta -\alpha +\theta \right)}^{2}-2(\beta -\alpha +\theta )(\beta -\alpha )[\alpha \left(\beta -\alpha \right)+\theta (\alpha +\beta )]}{{(\beta -\alpha +\theta )}^{2}}.$$
(9)
The optimal \({\theta }^{*}\) can be found when \(\partial E(P)/\partial \theta\) = 0, and we have the following equation under this condition
$$\left({\beta }^{2}-{\alpha }^{2}\right){\left(\beta -\alpha +\theta \right)}^{2}=2\left(\beta -\alpha +\theta \right)\left(\beta -\alpha \right)\left[\alpha \left(\beta -\alpha \right)+\theta \left(\alpha +\beta \right)\right].$$
(10)
After solving Eq. (10), we have
$${\theta }^{*}=\beta -\alpha -\frac{2\alpha \left(\beta -\alpha \right)}{\alpha +\beta }.$$
(11)