A Solution Approach to the Daily Dockworker Planning Problem at a Port Container Terminal

This study focused on vital resources at port container terminals such as quay cranes and dockworkers. We studied the impact of incorporating the dockworker assignment problem (DWAP) into the quay crane assignment problem (QCAP). The aim of this study was to formulate and solve an integrated model for QCAP and DWAP, with the objective of minimizing the total costs of dockworkers, by optimizing workers’ assignment, so that the ships’ costs due to the time spent in the port are not increased. We proposed an integrated solution approach to the studied problem. Our proposed model has been validated on an adequate number of instances based on the real data. Obtained solutions were compared with the solutions obtained by the traditional sequential approach. It was demonstrated that, for all solved instances, our proposed integrated approach resulted in a reduction in the total costs of dockworkers. The major contribution of this study is that this is the first time that these two problems were modeled together. The obtained results show significant savings in the overall costs.


Introduction
Maritime container transport has a key role in international trade. Increase in maritime container transport arises from the growth of international trade of general cargo [1]. Constant increase in maritime container transport and the larger capacity of container ships imply greater transshipment demand in container ports [2,3]. Resources such as berth and quay cranes (QCs) are essential in port container terminals (PCTs); they affect the capacity of the PCT and ship's turnaround time [4,5]. e availability of these resources is considered to be of utmost importance for PCT operators.
Furthermore, in situations where low levels of automation are present, workers are a vital resource and a key production factor of a PCT [6]. When the number of qualified dockworkers is limited, the development of methods that enable more efficient use of this important resource is very challenging. Very strict workers' union requirements are hard to satisfy; this adds significant complexity to an already challenging problem.
A PCT has a limited berth (quay) length that has to be allocated to moored ships. Two ships cannot be assigned to the same space at the same time.
is problem is defined as the Berth Allocation Problem (BAP). Berth is equipped with QCs which are used to unload/load containers from/to the ships. Quay Crane Assignment Problem (QCAP) determines the assignments of quay cranes to each ship. QCs are assigned to a ship based on the total operation time of QCs required to unload and load all containers from and to a ship, the berthing schedule for the ship, the ship length, and the agreement between the shipping company and the PCT operator. Dockworker assignment problem (DWAP) determines the assignments of workers to all container handling equipment.
Dockworkers involved in both ship and housekeeping activities at PCTs make up to 80% of the total PCT workers [7], while the costs of these workers at PCTs account for more than 50% of the total operating costs of the PCT [8].
ese facts indicate the importance of considering and solving DWAP.
is problem is traditionally solved last, after allocation of berth space and formation of the operation schedule for each piece of handling equipment [9].
is approach leads to the engagement of a large number of gangs that are only active for the part of the shift. Gangs are operational teams that are formed from workers with a desirable skill mix [7].
PCTs resource allocation problems and different planning problems are addressed, modeled, and solved by several authors [10][11][12]. However, not much attention is given to the worker planning and assignment problems. e aim of this study is to formulate and solve an integrated model for QCAP and DWAP(QCDWAP) in order to minimize the total costs of dockworkers. We focus on optimization of workers' assignment, so that the ships' costs due to the time spent in the port are not increased.
is paper is organized as follows. e literature review is discussed in the next section. e problem description is presented in Section 3. Mathematical formulation for QCDWAP is presented in Section 4. Section 5 introduces a solution approach to the studied problem. Numerical experiments, instance generation, results, and discussion are presented in Section 6. Finally, concluding remarks are presented in Section 7.

