Keywords

1 Introduction

The loading/unloading equipment at most container terminals in China are mainly Quay Cranes (QCs), Yard Cranes (YCs) and CTs. The scheduling system of CTs is well known to possess complex logistics system characteristics for there are many factors effecting scheduling, such as time, space, resources, and uncertain factors. Optimize the scheduling system is meaningful, which can improve the efficiency of loading and unloading.

The physical entity resource network and the control decision-making information network were integrated into the modeling and optimization architecture using Harvard architecture and Agent based computing [1, 2]. In [3], Relationship between transport tasks and service of CTS has been taken as a contract net using the fuzzy set theory and method. The dispatching model based on Contract Network Protocol (CNP) using bidirectional negotiation is provided and fuzzy reasoning process of dispatching decisions is suggested. But the distance from the current position of CT to the loading/unloading position is calculated by the established coordinate system. In the case of road congestion, CT should choose a smooth route, so the distance should be the length of the route. Recently, the path planning problem is a hot research area [4, 5], the main algorithms used are genetic algorithm, ant colony algorithm and so on.

This paper proposes Multi-Agent contract net protocols based on two-way negotiation mechanism. The fuzzy control system is designed to couple multiple factors on the tasks to assess to their dispatching emergency degree. The steps of ant colony algorithm considering obstruction status were designed to find the optimal route. After fuzzification and defuzzification, the decision query table of dispatching plan is obtained.

2 MAS Framework of Container Terminal Scheduling

Container terminal consists of containers, ships, handling equipment (QC, YC, and CT) communication equipment, berths, container yards and human resource, etc. Superior and subordinate subsystems have command and obedience relationships, and parallel subsystems have collaboration, consultation, competitive relationships. Figure 1 shows the hierarchical structure of the whole system.

Fig. 1.
figure 1

Framework of container terminal schedule system based on Multi-Agent

As we can see, there are three types of individual agents, namely Control Agent (fixed), Execution Agent (moving with wireless mobile terminal) and Operation (Mobile) Agent (dynamically generated).

Operation Agents are created dynamically and freely by the Central Processing Agent throughout the whole system just like computer software, and they are assigned by the Control Agent, executed by the Execution Agent.

3 Dynamic Dispatching Strategy

In the traditional static scheduling mode, the truck is unloaded at half of the distance. A dynamic dispatching strategy in which multiple tasks are matched with multiple CTs is adapted in this study, which can guarantee the truck in the idle state can be quickly put into the operation point which needs trucks. So how to arrange a truck for the task should be considered. In this paper, considering the load of communication and consultation efficiency in system, Multi-Agent contract net protocols based on two-way negotiation mechanism was adopted to achieve the best arrangement. Figure 2 shows the contract net.

Fig. 2.
figure 2

Contract net

In the contract negotiation protocol Agent network, different types of equipment in collaboration between the task request and response with announcing, bidding, and awarding in contract net. In evaluating tender, fuzzy set theory and method is adopted to couple multiple factors on the tasks to assess to their dispatching emergency degree. The higher evaluation of dispatching emergency is, the greater probability to select the CT is.

4 Fuzzy Set Theory and Method

The structure of fuzzy reasoning controller is shown in Fig. 3. Here are the two inputs, namely, predicted travel distance, priority of handling operation. The output is dispatching emergency degree. Dispatching decision knowledge set consists of n subset, R1, R2, … Rn. Each subset contains some knowledge of dispatching decision, which is described in a matrix form according to certain rules. The input information is given according to bidding document and database of Agents. The meaning or interpretation of the function module is based on the input linguistic variables to determine its value corresponding fuzzy sets A1, A2; Effect of fuzzy reasoning is to use and expertise subset R1, R2,… Rn, and the information of synthesis module A to obtain comprehensive information on the fuzzy relation composition operations in order to generate output result. The result is also indicated by fuzzy sets. Linguistic matching function with the fuzzy decision module is translate the result into output language, or the result of this reasoning is converted to exact amount of that task dispatching emergency degree, to which Agents can refer to bid.

Fig. 3.
figure 3

Modal of fuzzy assessment for distributing tasks

Heavy weights and the closed space on the dock make the truck more likely to be involved in traffic crash which leads to road congestion. So the travel time and distance from the current position of CT to the loading/unloading position cannot just calculated according to the shortest route. Through judging obstruction status, the steps of ant colony algorithm were designed to find the optimal route. Then the predicted travel distance and time can be calculated.

4.1 The Ant Colony Algorithm Design for the Optimal Route of Container Truck Definition and Control of Congestion

Definition and Control of Congestion.

Traffic flow model is a kind of math equation to express the correlation of traffic parameters like speed, density and flux etc. Obstruction status can be judged according to related data gathered by GPRS. Take the spur track i → j for instance.

