When to arrive at a queue with earliness, tardiness and waiting costs

When to arrive at a queue with earliness, tardiness and waiting costs

Eliran Sherzer and Yoav Kerner

We consider a queueing facility where customers decide when to arrive. All customers have the same desired arrival time (w.l.o.g. time zero). There is one server, and the service times are independent and exponentially distributed. The total number of customers that demand service is random, and follows the Poisson distribution. Each customer wishes to minimize the sum of three costs: earliness, tardiness and waiting. We assume that all three costs are linear with time and are defined as follows. Earliness is the time between arrival and time zero, if there is any. Tardiness is simply the time of entering service, if it is after time zero. Waiting time is the time from arrival until entering service. We focus on customers’ rational behaviour, assuming that each customer wants to minimize his total cost, and in particular, we seek a symmetric Nash equilibrium strategy. We show that such a strategy is mixed, unless trivialities occur. We construct a set of equations that its solution provides the symmetric Nash equilibrium. The solution is a continuous distribution on the real line. We also compare the socially optimal solution (that is, the one that minimizes total cost across all customers) to the overall cost resulting from the Nash equilibrium.


Thanks are due to Tomer Sharon for generating numerical examples and Joseph Kreimer for making helpful comments. Also, we wish to thank the editor and reviewers for their thorough work and meaningful suggestions. This research is supported by the Israel Science Foundation, grant No. 1319/11.

1 Introduction

In many real life situations, customers choose strategically when to arrive to a queue. For example, when commuting to work in the morning, or going to the cafeteria at lunch time, etc. In those kind of situations, customers usually have a preferred arrival time, such as, commuting to work right after dropping the kids at school. For the sake of simplicity, we refer to the preferred arrival time as time 0 (w.l.o.g). In many cases, customers share the same preferred arrival time. This is very likely to be the case in the morning commute, or when going out for lunch. If all customers wish to arrive at that time, it causes congestions. As a consequence, one would consider alter his arrival time in order to avoid waiting for a long time. In this situation, from an individual point of view, a trade-off between the arrival time preference and the queue length is formed. This trade-off was studied widely in the literature (see [1][4][14][16], and [20]). Whereas, in all of them the trade-off was between waiting and tardiness costs. However, we suggest an additional cost, that is also reflected in the dilemma of when to arrive, and it is referred as earliness cost. This cost is induced by making the effort of arriving earlier than desired. A classic example would be commuting to work at 4 AM just to avoid traffic jams. In this example, clearly, arriving this early minimizes the waiting time in one hand, but on the other, commuting so early is inconvenient. We further discuss the motivation of adding earliness cost in the next section.
In this study, we propose a model where customers choose when to arrive. Each individual possess three types of costs: Earliness, tardiness and waiting. Whereas, waiting refers to the amount of time one waited in the queue. Earliness is related to the amount of time one arrived before time 0, and if he arrived after time 0, then there is no earliness cost. Tardiness is related to the amount of time entering service after time 0. However, if an individual service time began prior to time 0, then there is no tardiness cost. We focus on homogenous customers with respect to their costs and desired service time. Under this assumption, customers make their arrival decision while knowing that others have the same preferences. In such systems, all customers’ decisions interact. That is, an individual’s cost is determined not only by his own decision, but also by others’, and thus the natural model of customers’ arrivals is a non-cooperative game. Motivated by this point of view, we look for a symmetric Nash equilibrium. That is, if a (possibly) mixed arrival strategy is used by all, an individual has no incentive to unilaterally deviate from it. This solution, which determines the arrival process for the system, implies the opening and closing times of the system. We also discuss a system with exogenous opening and closing times, and study the impact of these constraints on customers’ behavior.
We found that in the case where there were no opening and closing time constraints, the Nash equilibrium is mixed and unique, and has a positive density along the interval , with some . is complete (that is, the CDF has no jumps) and continuous almost everywhere, with a connected support. In the case where the opening and closing times are constrained, the equilibrium may be either pure or mixed, and if the latter is the case, then it can also contain an atom.
In this paper we show how to compute the Nash equilibrium strategy for all of the above-mentioned cases. The equilibrium strategy, in general, is not \addedsocially optimal, in the sense that it doesn’t minimize the expected overall costs of all the customers. This is because the decision of when to arrive, taken by an individual, imposes additional losses on the others. The latter are often referred to as externalities. Therefore, finding the socially optimal solution is also of our interest. This allows us to compare the strategy that holds for the Nash equilibrium and the one that minimizes the overall cost. In order to compare \deletedbetweenthe two, we derive their ratio, which is called the price of anarchy (PoA). The value of the PoA can help us understand how much customers can \replacedreduceminimize their costs by cooperating with each other.
The analysis in the paper is performed for two types of environment\addeds. The first is the familiar stochastic environment. In this case we assume that the number of users is random and follows the Poisson distribution111One can think of a huge amount of potential users, each one participate with a significantly small probability. The Poisson approximation of the binomial distribution leads to our assumption (see more in [4]) and the service time\addeds are \replacedarefollows the exponential\addedly distribut\replacededion, independent and assumed to be work conserving. The second environment is fluid-based, and each user is associated with a drop of infinitesimal size. The stochastic model is more accurate but can provide only numerical results (and not analytical). The fluid model on the other hand can provide analytic results. Moreover, can be obtained as well. We make some observations regarding the relations between the two models later on.
The paper is organized as follows \replaced:. In Section 2 we describe the model motivation and provide a literature review. In Section 3 we present the model under study. In Section 4, we obtain the arrival equilibrium strategy for both the stochastic model and the fluid model. In addition, we compare via the fluid model the social cost of the equilibrium arrival strategy and the socially optimal cost. In Section 5, we obtain the above solution concepts for the constrained model. Finally, in Section 6 we summarize our main results.