Literature Review
Due to the union agreements and regulations related to workers, a shift plan (working schedule) must be prepared over a planning horizon of typically a month duration [13]. e ships' schedule reliability is not always sufficient to determine workload demand over the planning horizon. According to Johnson [14], the average deviation from the estimated time of arrival amounted to 1.16 days. Due to this variation, the dockworker planning problem is decomposed into two planning levels: a long-term and a short-term worker planning problem [7,[15][16][17][18][19].
During the first planning level, a long-term worker plan is determined as a solution to a long-term workers planning problem. Since there are no exact data for workload demand during this phase and there is uncertainty associated with this demand, a PCT operator is allowed to introduce some flexibility into the workers' assignments. At this planning level, a worker can be assigned to a regular shift, a flexible shift, or a day off. A regular shift is one of the four consecutive six-hour shifts. If a flexible shift is assigned, that implies that a worker will work during that day, but the exact shift will be determined later, once the exact workload demand is available. is is addressed during the second planning level.
During the second planning level, a short-term (daily) worker planning problem is solved. During this phase, workers that are on duty during the considered day, according to the long-term worker plan, can be divided into two groups. e first group is comprised of workers assigned to regular shifts, and the second group is comprised of workers assigned to flexible shifts. During this phase, the workers in the first group are assigned to specific tasks, as their shifts are already predetermined. For the second group, each worker is assigned to one of the regular shifts (instead of a flexible one), and he/she is assigned to a specific task during that shift. If there are still unassigned tasks, workers are offered extra (bonus) compensation if they accept additional work [6]. A PCT operator can hire temporary workers if a shortage of permanent workers occurs. In the end, during this phase, it is also necessary to determine the number of temporary workers that the PCT operator would hire, as well as the tasks that hired workers would perform.
ese decisions are made on the basis of the different sets of input data and for different planning horizons, and the problems that are solved are completely different in nature.
is study is focused only on the daily worker planning problem (short-term).
e dockworker planning problem within PCTs is presented in detail and solved by several authors [7,[15][16][17][18][19]. Legato and Monaco [7] studied and modeled both long-term and daily worker planning problems at Gioia Tauro container terminal. To solve these two problems, they proposed and used branch-and-bound algorithm. Vukicevic et al. [20] proposed the Bee colony optimization to solve a daily worker planning problem. Francesco et al. [16] proposed an optimization model for a short-term planning problem for a two-day planning horizon that modeled the personnel undermanning at the container terminal. Unlike Legato and Monaco [7], they defined two types of activities: ship and housekeeping activities. Ship activities are comprised of loading and unloading operations. Housekeeping activities are comprised of handling operations within the storage yard. For the first day of the planning period, the decisions are immediately implemented, while the previous second day in the model becomes the first within the next optimization. Francesco et al. [17] proposed two ways to remedy the shortcomings of the previous model: clustered flexibility and shift splitting. In addition, they modeled personnel overmanning. Both clustered flexibility and shift splitting led to a decrease in personnel overmanning and personnel undermanning and consequently to the overall costs of dockworkers' reduction. Francesco et al. [15] proposed an optimization model for the same problem, where they omitted the assumption that there is a perfect match between the ship's handling time and the shift duration. Zanda [19] thoroughly presented two optimization models proposed by Francesco et al. [15,17]. e author tested both models on real examples from the largest transshipment container terminals within the PSA Singapore. All instances are optimally solved within an acceptable CPU time.
Meisel and Bierwirth [21] were the first to point out a relationship between the berth allocation and quay crane assignment problem (BACAP) and DWAP, as well as the impact of QC idle times on costs of dockworkers. ey integrated BAP and QCAP problems in order to increase the resource utilization at container terminals. ey indicated that changes in the number of QCs assigned to ships during one shift led to employment of a large number of QCs and gangs, since some of them were assigned to ships for only part of the shift and were idle for the rest of the shift. is is particularly true when handling a large ship begins at the end of the shift. ey discussed the creation of QC idle times when the daily working period is divided into three shifts. In order to minimize QC idle times, they proposed the heuristic scheduling algorithm. Meisel and Bierwirth [22] proposed a mathematical formulation of BACAP that encompasses the loss of productivity due to the QC interaction and extension of the ship handling time if the ship is not berthed at its desired position at the berth. ey minimized the total service costs: speed-up cost, delay cost, penalty cost, and operation cost.
Traditionally, QCAP and DWAP were studied and solved separately (sequentially). Even though the studied QCAP and DWAP problems are often solved separately, they are strongly interconnected (or related) and solutions to both problems are affecting the total costs of dockworkers. In the current literature, according to our findings, there are no studies studying the integration of QCAP and DWAP. We combined these two problems and focused on the total costs of dockworkers.

The Problem Description
Prior to any ship's arrival, a PCT operator prepares an operation plan (or predictive operation plan) for each ship, based on the agreement with the shipping company and information received from the shipping companies and agents.
e most important information (received data) consists of the number of containers that need to be unloaded/loaded from/to the ship as well as the ship's stowage plan and the expected time of arrival (ETA). e ETA depends on many factors such as times spent in previous ports, travel times, weather conditions, and tides. However, even the smallest deviation from the ETA can cause significant handling disruption and underutilization of resources. e longer the planning period, the higher the probability that there will be deviations. erefore, forming PCT daily operation plans is of utmost importance in the planning process. If we divide the PCTdaily working period into one-hour time segments and express the total operation time of cranes required to unload and load all containers for each ship in crane-hour time segments, then we can graphically illustrate the berthing schedule for a given number of ships. Graphical illustration is presented below for six ships, labeled A and B to F, at berth in a space-time diagram (Figure 1(a)). Each rectangle represents a berthing schedule for a ship. Horizontal side represents a berthing position and its length corresponds to the length of a corresponding ship. Vertical length corresponds to the ship's handling time. e number of assigned QCs for each time segment during the handling process is presented on the lefthand side of the rectangle. It is obtained from solutions of BAP and QCAP for an illustrative example (discussed in [23]). e number of employed QCs, which are assigned to ships for each time segment is a sum of employed QCs for every ship in that time segment during the planning horizon (24 hours) (Figure 1(b)).
Port container terminal's daily working period of at most 24 hours is often divided into three or four shifts, being equal to 8 or 6 hours, respectively. Dockworkers are grouped in gangs that have an appropriate skill mix. One gang operates one QC [24]. According to agreements and regulations, gangs are paid for a whole shift even if they are assigned to QCs for only part of the shift and are idle for the rest of the shift. e number of required gangs during one shift is equal to the maximal number of employed QCs during that shift ( Figure 1(c)). For this illustrative example, the number of required gangs during the first three shifts is 9 per shift and during the fourth shift is 6 gangs.

Mathematical Formulation
In our study, the proposed optimization model for QCDWAP determines the start and the end of the ship handling times, the number of employed QCs for each time segment during the ship's handling for each ship, and the assignment of workers to shifts and tasks, considering previously known berthing schedule. It is not possible to interrupt the ship's handling once it started. e ship's handling starts by assigning at least the minimal number of QCs to the ship, agreed between the PCT operator and the shipping company. is part of the formulation exists in the literature [22,25] and represents a part of the formulation for BACAP.
In our study, we modify this part of the formulation discussed above. We define a three-dimensional variable, and a time window within which handling of the ship must be performed. We assume that the number of assigned QCs can vary during the ship's handling. e second part of the formulation refers to DWAP. Workers are assigned to shifts and possibly to additional shifts. Workers are as well assigned to tasks. Similarly, a decision is made related to the number of hired temporary workers. Each worker can be assigned to one of the tasks from a set of tasks for which he/ she has the appropriate qualifications based on the certificate or training. e objective is to minimize the total costs associated with workers or workforce costs.

Mathematical Problems in Engineering
We use the following notation and parameters when formulating the linear integer programming model (M1): Sets PH-the set of one-hour time segments in the PCT's daily working period; Tthe set of one-hour time segments in the shift; τ-the number of one-hour time segments in each shift, τ � |T|; Sthe set of ships, Wthe set of workers on duty during the considered day, W Dthe set of workers that can be assigned to additional shifts, W D⊆W; Jthe set of shifts, τ � |PH|/|J|; J w -the set of shifts that can be assigned to worker w during the daily planning period, J w ⊆J; Kthe set of tasks; K w -the set of tasks worker w is able to perform, K w ⊆K.

Parameters:
S i -the time segment starting from when the ship i is ready, at the berth, for handling (the earliest starting time of handling of ship i); E i -the latest time segment until which the ship i is available for handling (the latest ending time of handling of ship i,);

Mathematical Problems in Engineering
NQC-the total number of available QCs; qc min i -the minimal number of QCs that must be assigned to ship i during handling; qc max i -the maximal number of QCs that can be assigned to ship i during handling; qch i -the number of crane-hours needed to unload and load all containers from and to a ship i; U jk -the number of available temporary workers; m k -the number of workers who perform the task k in one gang.
We introduce the following decision variables: ; r ip -binary variable, r ip � 1 if any QC is assigned to ship i in time segment p; n jk -integer variable, the total number of assigned tasks k during shift j; u jk -integer variable, the number of tasks k assigned to temporary workers during shift j, c 3 jk -associated cost; x wjk -binary variable, x wjk � 1 if task k is assigned to worker w during shift j, c 1 wjk -associated cost; y wjk -binary variable, y wjk � 1 if task k is assigned to worker w during shift j, where shift j is his/her additional shift, c 2 wjk -associated cost; g j -integer variable, the number of gangs that work during the shift j.
e objective is to minimize the total costs of dockworkers. e first part of the sum is related to the costs of workers during the regular workers' shifts. e second part is related to the costs of additional shifts, and the third part is related to the costs of temporary workers: j∈J t∈T p · r ip ≤ e i ∀i ∈ S, p ∈ PH, j∈J w k∈K w j∈J k∈K j∈J k∈K j∈J k∈K k∈K\K w y wjk � 0, ∀w ∈ W, j ∈ J. In order to ensure uninterrupted ship's handling, an auxiliary variable r ip is introduced. Constraints (4) and (5) define variable r ip by relating it to q ijt , the number of QCs assigned to ship i in the t-th time segment of shift j (see [22,25]). Each ship must be handled continuously, starting from the time segment s i and ending at the time segment e i which is ensured by constraints (6) to (8) (see [22,25]). Constrains (9) and (10) ensure that the ship's handling must be performed within a time window [S i , E i ] obtained from the berthing schedule. Constraint (11) ensures that the number of QCs assigned to all ships in each time segment does not exceed the available number of gangs assigned during that shift. Equation (12) defines the total number of assigned tasks k during shift j which is denoted by a variable n jk . Each gang must have an appropriate skill mix, which is guaranteed by constraint (13). Constraint (14) provides an upper bound for the number of tasks k assigned to temporary workers during shift j which is denoted by variable u jk . Each worker from a set W must be assigned to one task, from a set of tasks that he/she can perform during one shift, from a set of shifts that can be assigned to him/her (15) and (16). A maximum of one additional shift can be assigned to each worker that belongs to the set WD, while the remaining permanent workers W\WD cannot be assigned to additional shifts (17) and (18). e assigned additional shift can only be a shift that is subsequent to the regular shift (19) and (20). A worker, if assigned to an additional shift, can only be assigned to a task from a set of tasks that a worker can perform (21).

A Solution Approach to the Studied Problem
We will discuss a proposed integrated approach and compare it to the traditional sequential approach. e overall procedure for both approaches is presented in Figure 2.
In the first phase, within the integrated approach (Figure 2(a)), we solve BAP using the data obtained for each ship, such as ETA, desired position at berth, and calculated operation time of QCs required to unload and load all containers. In the second phase, by using the obtained time window [S i , E i ] from the BAP's solution and a long-term worker plan, we solve model M1 and determine the start and the end of the ship handling times, the number of employed QCs for each time segment during the ship's handling for each ship, and the assignment of workers to shifts and tasks (Figure 2(a)).
We also solve the studied problem by the sequential approach (Figure 2(b)). In the first phase, we solve BAP and QCAP to obtain a ship's berth position, the start and the end of ship handling times, and the number of employed QCs for each time segment during the ship's handling for each ship. In the second phase, we solve DWAP and determine workers' assignments. Precisely, we modify the model M1 proposed in Section 4 into the model M2. e model M2 determines only assignments of shifts and tasks to workers.  Model M2 is as follows: Min (1), subject to constraints (11)-(21).

Numerical Experiments
Considering that this is the first time that these two problems are integrated, there are no available test data sets (instances) in the existing literature that we could use to verify/validate the results. To solve BAP and QCAP and generate input data, we used subgradient optimization procedure (SOP) used by Park and Kim [23] and similar sets of data in order to solve our daily QCDWAP. Similar data sets incorporated the same berth length, number of cranes, and unit costs; the only difference is the number of ships that need to be served within the observed planning period (24 h).
When solving BAP, we use the time and berthing position-dependent ships' costs function defined in Park and Kim [23] and Rashidi and Tsang [5]. Ship's costs function consists of four parts: speed-up cost if berthing time is earlier than its ETA, waiting cost if berthing time is later than its ETA, delay cost if completion time is later than its EFT (expected finishing time), and penalty cost which corresponds to the deviation between berthing position and the desired position at berth. Based on the obtained solution, we have set a time window within which the ship i must be handled [S i , E i ] at berth, so that the ship's costs due to the time spent in port are not increased. We have set the time window as follows: S i � berthing time and E i � max (completion time, EFT) for each ship.

Instance Generation.
e set of data consists of 35 instances and contains 5 instances of 10 to 16 ships. e length of berth is 1200 m. It is divided into 10 m length segments, equipped with 11 QCs. We have set the minimal number of QCs that must be assigned to a ship to be 2 and the maximal number of QCs that can be assigned to a ship to be 5 [23]. In addition, unit costs were assumed to be as in Park and Kim [23]: the container handling cost per unit distance between the berth and the yard ($1000), the speed-up cost per unit time of arrival before ETA ($1000), the waiting cost per unit time if berthing time is later than its ETA ($1000), and the delay cost per unit time if completion time is later than its EFT ($2000). e other parameters are randomly generated from a uniform distribution: arrival times of ships U (1, 13), the operation time of QCs required to unload/load all containers from/to a ship U (6,20), the lengths of ships in length segments U (15,35), and preference positions for ships U (1, 120) [23].
Additional input parameters needed for the workers' assignments are generated based on the data given in Serra [18]. e 24-hour period is divided into 4 six-hour shifts. One gang is made up of one quay crane operator (QCO), two yard crane operators (YCO), and three truck trailer drivers (TTD). QCO task requires the highest qualifications, while the TTD task requires the lowest qualifications. A worker who is qualified to perform a task that requires a higher level of qualifications (main task) can also perform tasks requiring a lower level of qualifications but will be paid on the basis of qualifications, that is, according to the main task. For these three levels of qualifications (main task), costs of workers are as follows: 25 €/h, 22 €/h, and 20 €/h, that is, 150 €/shift, 132 €/shift, and 120 €/shift for six-hour shift [18]. e costs of workers in the additional shift are 10% higher than the costs of workers in the regular shift.
We assumed that any task can be assigned to temporary workers if they have appropriate qualifications. e costs of a temporary worker depend only on an assigned task: 29 €/h for QCO task; 27 €/h for YCO task; and 25 €/h for TTD task [18]. We assumed that 60 permanent workers are on duty during the observed day, of which 18 QCOs, 18 YCOs, and 24 TTDs. Besides, 100 temporary workers are available to work on the planned day for each shift, 30 QCOs, 30 YCs, and 40 TTDs. e input to our QCDWAP model is the result of the long-term worker planning problem, that is, assigned shifts for the longer period (a long-term worker plan). e shift of the worker was generated from the discrete uniform distribution U (1,5), where the numbers 1 to 4 represent four regular six-hour shifts, and 5 represents a flexible shift. From the set of PCT workers, 10% of workers were selected randomly, and they can be assigned to additional shifts.
Since, for testing, we assumed that the costs of permanent workers depend solely on workers' level of qualifications (main task), and the costs of the temporary workers depend on the assigned tasks, the objective function can be formulated as follows: where k (w) is the qualification level of worker w (main task of worker w). Same as discussed above in (1), the first part of the sum accounts for the costs of workers during the regular workers' shifts, the second part accounts for the workers' costs if assigned to additional shifts, and the third part accounts for the costs of temporary workers.

Computational
Results. e proposed approaches are coded in MATLAB. e IBM ILOG CPLEX 12.6 is used to solve models, running on a PC with 2.2 GHz Intel core and 7.6 GB of RAM (Table 1). e solution obtained for the illustrative example given in Section 3, by the proposed integrated approach, is presented in Figure 3. Compared with the solution shown in Figure 1, the implementation of the integrated approach resulted in the following: (1) An adjustment of the berthing schedule (Figure 3(a)): the handling times of three ships have been shortened: for ship A from 4 to 3 time segments, for ship C from 7 to 6 time segments, and for ship F from 10 to 9 time segments Mathematical Problems in Engineering  A comparison of the solutions for the illustrative example obtained by the sequential approach and the integrated approach is presented in Figure 4.
Implementation of the integrated approach to the illustrative example resulted in a lower number of required gangs (Figure 4(b)) compared with the sequential approach (Figure 4(a)). During the first two shifts, the number of required gangs changed from 9 to 7. During the third shift, this number dropped from 9 to 6, while it remained constant during the fourth shift (at 6).
us, the total number of required gangs during the planning horizon is reduced from 33 to 26. For this illustrative example, the overall decrease is 7 gangs which would result in savings as discussed below.
As already stated, we solved 35 examples by both approaches. e results obtained by the integrated and the sequential approaches are presented in Table 1. e first column indicates the number of ships (or the problem size). e second column indicates an instance ID number. e total number of gangs needed to serve all incoming ships is given in column G, and the total costs of dockworkers are given in column Z. e integrated approach (1) improved the quality of the solutions when compared with the sequential approach (2). e integrated approach resulted in a lower number of dockworkers, and the savings in total costs of dockworkers of 11.78%-38.15% compared with the sequential approach. e visual comparisons of the number of gangs and the total costs of dockworkers resulting from the two approaches are shown in Figure 5.
In order to compare the mean costs obtained by these two approaches, we first tested if variances are equal for all instances. To check variances equality (H 0 : σ 2 I � σ 2 S ) we used an F-test. Degrees of freedom are n I − 1 � 4 and n S − 1 � 4, where n I and n S are the number of examples (equal 5 for both approaches). For α � 0.05 for all tests, F ≤ F α�0.05 � 6.388, so we can conclude that variances are equal (see Table 2) for all instances.
We applied a two-sample Student's t-test with equal variances to test if there is a significant difference between the two mean costs obtained by the two approaches. We compared the null hypothesis (H 0 : μ S � μ I ) with the alternative hypothesis (H a : μ S > μ I ), where μ I and μ S are the population means (costs) for the integrated and sequential approaches, respectively. For the level of significance α � 0.05, the critical value is t α � 1, 86. Degrees of freedom are 8 for all tests (n I − 1 + n S − 1) � (5 -1 + 5 -1) � 8. e results of the conducted tests are given in Table 2.
Since t > t α�0.05 � 1.86 for all tests, there is evidence to reject the null hypothesis. us, there is a statistically significant difference between the two means, or the costs are significantly lower for the integrated approach, for all problem sizes.

Conclusions
is study focused on dockworkers' and quay cranes' assignments at the PCTs. We studied the impact of incorporating the dockworker assignment problem (DWAP) with the quay crane assignment problem (QCAP) at the operational level (QCDWAP). is is the first time that these two problems are modeled together, and the integration of these two problems is considered to be a major contribution of this paper. In this study, we formulated a linear integer programming model with the objective function defined from the PCT operator's point of view. Our proposed integrated approach, as well as the model, has been validated on a sufficient number of instances based on the real data. e quality of the solutions has been assessed by comparison with the solutions of the traditional sequential approach. We demonstrated that, for all solved instances, our integrated approach to QCDWAP resulted in lower total costs of dockworkers. e average objective function value improvement rate of the solutions obtained by the integrated approach compared with the solutions obtained by the sequential approach is 26.43%. Based on our promising results, we strongly recommend this approach/formulation when solving these two problems. Incorporating the quay crane scheduling problem (QCSP) with two studied problems will be a topic for our future research.

Data Availability
All data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.