{'fraction_non_alphanumeric': 0.02451455551733842, 'fraction_numerical': 0.008317438479096963, 'mean_word_length': 5.234307992202729, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Study of Continuous Berth Allocation Algorithm Based on Fairness Maximization

Given the minimum total time of vessel in port or minimum penalty cost as a functional objective, present berth-quay crane integrated scheduling model lacks fairness index of the service provided to vessels by the terminal. This phenomenon can affect the operating efficiency and the reasonable scheduling between terminal and vessel. This study proposed a multi-objective fair and continuous berth allocation algorithm, which considered vessel penalty cost, vessel waiting, and quay crane assignment. Specifically, The proposed algorithm considered the fairness index on berth allocation and designs the following three-stage procedure that maximizes service fairness: (1) computation of initial temperature, (2) neighbourhood searching to arrange for vessel berthing sequence and berthing location, and (3) assignment and adjustment of quay cranes to reach target low temperature. The proposed continuous berth allocation algorithm based on fairness maximization was comparatively verified with neighbourhood searching algorithm by combining different parameter strategies. Results show that the continuous berth allocation algorithm based on fairness maximization obtains the optimal solution within the time six times faster than the neighbourhood searching algorithm. Relevant conclusions provide a theoretical foundation for fairness study of the service in providing to vessels by the terminal.


Introduction
Berths and quay cranes are the most important resources of container terminal. Reasonable scheduling of these berths and quay cranes can effectively improve operation performance. Given the insufficient number of quay cranes and their cost in actual operation, the terminal needs optimal allocation of integrated resources to improve operation efficiency while utilizing the maximum quantity of quay cranes and limited berth shorelines [1,2]. The berthing operation in port has gained attention from multiple parties, and these two resources (berth and quay crane) must be integrated to achieve a highly efficient and fair scheduling.
The study of integrated allocation of berths and quay cranes has been conducted under this background. The study establishes multi-objective optimization model of vessel berthing time, berthing position, and quantity of allocated quay cranes to conduct allocation and scheduling of berths and quay cranes based on total time of vessel in port or terminal service cost. In multi-objective optimization model and development of optimization algorithm, most continuous berth allocation algorithms do not consider multi-party interest fairness among the vessels and the terminal but focus on the improvement of utilization rates of quay cranes and berths [3] by establishing programming models for berth allocation and quay crane scheduling to achieve interest maximization of terminal. However, the interest of vessel owners has not been considered. Some related studies focused on shortening the time of vessels in the port on the basis of fuel consumption and carbon emission [4] of vessel parties while neglecting the balance of multi-party interests and fairness of the whole service. Hence, truly and comprehensively evaluating the interest pursuit of both vessel and terminal parties is of great significance. In addition, the approach of operating efficiency must be improved, the penalty cost and fairness indices of berth operation of vessel and terminal parties must be analyzed, and the appeal of all parties to fairness of the whole service must be accurately reflected based on which fairness maximization of continuous berth allocation can be achieved.

State of the art
Present studies of continuous berth allocation algorithm mainly focus on two aspects of resource allocation: (1) establishment of model considering the waiting time of vessels in port, vessel berthing sequence, quantity of allocated quay cranes, and other factors; and (2) optimized solving process specific to the proposed model. In model establishment, berth allocation and maximized allocation of quay cranes are the commonly used approaches. Frank Meisel et al. [5] used handling efficiency of quay cranes to replace handling time of vessels and study the combined allocation problem of berths and quay cranes. However, the interests of vessel owners were not considered. Chengji Liang et al. [6] expressed handling velocity of quay cranes with vessel handling time and studied integrated allocation problem of berths and quay cranes. Xiaolong Han et al. [7] proposed a two-stage model; space-temporal continuous JOURNAL OF allocation model of vessel berthing was established in the first stage, whereas operating efficiency was improved in the second stage to reduce the movement of quay crane and minimize the quantity interval of allocated quay cranes. Xiaole Han et al. [8] started from uncertainty of vessel arrival time and vessel operating time to study allocation and scheduling problem of quay cranes, proposed a mixed integer model, and utilized genetic algorithm to optimize the scheduling. Shangyao Yan et al. [9] introduced the concept of network traffic to study quay crane scheduling problem. Meilong Le [10] studied berth and quay crane allocation problem based on berth preference and service priority. Continuity of disperse berths could improve utilization rate of berths to a great extent. Zhihua Hu [11] proposed an operating strategy to shift vessel according to practical situation based on a study of quay crane rescheduling problem on their utilization balance within the period; however, both shifting possibility in reality and actual operability exhibited the problem of excessive cost. In addition, minimizing the time of vessels in port is also another approach for model establishment. Basing on vessel service priority, Imai et al. [12,13] established an optimization model, wherein the minimization of time of vessels in port is the objective, and proposed solving the berth allocation problem through genetic algorithm. Lai and Shih [14] adopted first come and first service (FCFS) allocation strategy to evaluate allocation schemes under different allocation standards (minimum average time of vessels in port, minimum average berthing time, and maximum average berth utilization rate). Considering the terminal handling efficiency, which influences the time of vessels in port and the service priority of vessel in actual operation, Shan Tong [15] established a dynamic continuous berth allocation model based on service priority. Changchun Liu et al. [16] focused on conducting a secondary scheduling of vessel berthing operation under the accidental interruption of vessel operation to acquire a forward migration of scheduling operation, reduce loss, and improve service satisfaction degree. Junliang He [17] suggested a simulation and optimized integration approach from the point of energy conservation and emission reduction to reduce the penalty cost caused by delayed departure from the port and the energy consumption cost. Tianbao Qin et al. [18] studied berth scheduling model from the point of variation of water level. The above studies have focused on penalty cost under circumstances of delayed vessel arrival, delayed departure from the port, and deviation from the preferred berth. However, only few studies used the fairness in waiting for berthing operation, fairness in waiting for departure, and fairness in the quantity of allocated quay cranes among vessel services as the evaluation standards.
Solutions of quay crane allocation algorithm based on multi-objective fairness have been improved continuously, and the algorithms of this category mainly use heuristic algorithm. Mihalis M. Golias et al. [19,20] used heuristic genetic algorithm to solve multi-objective combined optimization problem and suggested a provision of different vessel berthing services according to priority protocol grading. Cenk Sahin and Yusuf Kuvvetli [21] considered vessel berth operation scheduling problem as continuous spatial allocation problem, used differential evolutionary algorithm to handle the problem, and developed a dynamic berth allocation strategy. Kim et al. [22] established a mixed integer linear programming model to study continuous berth allocation problem and used simulated annealing algorithm and LINDO for solving. Mihalis Golias and Isabel Portal l [23] studied robustness scheduling strategy which aimed at reducing average vessel service time and overall service time duration provided by the terminal, defined quadratic optimization problem, and proposed a heuristic algorithm to solve this problem, but the overall description was vague. Yusin Lee et al. [24] believed that a terminal, which is a continuous space, could be optimized through neighborhood searching algorithm with reference to FCFS, vessel unoccupied distance, and possibility of vessel shifting in aspect of service strategy. Basing on the expansion of existing continuous berth allocation model and consideration of fairness in waiting for berth allocation and quay crane assignment, this study established a multi-objective continuous berth allocation model. Simulated annealing algorithm was used to verify the influence of fairness on vessel berthing plan, and a three-stage neighborhood searching strategy was designed for computation and simulation. This heuristic algorithm included three stages: (1) arrangement for vessel sequence through neighborhood searching, (2) berthing position searching and (3) assignment and adjustment of quay cranes. An experimental scheme was designed by combining simulated annealing algorithm, neighborhood generation strategy, and cost function of fairness to verify the effectiveness of the algorithm and analyze the influences of fairness in waiting time, in arranging berthing position, and of the quantity of assigned quay cranes.
The succeeding parts of this study are organized as follows: Section 3 expounds on problem descriptions and assumptions, establishing the model, designs simulated annealing algorithm, and definition of neighborhood searching strategy. Section 4 consists of experimental design, results analysis, and comparison with neighborhood searching algorithm. The final section summarizes the conclusions.

Methodology
When vessel arrives at the port, terminal dispatcher usually allocates berths and assigns quay cranes to the vessel according to relevant information and scheduling strategy. Optimal allocation of berth-quay crane refers to shortening the time of the vessel in port to improve its utilization rate and customer satisfaction degree and to reduce the operating cost of the terminal by allocating appropriate berth, selecting proper berthing sequence, and assigning reasonable quantity of quay cranes. The goal of vessel companies is to allocate the vessels arriving at the port to ideal preferred berths with minimum waiting time for berthing and minimum delayed handling time. On the contrary, the terminal administrative staff aims to ensure maximum container in the terminal throughout the planning cycle. The length a vessel occupies in the berth depends on its actual length, and the time it occupies the berth depends on the handling time of quay crane. For the continuous berth-quay crane allocation problem considered in this study, the vessel can berth along the shoreline as long as it meets the berthing shoreline length, and multiple vessels can simultaneously berth to accept services. Through review and sequencing of two factorsexpected arrival time and demand for handling service, this study comprehensive measured the fairness levels of vessels accepting port service. The fairness is categorized into sequence fairness, service time-based fairness, and fairness in resource allocation. With regard to the influence of berths preferred by vessels and constraints of penalty for delayed arrival at and departure from the port, the established continuous berth-quay crane integrated allocation model is based on the following reasonable assumptions by combining the fairness of vessels accepting services: (1) Each vessel must be served once, that is, not considering the berth shifting operation; (2) Arrival time at the port shall not be earlier than the estimated arrival time, and the vessels can only wait for berthing but shall not arrive at the port in advance; (3) Handling time depends on the berth where the vessel is located, quantity of quay cranes in the terminal, distance between vessels, container transportation, and other factors; (4) If berth resource is considered as continuous and linear, then it shall be divided into as many as possible and equal small berthing units along which multiple vessels can berth; (5) Each vessel is set with maximum and minimum quantities of quay cranes for simultaneous operation. Operation shall start only when quantity of usable quay cranes is not smaller than the minimum quantity of quay cranes and not greater than maximum quantity of quay cranes; (6) Unused disperse quay cranes shall not stretch across for operation, and quay crane shall provide handling service for the berthing vessel only at the position with fixed shoreline; (7) Each vessel has an optimal preferred berthing position which shall increase time in port; (8) The berthing plan is assumed to start at zero time. Thus, the vessels shall do berthing operation only after arriving at the port and shall perform handling operation immediately after berthing under normal circumstances.
Berthing time and unberthing time during the process of working at the port do not differ for different vessel types and have minor influence on the overall time in port. Thus, these factors were omitted in this study.

Model 3.1.1 Related concepts and symbols
represents vessel set needing service within one service period of the terminal; is the time period set divided within one service period of the terminal; For the convenience of modeling and analysis, the following variables, which can be directly expressed by the above variables and parameters, are introduced:

Continuous berth-quay crane integrated allocation model
Objective function: .  (1) into an independent objective function g , and at the moment (1) Penalty cost f The optimization objectives of berth-quay crane integrated scheduling are as follows: (1) berth optimization, in which berthing position should be as close as to preferred berth to reduce traveling time of the container from quay crane to rear container yard, improve the operating efficiency of quay cranes, and reduce the operating frequency; and (2) optimization of service time, in which the vessel should do berthing operation immediately after arriving at the port and should depart from the port timely after operating completion within the time stipulated by ship company. For the two objectives, a multi-objective model that minimizes total penalty cost is established to reduce the berthing penalty cost, the waiting time for berthing, and the delayed time for departure from the port. The objective function is defined through functions (2)(3)(4)(5), whereas the constraint function is designed through functions (6-30).
Where the objective function (2) is the function minimizing penalty cost, including the total cost due to deviation of berthed position of the vessel from preferred berth, the total penalty cost for delayed vessel berthing, and the total penalty cost of delayed departure from the port, which are respectively defined through functions (3)(4)(5). Functions (7) and (8) constrain the horizontal deviating distance of the vessel berthing position from preferred berth. Function (1) constrains the time difference of delayed departure from the port. Function (11) constrains that vessel departure time must be greater than or equal to the completion time of container operation. Function (12) constrains that each space-time point can only be occupied by one vessel, considering that the space-time points are already occupied during early-stage rolled scheduling. Function (13) expresses that the quantity of assignable quay cranes is restricted by the total number of quay cranes, considering the quantity of quay cranes that have occupied at each time among early-stage rolled scheduling results. Function (14) constrains that vessel operating time must be greater than or equal to the total quay crane time. Functions (15)(16) reflect operating continuity, and at least one quay crane serves it in which the vessel cannot stop operation in the handling. Functions (17)(18) constrain that the quantity of quay cranes, which can be assigned to each vessel, is restricted by the maximum and minimum values. Functions (19)(20) establish the relation-vessel between .
. According to sequence of vessels arriving at the port, basic sequence fairness can be discussed. The sequence of vessels accepting handling service in port service system is defined by π . Vessels are ranked in two types, namely a π and d π according to EAT and EDT, respectively. Element sequences of a π and d π are respectively expressed as: a svs a a a π π π π , , , 2 The above two time sequences can be used in discussion on the two types of standard delay fairness, namely, later than EAT and later than EDT. Fairness of resource allocation can be discussed according to the quantity of allocated quay cranes and whether or not the berth is the preferred berth (the berth has four types), and the specific classification is reflected in the specific classification of resource allocation as follows. Finally, in overall consideration of the above fairness, comprehensive fairness will be discussed.
(1) Sequence fairness Preferred berth, small quantity of QC: Non-preferred berth, large quantity of QC: Preferred berth, larger quantity of QC: svs svs a a m n m n a m a n r

Solving by simulated annealing algorithm
Annealing algorithm, avoiding the problem that greedy algorithm can easily obtain local optimal solution, is used to simulate physical annealing process. Commonly seen physical annealing process consists of heating process, isothermal process, and cooling process. This process is especially effective when solving combinational optimization problem. Annealing algorithm is different from other algorithms in accepting new status through a certain probability. Under status old x , the system changes the status into new x due to some disturbance. Correspondingly, the system energy is changed from Probability of the system accepting change from status old x into status new x can be expressed as: The flow of a standard simulated annealing algorithm is as below: (1) An initial solution 0 x is randomly generated, and 0 x x best = is set to calculate objective function value ) ( 0 x E ; (2) Initial temperature is set as ( ) 0 0 T T = and number of iterations is new best x x = ; e) End for (4) i=i+1; (5) End Do; (6) Present optimal point is output and the calculation ends.
In simulated annealing algorithm, generation of new solutions mainly depends on neighborhood searching algorithm. The basic idea of neighborhood searching algorithm is to systematically change neighborhood structure set during searching process to expand searching range and obtain local optimal solution, in which the local optimal solution systematically re-changes neighborhood structure set to expand searching range and find another local optimal solution. Neighborhood searching algorithm is specifically divided into three stages: rank ordering in neighborhood searching process, generation of berthing position, and position adjustment and quay crane assignment.