2 Motivation and literature review

We next provide a motivation for the model under study. More specifically, we explain why adding earliness cost to our model is important. This is followed by a literature review.

2.1 Motivation

In the previous section, we introduced the concept of earliness cost. Whereas, earliness cost induced by making the effort of arriving earlier than desired. We next specify why we think it is vital to include it in the model. For this purpose, we consider the morning commute example. When commuting, it is very natural having a preferred arrival time. For the sake of demonstration, we consider an employee, that doesn’t want to wake up too early for work in one hand, but on the other hand, doesn’t want to arrive too late, when there are important meetings to attend. For this particular example, we set the desired arrival time to be 08:00 AM. The problem is, arriving at 08:00 comes with heavy traffic. As a consequence, each arrival point, is costly, due to the different cost types. In fact, each point comes with an aggregation of the three cost types. For illustration, we consider a few arrival epochs. Arriving between 05:30 to 06:30 AM induces an expected high earliness cost, low waiting cost and no tardiness cost at all, since heavy traffic is not expected and there is no reason to be late in this case. Arriving between 07:30 to 08:30 AM induces a high waiting cost due to heavy traffic, and relatively low earliness and tardiness costs. Whereby, arriving between 10:30 to 11:30 AM, induces an expected high tardiness cost, no earliness cost since no effort to arrive earlier was made, and probably low expected waiting cost as the traffic is probably flowing normally at that point.
The main idea is that when one needs to decide when to arrive, there are three type distinctive types of costs to consider. Moreover, they all should be under consideration simultaneously, as they are all time-dependant. To the best of our knowledge, we are the first to identify this additional cost (i.e. earliness) under a game theoretic environment222Vickrey, already in 1969, considered the earliness concept in [22], but not as a game.. We further suggest, that even in the proposed cafeteria problem in [14][15] and [16], one can also consider earliness cost. It is assumed in those studies that customers want to arrive to eat lunch when the cafeteria opens. But, it’s very likely that customers don’t arrive early to the cafeteria since it is not convenient for them (e.g. not hungry yet) and not because it is not open, as in many cases, they are open all day long. This inconvenience induces earliness cost and it should be distinctive to other two cost types, waiting or tardiness. Further examples which describe the proposed arrival dilemma are, going to the supermarket, the gym and to the playground with the kids. Those places are open most of the time, but less crowded in the beginning or the end of the day, when it is less convenient to arrive.
The earliness cost can be interpreted in two ways. The first one is simply arriving too early, for example, by waking up at the break of dawn just to avoid traffic jams. The second is entering or completing service earlier than desired, for example, arriving really early to a concert in order to get good seats. However, in this study, we focus on the first option, where it does seem more natural in many scenarios of strategic arrivals. We take for example the morning commute dilemma. If one made the effort and arrived earlier than he originally planned, he really has no incentive to stay longer on the roads just to arrive to work at his desired time. That is, he is clearly better off arriving earlier to work rather than being stuck in traffic. However, the second option suggest that he might prefer waiting over arriving earlier to work, where obviously it is not the case333We refer the reader to [21] for a model with the second option..