$$ {\text{u}}_{\text{ij}} = {\text{u}}_{\text{ijf}} \left( {1 - {\text{k}}_{\text{ij}} /{\text{k}}_{{{\text{ij}}0}} } \right) $$
$$ {\text{q}}_{\text{ij}} = {\text{k}}_{\text{ij}} {\text{u}}_{\text{ij}} $$
\( {\text{u}}_{\text{ij}} \)::

The vehicle speed

\( {\text{u}}_{\text{ijf}} \)::

The free driving speed

\( {\text{k}}_{\text{ij}} \)::

The vehicle density

\( {\text{k}}_{{{\text{ij}}0}} \)::

The jam density

\( {\text{q}}_{\text{ij}} \)::

The traffic flux

Suppose the average minimum distance headway at the port of congestion density as \( {\text{h}}_{\text{ijs}} \), and average minimum time headway as \( {\text{h}}_{\text{ijt}} \), then

$$ {\text{k}}_{{{\text{ij}}0}} = 1000/{\text{h}}_{\text{ijs}} $$
$$ {\text{q}}_{\text{ijm}} = 3600/{\text{h}}_{\text{ijt}} ;\,{\text{k}}_{\text{ijm}} = {\text{k}}_{{{\text{ij}}0}} /2 $$
$$ {\text{u}}_{\text{ijm}} = {\text{q}}_{\text{ijm}} /{\text{k}}_{\text{ijm}} $$
\( {\text{q}}_{\text{ijm}} \)::

The maximum traffic capability

\( {\text{k}}_{\text{ijm}} \)::

The corresponding density

\( {\text{u}}_{\text{ijm}} \)::

Critical speed of the congestion

The judging procedure about the congestion for the spur track is as follows:

  1. Step 1:

    If \( {\text{q}}_{\text{ij}} > {\text{q}}_{\text{ijm}} \), then switch to step 3, otherwise, switch to step 2.

  2. Step 2:

    If \( {\text{u}}_{\text{ij}} < {\text{u}}_{\text{ijf}} \), then switch to step 3.

  3. Step 3:

    The spur track is under congestion, and the jam knots are recorded in the congestion table Ck.

Confirming Principle of Allowed Knot Set allowedk.

Considering the reality of dock, the container is abstracted into some grids. The dynamic control over the change of ants position comes to be true through modifying Relation Matrices by utilizing coordinate to confirm the direct pre-knot or sub-knot.

The allowed knot set allowedk equals n minus Ck and Pk at knot i for ant number k, in which n is the total number of knots and Pk is the knots passed by ant k. There is no repetition at the same knot for the consequent knots considering the traffic rules of container terminals.

The Steps of Ant Colony Algorithm of Optimal Route for Container Trucks.

  1. Step 1:

    Initialization. To set up a starting point and ending point and set the maximum number of cycles Nmax. To initialize the control parameters α, β, Q (user-defined). At the initial, m ants are randomly put on n nodes and the amount of information on each path is equal. The data gathered by GPRS for every spur track are: uij, hijs, hijt, qij.

  2. Step 2:

    Put the initial knot of ant k into Pk to search till find target knot. If does, end the loop, and turn to step 3. If doesn’t find the target knot, determine allowedk and work out the transfer probability \( p_{ij}^{k} \), then adjust knot and keep searching.

The transfer probability from knot i to j of ant k can be defined as:

$$ p_{ij}^{k} = \left\{ {\begin{array}{*{20}c} {\frac{{\tau_{ij}^{\alpha } \eta_{ij}^{\beta } }}{{\sum\limits_{{s \in allowed_{k} }} {\tau_{is}^{\alpha } \eta_{is}^{\beta } } }}} & {,s \in allowed_{k} } \\ {\begin{array}{*{20}c} 0 & , \\ \end{array} } & {else} \\ \end{array} } \right. $$
  1. Step 3:

    End a loop iteration when the last ant find the target knot and record the length Lk.

  2. Step 4:

    Update the pheromone intensity

If the arrival time is between t and t + 1, the pheromone intensity is to be updated according to the following formula:

$$ \tau_{ij} (t + 1) = \rho \tau_{ij} (t) + \Delta \tau_{ij} $$
$$ \Delta \tau_{ij} = \sum\limits_{k = 1}^{m} {\Delta \tau_{{_{ij} }}^{k} } $$
$$ \Delta \tau_{ij}^{k} = \left\{ {\begin{array}{*{20}c} {\frac{Q}{Lk}} & {{\text{if e(}}i ,j )\in \quad T_{k} (t )} \\ 0 & {else} \\ \end{array} } \right. $$

Q is a constant denoting the pheromone intensity. Lk is the gross route length covered in repetition by the ant number k. ρ symbolizes the left-over elements of pheromone, and ρ ought to be defined as a number less than 1 in order to avoid the endless accumulating of pheromone.

  1. Step 5:

    To compare all the routes passed by the ants and the minimum route length is the optimal route. To output the result, the algorithm is to be ceased.

Case Analysis.

The optimal route and the shortest route are shown in Figs. 4 and 5, respectively.

Fig. 4.
figure 4

Chart of the optimal route

Fig. 5.
figure 5

Chart of the shortest route

The speed of the spur tracks which are under the congestion is 10 km/h, and the speed of other spur tracks are 25 km/h. The length of each grid in the map is 50 m, and the oblique line is simplified into two straight segments. The travel time and distance between the current position of CT to the loading/unloading position are calculated. The distance and time of the optimal route is respectively 1.25 km, 0.05 h, and the shortest route respectively 0.95 km, 0.06 h. The application of ant colony algorithm can help to search out the optimal route while the route is under the congestion. The study of optimal route is helpful in instructing the running of container trucks so as to avoid or relieve traffic congestion.

4.2 Fuzzification

Fuzzification of Distance.

Table 1 shows container truck steer distance partition.

Table 1. Container truck steer distance partition

R represents distance. According to the actual situation, the distance is segregated into 8 grade: 1, 2, 3, 4, 5, 6, 7, 8. The fuzzy linguistic value is defined as very near, near, nearer, general, far, farther, very far, extremely far, and the corresponding fuzzy set is N1, N2, N3, N, R3, R2, R1, VR. According to the distribution of discrete points, the triangular membership function is adopted for its convenience.

Fuzzification of Priority of Handling Operation.

Suppose P as the artificially defined priority, N as the number of arranged CTs, and L as the priority of handling operation.

$$ L = P - N $$

The fuzzy linguistic value is defined as unimportant, a little important, important, very important and extremely important, and the corresponding fuzzy set is P1, P2, P3, P4, VP.

Fuzzification of Dispatching Emergency Degree.

Suppose S as dispatching emergency degree. The fuzzy linguistic value is defined as very low, lower, low, general, high, higher, very high, and the corresponding fuzzy set is D1, D2, D3, M, M2, M1, VM.

Determination of Fuzzy Rules.

Scheduling principle:

  1. (1)

    Dispatcher’s assignment is preferential;

  2. (2)

    The important task has priority;

  3. (3)

    The close distance is preferential;

  4. (4)

    The requirements of QCs are preferential.

The experience of terminal scheduling engineers and operators is summarized, so that the fuzzy rules can maximally reflect the actual scheduling principle of terminal. Table 2 shows the rule table for fuzzy control.

Table 2. Rule table for fuzzy control

Fuzzy Inference and Defuzzification.

Method of centroid is used in this system. Clear outputs corresponding to each of the input values are calculated through MATLAB tool. Table 3 shows the decision query table.

Table 3. Decision query table

In practical work, the terminal management system can directly query the table for the dispatching emergency degree.

Figure 6 shows the relationship between R, L and S in MATLAB.

Fig. 6.
figure 6

System output result schematic

The two axis represents the input of the system (L, R), and the vertical axis represents the output (S). It can be seen from this figure that S increases with the decrease of L and R. Space surface is smooth, illustrating the design of membership functions and fuzzy rules are basically correct.

5 Case Analysis

There are four operations requested, shown in Table 4, and three idle CT, shown in Table 5. After CT dispatching Agent announce the four tasks, three free CT Agents gain task dispatching emergency degree by fuzzy reasoning controller, shown in Tables 6, 7 and 8.

Table 4. The information of cooperative request for transporting
Table 5. The information of idle CTs
Table 6. Task dispatching emergency degree evaluated by agent of CT301
Table 7. Task dispatching emergency degree evaluated by agent of CT311
Table 8. Task dispatching emergency degree evaluated by agent of CT312

Three CT Agents bid to QC105 whose emergency degree is the highest. CT dispatching Agent evaluates these bidders, shown in Table 9. As the table shown, evaluated dispatching emergency degree of CT301 is the highest (shown in Table 9), CT dispatching Agent rewards Agent of CT301 and meanwhile refuses to application of CT311 and CT312.

Table 9. Task dispatching emergency degree sort of QC105

Then CT311 and CT312 select tasks to bid, whose dispatching assessed value of emergency is the highest among the remaining, namely QC111 and YC208. CT dispatching Agent respectively issue orders to CT311 and CT312 after evaluating.

6 Conclusion

A model of container terminal scheduling system was established based on Multi-Agent and how to dispatch Container Trucks (CTs) in dynamic dispatching strategy was studied. Relationship between transport tasks and service of CTs has been taken as a contract net using the fuzzy theory and method of optimum allocation of multiple tasks to multiple CTs, and the bidirectional negotiation mechanism was adopted. It coupled multiple factors on the tasks to get the assessment score of dispatching emergency. Through judging obstruction status by using related data of the GPRS system, the steps of ant colony algorithm were designed to calculate the distance of the optimal route. Further research is necessary to study on the method considering more practical factors before it can be applied in practice and the optimization of algorithm.