Neighborhood generation Input data:
(1) Three groups of vessel data: sv , sp and st ; ( Step 1) vessel sequence is initialized according to vessel EAT ( π ).
Step 2) A new neighborhood sequence is generated from each neighborhood structure ( ' π ).
Step 3) Relative berthing position vector ( v rB ) is generated by sequence ( ' π ) through ) , 0 ( sps U . Stage two: Determining vessel berthing position ( v B ) Step 4) Vessel berthing position is determined, and the position of the present vessel is set through the vessel relatively before the present vessel or offset at beginning of the berthing position in sequence ( ' π ). Stage three: Adjusting the quantity of assigned quay cranes and berthing position Step 5) The quantity of quay cranes is increased which can be assigned to each vessel in ( ' π ) one by one when the conditions of boosting berthing time of other vessels are met: 1) upper limit of quantity of quay cranes assigned to the present vessel; 2) upper limit of total number of available quay cranes.
Step 6) Berthing position on each vessel in ( ' π ) is adjusted one by one.
Step 7) If relatively improved, ' π π ← is updated, and if number of iterations is smaller than d m , Step 3 shall be executed.
Step 8) If number of new neighborhoods is equal to n m , Step 2 shall be executed.

Neighborhood searching (1) Generating two neighborhood structures
Firstly interchange ) , ( 2 1 i i , which means interchanging two vessels 1 i and 2 i in two positions in sequence ( π ). Insert ) , ( 2 1 i i means inserting the vessel at position 2 i before position 1 i in sequence ( π ). (2) Selecting the probability for each position to generate neighborhood When 2 i is decided by insertion and interchange between ) , can be generated by uniformly distributed , and at the time (2) Relative positioning strategy According to relative positioning strategy, it is determined that position of vessel v is expressed by v B and position of vessel