2.2 Literature review

Similar queueing problems, in which customers need to decide when to arrive, have been introduced in recent studies. The first such study was by Glazer and Hassin [3], and they considered a model where service has an opening time point, which is set \replacedto beat time 0 (w.l.o.g). However, customers are allowed to arrive before time 0, thereby being referred to as early birds. In order to be served, customers must arrive prior to a predetermined closing time, which is denoted by and assumed to be positive. Similar to our model the total number of arrivals comes from a Poisson distribution. All customers wish to minimize their waiting time in the queue. In that study it was shown that there is a unique, mixed Nash equilibrium in the interval for some . It is also shown that the arrival distribution in the interval is uniform, and with a positive density distribution along . The authors showed that the expected waiting time for arriving any time within the arrival support is . This is because the expected waiting time is constant along the support and the queueing time of a customer who arrives at time is exactly , since he is guaranteed to encounter an empty queue. A subsequent study by Hassin and Kleiner [12] presented the same model, only with an additional restriction: arriving at is forbidden. They showed that unless the system is heavily loaded, the restriction does not change the average waiting time in a significant way. They also compared the equilibrium solution to the socially optimal solution using fluid models. They found that the ratio between them increases when the system becomes more heavily loaded. Another important aspect of this study was gaining a lower equilibrium social cost, while restricting the arrival times to two or three discrete points.
Until this point, only the waiting cost was considered. Juneja and Jain [16] introduced the concept of tardiness cost, which is added to the waiting cost in their model. Their model was inspired by a situation where customers decide when to arrive to a concert or a cafeteria. Each individual’s goal is to arrive at the time that minimizes the expression , where, and were set to be the linear waiting and tardiness costs per time unit respectively, is the arrival time and is the waiting time. Using fluid models, the resulting equilibrium was shown to be a uniform arrival distribution in the interval for some and . They also showed that the PoA is 2. This model differs from ours in two things. The first is that it doesn’t consider tardiness cost and the second that they consider a constant number of arrival, as opposed to our model where it comes from a Poisson distribution. A subsequent and more general study was published by Haviv [4]. As in [16], this study recognizes tardiness cost as well as waiting cost. However, the generalization of Haviv’s study is due to including both the case where early birds are allowed and the case where they are not. In order to get service, customers are obliged to arrive prior to a predetermined time ( is possible). If early birds are allowed, the obtained mixed equilibrium is a positive almost continuous arrival probability density function along the interval for some and , if . The arrival distribution is uniform for the interval . If early birds are not allowed, the result is an atom of a size denoted by at zero, an interval with a zero density, and some positive density along for some , or a pure equilibrium at time 0. However, when this means that the pre-imposed closing time will affect the system. Of course this will affect the solution, and now the upper limit of the arrival distribution support is replaced by . This model is almost identical to ours except we also consider earliness cost.
As mentioned, Juneja and Jain based their study on the concert/cafeteria problem. Other studies concerning this problem include [14] and [15], where the number of arrivals is finite and non-random, and one by Honnappa and Jain [13] which considered a multiple-server model in which customers’ decision is to choose a server. Another similar model was used in [20], which considered a model including waiting time along with penalties by index of arrival, and characterized the arrival process, which constitutes a symmetric Nash equilibrium.
Another study which include both waiting and tardiness cost was done by Breinbjerg [1]. In this study as opposed to the previous ones, nonlinear cost functions were considered and the service distribution is general. By using a novel approach he showed that there exists a unique symmetric Nash equilibrium along numerical examples. Beside the theoretical studies, there are several papers which includes empirical research. This allows to examine the accuracy of analytical equilibrium solution. Strategic queuing models with discrete arrival instances and deterministic service durations, the theoretical predictions were compared to empirical finding in controlled laboratory experiments, which provide support for the symmetric mixed-strategy equilibrium solution on the aggregate level (although not on the individual level), see ([2][17][18] and [19]).
More related work was done by McAfee and McMillan [10], and Haviv and Milchtaich [7]. Their contribution is in games, particularly in auctions with a random number of players. Haviv, Kerner and Kella [8] described a related study as well, in which there is a Poisson stream of customers to an loss system. Platz and Østerdal [11] studied a class of queueing games with a continuum of players and no possibility of queueing before opening time, and show that the first-in-first-out discipline induces the worst Nash equilibrium in terms of equilibrium welfare, while the last-in-first-out queue discipline induces the best. Another related set of papers concerns transportation. Vickrey [22] presented a deterministic model where commuters have full information about other commuters, and are able to change their arrival times in order to avoid heavy traffic. The model assumes a single bottleneck and a constant number of participants. Delay occurs only when the traffic flow exceeds the capacity of the bottleneck. Each commuter has a preferred time to pass the bottleneck. Just as in our model, there is a cost for arriving earlier than desired, and a tardiness cost. Later studies were published by Lago and Daganzo [6], Arnott [5], Ostubo and Rapoport [9], and their bibliographies.

3 The models

In this section we present the details, including cost functions, of both the stochastic and the fluid models.

3.1 The stochastic model

We consider a single-server queue in which customers decide when to arrive. The service times, , are independent and exponentially distributed with parameter and assumed to be work conserving. The server is active between predetermined opening and closing times, denoted by and respectively, where . The total number of customers, follows a Poisson distribution with mean . Each customer wishes to minimize three types of costs: earliness, tardiness and waiting. Earliness is the amount of time from arrival till \replaced0entering service, and is applicable only if the arrival time is before time 0. Tardiness is the amount of time after time zero that a customer enters service. Waiting is the time that a customer spends in the queue. All costs are linear in time, with slopes , and , for earliness, tardiness and waiting, respectively. To summarize, the total cost for a customer who arrives at time and enters service at time is \deleted:

Of course, the best thing for a customer would be to arrive at time 0 and encounter an empty system. That way, there will be no cost at all. We assume that the decision is taken prior to observing the state of the queue. Therefore, while making a decision, the only known variable\addeds \replacedareis the arrival time, and the marginal expected waiting and tardiness times. Let and be the expected waiting time and the expected total cost, respectively, of a customer who arrives at time . We have


where is the number of customers in the system at time . In Lemma 1 we present in terms of the model parameters.

Lemma 1.

where is the probability of having customers at time .


Remark 3.1.

The cost functions for and differ in two aspects. The first one is that an individual who arrives at needs to consider all three possible types of costs. However, an individual who arrives at avoids any earliness cost, and hence must consider only two types of costs. The second difference relates to the tardiness cost. For those who arrived after time 0, the tardiness time is simply the expected waiting time plus the tardiness time upon arrival. This is opposed to the case for those who arrive at , where we need to consider the fact that there may not be a tardiness cost.

3.2 The fluid model

In the fluid model each customer is considered as a tiny drop, where each drop is served in zero time. As opposed to the regular stochastic model, here we assume a constant volume of drops, which is denoted by . The server serves of them in each time unit. If the total volume in the queue upon arrival is , then the waiting time will be exactly . The earliness, tardiness and waiting parameters, , and , are as above. We denote by the proportion of drops that arrived prior to time . Fluid models are less realistic but can occasionally provide a good approximation to the stochastic model. They fit better in cases where both the arrival volume and the service rate are high, and no randomness in service is involved. \replacedTheyIt allows us to give an explicit and simple formula for the Nash equilibrium and the socially optimal strategies, which makes computing the PoA possible.

4 The case without opening and closing time constraints

In this section we present our analysis of the unconstrained models, i.e., , and , for both the stochastic and the fluid models.

4.1 Stochastic model

In this section we obtain the symmetric Nash equilibrium arrival strategy. We show that it is a continuous distribution with a support that is a connected interval, , with . We observe that , the density function associated with the Nash equilibrium strategy, is continuous everywhere except at the opening point , and at time 0. When we study the properties of the distribution that represents a symmetric Nash equilibrium, we observe that it cannot contain an atom. This is because, if there were an atom and a customer arrived an infinitesimally small moment earlier, he would achieve an atomic gain by paying an infinitesimal cost. We prove the above-mentioned properties in Lemmas 2 and 3.

Lemma 2.