Adjustment process
(1) Adjustment of quantity of quay cranes A probability is introduced in the adjustment of quay cranes assigned to vessels to increase the quantity of quay cranes within the acceptable range. The acceptable probability for increasing the quay cranes can be expressed by q m and

Cooling schedule
Cooling schedule refers to the cooling management table from high-temperature status 0 T to low-temperature status. The temperature at time t is expressed by ) (t T , and the cooling method through classical simulated annealing algorithm is: Cooling method of rapidly simulated annealing algorithm is: Both methods can make simulated annealing algorithm converge to the global minimum point. 0 T Experiment indicates that a high initial temperature indicates great probability to obtain high quality but long computation process. Therefore, determination of initial temperature should compromise optimization quality and efficiency, and the commonly used methods include:

Initial temperature
(1) One group of statuses is uniformly sampled, and the variance of objective values of these statuses is selected as initial temperature.
(2) One group of statuses is randomly generated, maximum difference of objective values between every two statuses is determined as max Δ , and the initial temperature is determined according to difference value through a certain function, such as , where r p is initial probability of acceptance.
(3) Initial temperature is given through empirical formula.
In this example, randomly generated 50 groups of statuses are used to calculate variance of objective values as the initial temperature.

Experimental design
In order to verify algorithm effectiveness, two experiments are designed in this study: one experiment is to take randomly generated data shown in Table 1 as experimental contents for evaluation of vessel berth scheduling scheme; the other experiment is to take Ningbo Beilun Port as reference to generate test dataset to evaluate parameters solved through the algorithm and test algorithm effect under true environment.
There are 18 vessels waiting for berthing among data shown in Table 1. In this example, maximum length of usable shore-side berth consists of 600 length units and maximum quantity of usable quay cranes is 12. An initial solution is randomly generated in this experiment according to arrival time, then neighborhood searching algorithm is used for 1,000 iterations to generate one solution, and an optimal solution is generated through this algorithm.
In the second experiment, data of calculated example of 100 vessels are randomly generated according to the following conditions without consideration of influence of water depth: (1) Terminal length is 1,200 meters which is divided into 120 segments with each segment being 10 meters, thus, (1) Objective functional value. It is a quantitative index of fairness maximization. The smaller the value, the fairer; (2) Number of iterations when minimum objective functional value is obtained. The smaller the number, the more reasonable the value of the parameter is.
The experimental contents of this algorithm are as follows: (1) Calculate minimum objective functional value of this algorithm and record its number of iterations; (2) Adjust intervals of 5 within [1,100] take value of d m and observe its optimal value; (3) Use inserting strategy, interchange strategy and their combinational strategy for neighborhood generation and calculate optimal value of different neighborhood generation strategy; (4) Change initial positioning method of the vessel from absolute positioning to relative positioning and verify reasonability of relative positioning; (5) Use uniform distribution and normal distribution patterns for the vessel to generate neighborhoods and observe the influences of the two distribution patterns on the algorithm; (6) Adjust probability of increasing quay cranes within [0, 1]. After repeated calculations for 10 times, take average value of objective functional values and check probability of obtaining minimum value; (7) Adjust probability of accepting adjustment of berthing position within the interval [0, 1], and average value of minimum values is obtained after repeated experiments for 10 times; (8) Compare neighborhood searching algorithm and simulated annealing algorithm. According to the optimal parameters of the above experiments, terminated number of iterations or neighborhood searching algorithm is set as 1,000, whereas maximum terminated number of iterations of simulated annealing algorithm is 1,000 and times for continuous 0 probability of accepting new solutions are greater than 30.

Experimental results and analysis
Actual results of this algorithm in implementing continuous berth allocation for sample data 1 are shown in Fig. 1. Fig. 1 are vessel numbers and quantities of quay cranes assigned to this vessel. The upper left corner consists of berth allocated to this vessel and berthing time, width of length of this vessel and height is operating duration after the vessel berths. Fig. 1(a) is a random solution, Fig. 1(b) is optimal solution obtained through neighborhood searching algorithm and Fig. 1(c) is optimal solution obtained through this algorithm. It can be seen that the solution obtained through the algorithm proposed in this study as shown in Fig. 1(c), has optimized vessel waiting time and allocation of berths and assignment of quay cranes.    , the overall objective function presents continuously descending trend. There are three sequences of solutions computed with the same parameters except d m to illustrate the trend. More than 1,000 experiments were done in our study and the descending trend was verified. In Fig.3 , within which a value can be randomly generated for setting of parameter d m .  Fig. 4, the more rapid the convergence of inserting strategy, the more rapidly the interchange strategy can obtain better optimal solution. The inserting strategy can obtain optimal solution of 0.094 after 284 iterations while the optimal solution obtained by interchange strategy after 164 iterations is 0.088, thus, the interchange strategy is used in this algorithm as neighborhood generation strategy. There are six different results computed with the same parameters compared in Fig. 6. From the first four results in Fig. 6 (a), (b), (c) and (d), it can clearly be seen that normal distribution obtained a better solution than uniform distribution, but on the contrary, uniform distribution obtained the better solution shown in Fig. 6(e) and (f). Whatever, they show that probability exists for an optimal solution no matter in normal distribution or uniform distribution and no matter what range of radius is. In general, optimal solution is better obtained in normal distribution than in uniform distribution. In actual calculation, normal distribution is selected in this algorithm to generate vessel neighborhoods while random numbers are used for range of radius.

Figures in vessel square in
Results in Fig. 7 show that optimal value can be obtained when the probability of increasing quay cranes is within the interval [ ] 6 . 0 , 4 . 0 , thus, a probability is randomly selected within this interval in this algorithm as probability of accepting increase of quay cranes.    , 0 about the influence of probability of accepting berthing position adjustment on the algorithm. It can be seen that as probability of accepting berthing position adjustment increases, minimum value tends to the optimal. Therefore, probability of acceptance, which is greater than 0.8, is selected in this algorithm. Fig. 9 shows a comparison of computed results between neighborhood searching algorithm and this algorithm. It can be seen that comparison between the two algorithms is very obvious: after 1,000 iterations of neighborhood searching algorithm, optimal value keeps at 0.138, while optimal solution of this algorithm is already 0.077 upon the 75th iteration. After berth scheduling through this algorithm, doubled fairness can be realized for neighborhood searching algorithm and it only takes 1/6 of the time neighborhood searching algorithm takes.

Conclusions
With consideration of fairness in aspects of vessel penalty cost, vessel waiting and quay crane assignment, this study extended existing continuous berth allocation model and established a multi-objective continuous berth-quay crane integrated allocation model based on service fairness. As for this model, simulated annealing algorithm was introduced in the algorithm, a three-stage neighborhood searching procedure was proposed. The following conclusions were obtained through measuring experiment and comparison with neighborhood searching algorithm: (1) Introduction of penalty cost and fairness indices has effectively balanced the interests between ship owner party and terminal party, and the model established on this basis can realize maximization of multi-party interest fairness during berth allocation process.
(2) Simulated annealing algorithm can be used for rapid solving of berth allocation. It is verified through an experiment that this algorithm can obtain optimal solution when number of iterations is smaller than 200.
(3) The three objectives (quantity of quay cranes, berthing position, and berthing time) can obtain their optimal solutions through multiple operations, thus, berth allocation model based on fairness maximization is not related to neighborhood generation strategy, but is related to key factors like sequence fairness, delay fairness, and allocation fairness.
Continuous berth allocation algorithm proposed in this study on basis of service fairness, gives consideration of interest balance between ship owner party and terminal party, thus, it can more truly reflect interest appeal of multiple parties in terminal service and provide technical support for more effectively improving multi-party service satisfaction degree and realizing service fairness maximization among multiple parties. However, settings of penalty coefficient and weight vector in the algorithm proposed in this study are obtained by experience, thus, it is necessary to discuss about influence of system design of fairness weight on fairness of the whole vessel berthing service in follow-up study so as to further improve accuracy of this model.