In the unconstrained model, the mixed equilibrium strategy comes with an almost everywhere continuous density function, and has connected support (that is, there are no gaps in the arrival distribution).


Our proof is based on a contradiction argument. That is, we assume the existence of a gap and then show that the individual benefits from deviating, and prefers not to adopt the same strategy that all the others do. We treat two mutually exclusive cases separately. These two cases are 1) the gap interval is either to the left of time 0 or contains time 0, and 2) the gap interval is to the right of time 0. The proof for case 2 (the entire gap is positive) appears precisely in [4]. Thus, we provide here a proof for the first case only. Let and be the lower and upper bounds of the gap, respectively, with . We now examine what the individual can gain if he postpones his arrival by a small . By doing so, he reduces his earliness cost by , and his waiting cost by , and as long as he arrives before time 0 his tardiness cost remains the same. Thus, we eliminate gaps with a lower bound that is smaller than 0. This means that case 1 is not possible. ∎

We observe that, for any arrival time within the equilibrium support, the expected cost is . This is because, if the first customer to arrive comes at time , he will clearly pay only an earliness cost. Hence, his cost is and therefore his expected cost \replacedtoois as well. Combined with the fact that the cost function is constant for every value of along , this will be the expected cost for all customers at equilibrium regardless of when they arrived. So far, we have given general properties of the arrival distribution, . However, is yet to be obtained. Since an analytic expression for obtaining is implicit, we focus on how to compute it numerically. We next present a set of conditions which are satisfied uniquely by , and . Then, we describe a numerical procedure that computes them. First, due to the lack of atoms,


Second, due to the fact that is constant along , and hence the derivative is zero, we have


By standard arguments from dynamics in queueing processes we get that


Similar to [4], by combining (5) and (6), we conclude that


By the forward Kolomogorov equations, we also have


and for


We next identify the behavior of the system at the latest arrival time (under Nash equilibrium). From [4] (Lemma 2.2), we also have that in the unconstrained model:


This result will be useful in the numeric procedure.

Remark 4.1.

After deriving all the conditions above we can use a numerical procedure to find the equilibrium strategy. For practical reasons, we limit ourselves to a maximum number of possible arrivals, denoted by , such that

The corresponding forward Kolomogorov equation is


At equilibrium, customers are starting to arrive at time , and therefore the initial conditions will be

Before we give the guidelines that describe the numerical procedure, we note that we don’t have a closed-form expression for where . Therefore, we extract it from the Eqs. (4), (8), (9) and (11). The numerical procedure is as follows. We first guess a value for . Then, while using the dynamics in (8), (9) and (11), coupled with the equation we extracted for for , we compute and for any from until . Then we do the same for , only now for computing we use Eq. (7) instead. Stop when one of the conditions (3) or (10) are met. If the stopping criterion was based on condition (3) then we guess a smaller value of , otherwise we guess a larger one. This goes on until conditions (3) and (10) are met simultaneously, while allowing an error of , that is, the convergence error of the integral of is no larger than (see Fig. 1). Finally, we note that a bisection procedure is required for finding .

Lemma 3.

In the unconstrained model, the equilibrium arrival strategy has a positive density \addedfunction, , which is a continuous function except at the points and .


We commence with the point . According to the equilibrium arrival strategy, customers are starting to arrive at , which means that . We next show that , and by that we prove discontinuity at . Due to the fact that the system is empty until time , using (8) we have . Since customers are starting to arrive at time , the probability of zero customers in the system is decreasing and hence ; therefore as well. The next discontinuity point is at . From (6) one can see that if has a discontinuous point at , then will have the same. This is because only can be discontinuous in the equation. From (4) we get , and specifically for we assert that , and hence

and from (5) we get and specifically, for :

Thus, , which according to (6) means that has a discontinuity at . ∎

Theorem 1.

In the unconstrained model, a unique equilibrium arrival strategy with a positive density along the interval will be formed. , and obey Eqs. (3) to (10), where and . is continuous except at .

Before proving the theorem we provide the following lemma and the definitions. Let there be two different arrival strategies with the cumulative arrival distribution and and let and be the lower bounds of the arrival support of and respectively, where . Also, let and be the number of customers in the system according to and respectively. Finally, let be the lowest value in which and meet. Formally,

Lemma 4.

The expected cost of arriving at under is lower than arriving under .


We first state that the difference of the two expected costs can be only via the workload since they arrived at the same time. By employing a coupling argument, we claim that . This is because the arrivals prior to according to occurred earlier than those according to . Hence, according to , service completions occurred no later than those according to . Consequently the workload under is smaller and by that we complete the proof. ∎

We next prove Theorem 1.


We need to prove that the equilibrium is unique, since everything else has already been argued. Recall that by setting a starting arrival point at equilibrium, , and due to the a constant cost function (under equilibrium), a unique results. Furthermore, and determine the value of uniquely. Aiming for a contradiction we assume an alternative equilibrium strategy in which customers are arriving along the support where, (w.l.o.g.). We note that the expected costs of the original and alternative equilibria are and respectively, with . From Lemma 4, we get that there exist a point in which the expected cost under the alternative strategy is lower than arriving under the original strategy since . Since under mixed equilibrium the cost is constant, the fact that the orders between the costs at opening and at are reversed, rules out the existence of two equilibria.

4.2 Fluid model

Let’s consider the first drop to arrive. Clearly, it will not be after time . Moreover, this drop will be served immediately. This means that only earliness and waiting costs are under consideration. As time goes by and a workload accumulates, there will be a point in time at which a drop that arrived prior to time will enter service after time . Hence, all types of cost are under consideration. Once drops start to arrive after time , they avoid earliness cost. Consequently, there are three different time intervals with different cost function structures, and hence the mixed equilibrium arrival strategy includes three different formulas for the density. Our notation for and remains the same as for the stochastic model.

Theorem 2.

In the unconstrained model, the unique equilibrium density is a stepwise function\deleteds with three steps.

The corresponding social cost is


Since we seek for a symmetric Nash equilibrium, the cost function is constant along the support of the arrival distribution, and hence the derivative is zero. In the first part, only earliness and waiting costs are considered until a point in time at which arrivals are being served after time . In the second part, all three costs are taken into account. This means that a drop that arrives at the queue at will exit at . The third part contains both waiting and tardiness costs. In summary, we have three different parts with three cost functions, and hence three different arrival densities. Let be the first part’s arrival density period, where is the time point after which arrivals will pay a tardiness cost. The cost function of this part is\deleted:

After taking the derivative and comparing to zero we will get the result as stated above. We can reason in the same spirit about the second and third parts, where the cost functions are


respectively. The values of , and are the solution of the following set of equations: , and . The first equation arises due to the constant cost for all arriving drops. Therefore, the first drop to arrive and the last will have the same cost. The second equation shows that a drop arriving at will exit the system at time 0. Finally, the third equation sums the pdf to 1. The corresponding social cost is simply times the overall cost of each drop. ∎

We next present the socially optimal strategy and its overall cost.

Theorem 3.

The unique socially optimal strategy has a uniform density of along . The corresponding social cost is


The socially optimal arrival rate is uniform with rate in order to avoid waiting cost. The values of the lower and upper bounds of the arrival (which we denote by and respectively) are the ones that minimize the social welfare cost function, where clearly


In addition, in order to ensure that the total volume is , the condition should be met. Now obtaining the values of and is straightforward. Finally, the social welfare results directly from (13). ∎

The PoA is a direct result of dividing (12) by (13). In the unconstrained model it equals exactly 2.

Remark 4.2.

In the arrival density at equilibrium the first step is larger than the second step, and the third is smaller than the second.

Figure 1: Numerical example: the equilibrium arrival distribution in the unconstrained model, for three different set values of , and .

5 The case with opening and closing time constraints

In this section we present our analysis of the constrained models, i.e., where and , for both the stochastic and the fluid models.

5.1 Stochastic model

In this subsection we study the effect of arrival time constraints on the equilibrium arrival strategy. Due to the complexity of the case where both of the constraints are effecting customers behaviour, we first discuss the case where only the closing time is constrained (i.e., , ), then the case where only the opening time is constrained (i.e., , ). Finally, consider both of them simultaneously.

5.1.1 Constrained closing time:

While studying the effect of constraining the closing time, we first observe that if the unconstrained equilibrium meets the constraint (i.e., ), then the constraint has no effect on the customers’ behaviour. Thus, we deal here only with the opposite case, . As before, the equilibrium arrival strategy is a mixed strategy along an interval with a complete density (that is, without any atoms). The lower bound of the support of , , is a part of the solution and needs to be found. We follow the same line of analysis as in Theorem 1, but with two adjustments. The first one is that from Eq. (3) is replaced by and the second is that Eq. (10) no longer holds. Actually, it is no longer in use because the closing time is not exogenous. Notice that if is finite but not effective (i.e., ), then our results remain the same. We give further details and prove our results in Theorem 4.

5.1.2 Constrained opening time:

While studying the effect of constraining the opening time, we first observe, just like the case above, that if the unconstrained equilibrium meets the constraint (i.e., ), then the constraint has no effect on the customers’ behaviour. Thus, we deal here only with the opposite case, . The structure of the equilibrium distribution in this case is significantly different to those we have seen before. The difference is that a complete density starting at time cannot be an equilibrium arrival strategy. Instead, the structure of the equilibrium is either one in which all customers arrive at time , or else there is an atom of size at time , followed by a gap, and then a positive density. For further analysis, we give the following definitions. Let be a random variable that follows a Poisson distribution with parameter . Let be the expected overall cost of arriving at time , given that arrives at and no-one else arrives in the interval . Let , be the expected overall cost of arriving at among more customers. If everyone arrives at , arriving a moment later is clearly not beneficial. Moreover, arriving at any time is suboptimal, since the longer a customer waits, approaching time 0, his expected earliness and waiting costs both reduce, while his tardiness cost remains the same. Therefore, the best response to everyone else arriving at is either arriving at as well, or at some . Let be the best response, besides ; then . If then there is a pure equilibrium at time . That is, even the optimal arrival point besides arriving with everyone else at is more expensive than simply arriving at as well. However, if , the equilibrium arrival strategy is mixed, and incorporates an atom at time , followed by a gap, and then a positive density. Now, if arriving at is better than arriving with everyone else at it can no longer hold for symmetric Nash equilibrium. Consequently, an atom which is smaller than 1 is created at , and only after a while customers will arrive again. That is, there exists an atom size such that for some . We denote the upper bound of the arrival support as and distinguish it from the notation of the upper bound when there was no effective opening time constraint . We give further details and prove our results in Theorem 4.

5.1.3 Both opening and closing times are constrained:

To this end, we have discussed cases in which only one of the time constraints is effective. We next address the cases where both of them are. We split into two cases in order to simplify. First, let us consider the case where and . One can look at this scenario as if only the closing time is constrained (while ignoring the opening time constraint), and when computing the arrival strategy it resulted in a new initial arrival point . However, if the solution in no longer valid. Clearly, the equilibrium arrival strategy can no longer involve a complete density at time . In fact, an atom at time is guaranteed. Furthermore, a pure equilibrium strategy is possible. Now, let us explore a second case in which and we relate to later. That is, we ignore the closing time constraint for the time being. If , then a pure strategy is formed regardless to . If , we define the following: Let be the smallest that satisfies . Suppose now that , this means that a pure strategy is formed again (where now, is effective). But, if , then, this means that there is an arrival time that is better than arriving at with everyone else. In this case, customers will start arriving from until if there was no effective closing time constrained. However, if , then there will be an atom which is smaller than 1 at and then customers arrive from until . We summarize our results for all of the various cases in the following theorem. We present them by dividing the possible cases into three different types of equilibrium arrival strategies: 1) pure, 2) mixed with an atom, and 3) mixed without atoms.

Theorem 4.

One of the following exhaustive and mutually exclusive cases occurs.
Case 1: The equilibrium strategy is pure and it prescribes arriving at if or and .
Case 2: A mixed equilibrium which incorporates an atom with size at , then an interval with zero density, followed by a positive density from until . This will be formed if one of the following two conditions occurs:
\romannum1 and , or
\romannum2 and . The following conditions need to be obeyed.


The initial conditions at time are




Finally, if then


Case 3: A mixed equilibrium strategy without atoms, and with a discontinuity point at time 0. This will be formed if one of the following occurs:
\romannum1 and , or
\romannum2 and .
\romannum1 is equivalent to the case in Theorem 1. \romannum2 is equivalent to the case in Theorem 1, with two exceptions. The first one is the support of , which is now along . The second is that condition (10) is no longer satisfied.


Case 1: The condition implies that the cost associated with the best response to every other player arriving at time is worse than just arriving at . , under the assumption that , implies that all arrival times that have lower overall cost than arriving with everyone else at time are no longer possible within the system constraints.
Case 2: Since and , there is no pure equilibrium. In addition, a density that starts at time cannot be part of the equilibrium. The reason for that is as follows. If there were a density starting a time at equilibrium, then a customer who arrives at time suffers only the earliness cost, and hence his total cost is . As, under mixed equilibrium, the customers are indifferent about when to arrive, this is the total cost of everyone else. It is equivalent to either (under condition \romannum1 ) or to (under condition \romannum2 ). Note that neither of the latter two conditions is the case. In addition, once an atom is created at , arriving a moment later is strictly suboptimal and hence a gap in the interval is created. Eq. (14) is obeyed, due to the fact that the expected total cost is constant along the support. Eqs. (15) and (16) are obeyed by the same consideration of Eqs. (3) and (7). Eqs. (17) and (18) follow from simple probability considerations. Eq. (19) implies that customers are starting to arrive for the first time after time at , which is clearly the case. Finally, we assert that Eq. (20) holds, by using the same argument starting from (10).
Case 3: Condition \romannum1 is equivalent to Theorem 1, since the opening and closing time constraints are not effective. Condition \romannum2 suggests that only the closing time constraint is effective. This means that no atoms can be formed as argued above in subsection 4.1. ∎

We next provide the steps needed for numerical computation of the mixed equilibrium in the constrained stochastic model.

Remark 5.1.

If the equilibrium arrival strategy is mixed with an atom, we make a guess for , then compute such that , where

Given , we compute the initial conditions by (17) and (18). After obtaining and the initial conditions at time , we use a similar procedure to the one described in Remark 4.1. We first compute and ignore for the time being the fact that it may be larger than . This is done by computing and for any from until one of the conditions (15) or (20) is met. The probabilities are computed using


If the stopping criterion was due to condition (15), then we guess a smaller value of ; otherwise we guess a larger one. This goes on until conditions (15) and (20) are met simultaneously. After obtaining , we can check if or not. If , then we finished. If , we again make a guess for , although now we compute until time , and we repeat this until condition (15) is met at . Finally, if the equilibrium arrival strategy is mixed without atoms, we repeat the same procedure as in Remark 4.1, with replaced by a fixed . As in the previous section, this is achieved by allowing an error of (see Figs 2 and 3).

Figure 2: Numerical example: the equilibrium arrival distribution in the constrained model for different values of . The equilibrium arrival strategy under the green graph, has an atom at of size . The gap is until . Arrival in the interval comes with an earliness cost (among possible waiting and tardiness), but by arriving within the interval , one avoids cost. In the blue, red and black graphs, earliness cost are only for those who arrived in the atom at , whereas, after the gap, customers arrive after .
Figure 3: Numerical example: the equilibrium arrival distribution in the constrained model for different values of . The three grpahs illustrates all types of possible equilibria. For example, in the lowest graph (i.e. ), there is an atom at of size and under the stochastic and fluidic model, respectively. Under the stochatic model (the green graph), there are two different probability densities (arriving prior and after 0) for those who arrive after the atom. Under the fluidic model, there are three different probability densities: (1) , customers have earliness and waiting costs. (2) , customers have all cost types. (3) , customers have waiting and tardiness costs.

5.2 Fluid model

As in the previous section, the total amount of time the server is needed in the fluid model is . Under the opening and closing time constraints, the total amount of time during which customers are allowed to arrive is . If it is larger than the total time needed, i.e., , then at most one of the two constraints is tight. Specifically, if then customers are starting to arrive from time until some (possibly pure at time ). If then customers are starting to arrive from some until time . We deal with both cases separately in Theorems 5 and 7, respectively. Of course, if both and , then the situation coincides with our results from Theorem 2. However, if the total amount of time customers are allowed to arrive is smaller than the total time needed to serve them (i.e., ) then things are more involved. This is because both the opening and closing times of the system need to be considered while obtaining the equilibrium arrival strategy. We deal with this case in Theorem 9. For each one of the cases above we specify the corresponding socially optimal strategy. Before presenting the equilibrium arrival strategy, we define several points in time and probabilities that play a role in the specific structure of the equilibrium.