Availableonline online at www.sciencedirect.com Available Available onlineatatwww.sciencedirect.com www.sciencedirect.com
ScienceDirect Procedia Computer Science 162 (2019) 375–382 Procedia Computer Science 00 (2018) 000–000 Procedia Computer Science 00 (2018) 000–000
www.elsevier.com/locate/procedia www.elsevier.com/locate/procedia
7th 7th International International Conference Conference on on Information Information Technology Technology and and Quantitative Quantitative Management Management (ITQM 2019) (ITQM 2019)
Optimal Optimal Shipping Shipping Path Path Algorithm Algorithm Design Design for for Coastal Coastal Port Port a, a a a Yunfang Yunfang Ma Maa,*, *, Dan Dan Chang Changa,, Hong Hong Wang Wanga,, Mincong Mincong Tang Tanga a Beijing a
Jiaotong University, Beijing, 100044, China Beijing Jiaotong University, Beijing, 100044, China
Abstract Abstract As coastal port shipping industry is facing severe economic competition currently; coastal port container transportation As coastal port shipping industry is facing severe economic competition currently; coastal port container transportation companies are unable to increase profits by raising container’s mileage freight rate substantially as before. Against such a companies are unable to increase profits by raising container’s mileage freight rate substantially as before. Against such a background, on the premise that the container transportation of coastal ports could arrive at destinations safely, the paper background, on the premise that the container transportation of coastal ports could arrive at destinations safely, the paper makes improvements on current optimal path algorithm for coastal ports, extends the meaning of optimal path such as the makes improvements on current optimal path algorithm for coastal ports, extends the meaning of optimal path such as the shortest distance, the lowest cost as well as the overall evaluation of path and cost, and made improved verification of the shortest distance, the lowest cost as well as the overall evaluation of path and cost, and made improved verification of the algorithm. By addressing the problem of choosing optimal path for coastal port shipping, the paper aims to promote the quick algorithm. By addressing the problem of choosing optimal path for coastal port shipping, the paper aims to promote the quick reaction of container shipping, reduce operation cost, enhance the competitiveness of coastal port container shipping and the reaction of container shipping, reduce operation cost, enhance the competitiveness of coastal port container shipping and the economic efficiency of the algorithm, while providing new thoughts for the application of the algorithm. economic efficiency of the algorithm, while providing new thoughts for the application of the algorithm. © © 2020 2019 The The Authors. Authors. Published Published by by Elsevier Elsevier B.V. B.V. This is an open accessPublished article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/) © 2019 The Authors. by Elsevier B.V. Selection and/or peer-review under responsibility of the organizers of ITQM 2019 Peer-review underpeer-review responsibility of the scientific committee of the 7thofInternational Selection and/or under responsibility of the organizers ITQM 2019Conference on Information Technology and Quantitative Management (ITQM 2019) Keywords: Coastal port; optimal shipping path; the shortest path; optimal path with multiple constraints Keywords: Coastal port; optimal shipping path; the shortest path; optimal path with multiple constraints
1. Introduction 1. Introduction With over ten years’ port construction, the scale of China’s coastal ports keeps extending and the number of With over ten years’ port construction, the scale of China’s coastal ports keeps extending and the number of coastal ports with the handling capacity of 100 million tons has reached up to 23. The cargo and container coastal ports with the handling capacity of 100 million tons has reached up to 23. The cargo and container throughput of China’s coastal ports has been ranking world top for 13 consecutive years, which demonstrates the throughput of China’s coastal ports has been ranking world top for 13 consecutive years, which demonstrates the steady development of China’s coastal port construction. steady development of China’s coastal port construction. With the severe global economic competition, many large container companies at China’s coastal ports cannot With the severe global economic competition, many large container companies at China’s coastal ports cannot substantially raise mileage freight of container to increase profit as before. Therefore, on the premise that the substantially raise mileage freight of container to increase profit as before. Therefore, on the premise that the container transportation of China’s coastal ports could arrive destinations safely, how to choose reasonable container transportation of China’s coastal ports could arrive destinations safely, how to choose reasonable transportation, optimize voyage capacity dispatch, reduce transfer times of docking ports, and strictly keep the transportation, optimize voyage capacity dispatch, reduce transfer times of docking ports, and strictly keep the container port cost and other transportation cost at the lowest level will be the key point for increasing profits of container port cost and other transportation cost at the lowest level will be the key point for increasing profits of
* Corresponding author. Tel.: +8615801319091. * Corresponding author. Tel.: +8615801319091. E-mail address:
[email protected]. E-mail address:
[email protected]. 1877-0509 © 2020 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the scientific committee of the 7th International Conference on Information Technology and Quantitative Management (ITQM 2019) 10.1016/j.procs.2019.11.298
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
376
large container liner companies at China’s coastal ports. Therefore, the optimal path algorithm research is of great practical value. Based on the current situation and policies of coastal ports collection and separation in the European Union regions, Orestis Schinas and Christos Dionelis [1] has analyzed the sea-rail transportation strategy suitable for the European Union regions, and proposed measures and suggestions for regional sea-rail transportation development. Kris Braekers [2]pointed out that we should pay attention to the space and location while comparing the means of transportation, and make comparative analysis of influence factors for different multimodal transportation ways with the space theory on the condition of keeping the lowest transportation cost. Maurizio, Arnone, Simona Mancini, Andrea Rosa[3] classify the factors affecting sea-rail transportation into two categories, one is the influence of multimodal transportation on non-renewable resources, such as human capital, air pollution, climate change etc., the other one is the influence on the system itself caused by the mutual effect inside the transportation system. 2. Literature Review 2.1. Dijkstra Algorithm Currently, Dijkstra algorithm is the most classic and famous algorithm in path planning, which is widely used for non-negative path problem in network planning or reachable diagraph. The basic idea of the algorithm is as follows: Assume every point in the digraph has a pair of label (dy, py), dy represents the length of the shortest path from source point x to point y (if there is no direct connection between point x and point y or they can only be connected through other points, the distance between the two points is defined as infinite); py represents the point before point y in the shortest path between x and y; the problem is to solve the short path algorithm from x to y[4]. 2.2. Ant Colony Optimization Ants start to search for food in the original state of 0. When ant A find food, it will release a volatile secretion called pheromone (which will gradually disappear as time goes by) to deliver information to other ants, then other ants will find the food according to the information of pheromone. However, as pheromone keeps volatilizing, those ants that cannot receive the “signal” of pheromone will search for food through other paths and will also release pheromone to attract other ants. If ant B finds food through a path that is shorter than other paths, more ants will choose this path. Finally, a shortest path will be found through the constant release and volatilization of pheromone. This is ant colony optimization (ACO), also known as ant algorithm, which is a kind of bionic optimization algorithm. Ants will choose the path with higher pheromone concentration during the process of searching for food. Therefore, the transition rules which ants follow to search for path are usually related to the pheromone concentration of paths and the value of expectation. The probability of choosing point j for an ant located on point i on day p [5]:
( )( ) ( )( )
pi , j pi , j Dpij = p pi , j i, j qtab 0
q tab
(1)
In the formula, pi ,j represents the pheromone concentration of path (i,j) on day p; pi ,j represents the expectation value of path (i, j ) on day p; α represents the pheromone relativity( 0 ); β represents the relative
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
377
importance of heuristic information( 0 ); tab represents the point set of forbidden path on point i (for example, the points which have been passed in the path of previous algorithm or there is no available path from point i to point j are all forbidden paths [6]. 3. Optimal Shipping Path Algorithm Design on Single Constraint Condition 3.1. Optimal shipping path algorithm analysis on single constraint condition Assume the numbers at joints in figure 1 represent the distance (or cost) between two points, the problem is to figure out the shortest distance (lowest cost) from point A to point I. The specific steps of solving the shortest path problem in directed weighted graph with traditional Dijkstra algorithm are as follows: 4
B 5 6
D
2
A
7
E 3
4
5
C
7
8
F
G 8
8
I
12
6 5
7
H
Figure 1. Directed weighted graph
Solution: let the initial i =0; d(A)=0; other points in the path d(i)=∞, among which i={A,B…H,I}; calculate with labeling method. The label of A is temporarily recorded as 0; d(i)=min(d(i), d(h)+𝑙𝑙ℎ𝑖𝑖 ); Calculate the distance from the source point to point i, and lhi represents the distance between h and i; if there is no connection between h and i, 𝑙𝑙ℎ𝑖𝑖 =∞; Set P represents the set of points that are already labeled, while set Q represents the set of points that are not labeled yet; before label calculation, set P=∅, set Q = {A,B…H,I}. The calculation results are illustrated in Table 1: Table 1. Dijkstra calculation results
A
B
C
D
E
F
G
H
I
∞ ∞ ∞ ∞ ∞ ∞ 1 5 3 ∞ ∞ ∞ ∞ 2 5 (3,A) 7 10 ∞ ∞ ∞ 3 (5,A) 9 7 10 4 9 (7,B) 10 14 13 19 5 (9,B) 10 14 13 19 6 (10,C) 14 13 19 7 14 (13,E) 19 8 (14,E) 19 9 (19,E) From Table 1 we can see that: (1) The shortest path from source point A to end point I is A-B-E-I, and the length of the shortest path is D ( A, I ) = 19 .
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
378
(2) The shortest distance from source point A to different points in the path, for example, = d ( A, B ) 5,= d ( A, C ) 3,= d ( A, D ) 9,= d ( A, E ) 7,= d ( A, F ) 10,= d ( A, G ) 14,= d ( A, H ) 13, = d ( A, I ) 19 (3) The calculation times during the whole process: (P) = 8 ++ 2= 35 3.2. Drawbacks of traditional Dijkstra algorithm It can be seen from the basic thoughts of Dijkstra algorithm that when solving directed weighted graph, there are two obvious drawbacks in searching in the above algorithm. (1) Dijstra algorithm usually traversed all points that are not labeled when labeling the next point, including those which have already been calculated, thus increasing the calculated amount and causing data redundancy[7]. (2) When searching the shorted path from a certain source point to end point, we can not only get the shortest path from the beginning point A to point L, but also can get the shortest path from point A to other points (BCDEFGHI). Therefore, Dijstra algorithm can be extended to figure out the shortest distance from a certain point to any other points (not necessarily the end point) in a digraph, for example, the distance from point A to point F; in fact, however, only the shortest path from point A to point F is necessary. This is because on one hand, the distance to other points is useless, but just increases the calculated amount; on the other hand, all we need in traversal algorithm searching is the shortest distance to point F. when the calculation goes to the subsequent three points of G, H, I, we can break out of the circulation and end the algorithm. 3.3. Improvements to traditional Dijkstra algorithm Improvements should be made to Dijkstra Algorithm according to the drawbacks. According to the analysis, after joining set P, we can first think about judging from d(i), 𝑙𝑙ℎ𝑖𝑖 when making the next calculation. If d(i), 𝑙𝑙ℎ𝑖𝑖 both equal to ∞, the point can be omitted in the calculation; only when at least one of d(i) and 𝑙𝑙ℎ𝑖𝑖 not equal to ∞, the point should be calculated. With such calculation mode, not all points that are not labeled in the digraph need traversing in the searching process of algorithm, but just. Then time algorithm complexity will decrease from O (n2) to O (n), thus eliminating ∞ in the table to the maximum level and promoting calculation efficiency. The calculation results applying the improved algorithm are as follows: Table 2. Dijkstra calculation results after the improved algorithm
A 1 2 3 4 5 6 7 8 9
B
C
5 5 (5,A)
3 (3,A)
D
9 9 (9,B)
E
F
7 7 (7,B)
10 10 10 10 (10,C)
G
H
I
14 14 14 14 (14,E)
13 13 13 (13,E)
19 19 19 19 19 (19,E)
Optimal path is showed in Figure 2. It can be seen from the table that the calculation times of the whole process: (P)= 2 + 2 + 2 + 4 + 1 + 1 + 1 + 1 = 14
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
379
Figure 2. Optimal path and result
Improvements are made to the calculation redundancy and low efficiency caused by the second item: (1) The calculation times are 35 with the traditional Dijstra algorithm, which are changed to 14 with the improved algorithm, thus showing efficiency is greatly changed when points are in small quantity. (2) Traditional Dijstra algorithm demands that only after all points in the directed weighted graph are labeled can we break out of circulation and end the algorithm. In fact, all we need is just the distance from the beginning point to the target point. Therefore, if the target point, for example point I, has been labeled and added to set Q, we have already got the figure of the shortest path that we want to figure out, so the subsequent calculation is unnecessary. We can simplify the algorithm routine by setting breaking out symbol. After finding the target point and labeling it, we can break out of circulation. In this way, the efficiency of searching traversal algorithm can be further promoted to less than O (n), thus saving a great deal of calculation. 4. Optimal Shipping Path Algorithm Design on Multi-constraints Condition With the analysis and the improvements to Dijkstra algorithm, Dijkstra Algorithm can accurately figuring out the optimal path between two given points in single digraph. When it is applied to multimodal shipping transportation system, it can figure out the optimal path in terms of distance between two ports or optimal path in terms of cost between two points. Dijkstra can solve the problem of optimal path in shipping system on single constraint condition (for example time or distance), but it is not adequate to deal with more complicated path planning problems. 4.1. Lane Modeling The shipping system of China’s coastal ports is characterized by transportation of bulk goods and containers, high labor handling cost and high storage cost during transfer, and the transfer cost caused by multi-transfer and its own transportation cost are usually higher than the cost of single transportation. Only keep the path from the beginning point of acceptance for carriage from ports as showed in Figure 3: T1 represents the source point of a certain directed network graph; G4 represents the end point of the network graph; the goal is to obtain that optimal path from T1 to G4. (a,b,c) in the directed path of T-G in the graph respectively represents the departure time, arrival time and operation cost from point 1 to point 2. (b-a) represents the length of operation time from point 1 to point 2. For the convenience of calculation, the shipping model is future transformed. The connection diagram is expanded and the transfer cost is taken into consideration, and the time cost of each line and the total transportation cost are recalculated. The expansion rules are as follows: (1) Points with in degree of N should be expanded to N virtual points (2) Update edge weight: (time cost, total transportation cost) Time cost = waiting time + transportation time Total transportation cost = waiting time * hour cost of storage + single transportation cost
380
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
(3) If the arrival time of a ship is later than the departure time of the next ship, it is essential to wait for the same ship on the next day, so the waiting time should be added by 24 hours.
Figure 3. Connection diagram after optimizing railway system
For the convenience of calculation, the thesis supposes the hour cost of storage is 1 and the storage cost for the beginning point is 0. Taking the combination of two paths: T1-G1-1 and G1-G4 as an example, the updating 42) = (2+8, 2*1+40) . weighted value from virtual point G1 to virtual point G4 is (10, According to the above rules, the acceptance for carriage from 0:00 is expanded and the corresponding operation time is respectively showed in Figure 4.
Figure 4. Weighted digraph with 00:00 moment expansion
It can be seen from the comparison that the departure time exerted direct influence on the weight of line of the departure point, thus affecting the calculation results of the optimal path. Through expansion, the complicated digraph with the factor of dynamic moment is transformed into a weighted digraph at a fixed moment, and so far the optimization of the shipping model is finished. 4.2. Ant colony algorithm design C language is used to achieve an improved ant colony algorithm which can be applied to solve the problem with multi-constraints condition[8]. (1)Probability Model Selection One of the key points of ant colony algorithm is the probability model selection design, which shows the rules an ant following from one point to another point [9]. Unlike the normal greedy algorithm, an ant may not move
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
381
the optimal next point, but to decide its moving direction according to certain probability. In this way, we can avoid that the rapid convergence of the algorithm to a local optimal solution. Probability selection formula is the key point of ant colony algorithm. ij(t ) gik(t ) ,ifj allowedk pijk (t ) = is(t ) gis(t ) s allowed k 0,or
(2)
pijk (t ) represents the probability of moving from point i to point j. The bigger the value is, the higher k (t ): one is the pheromone probability an ant finally chooses this point. There are two influence factors for pij
concentration of the current path, while the other one is the intensity of inspiring signal of the path. It is easy to understand the pheromone concentration, while the intensity of inspiring signal can be shifted to the weight of the path. The smaller the weight is, which means the smaller the length is, the higher probability an ant choose this path. Pheromone concentration will be updated during each iteration, while the intensity of inspiring signal stays unchanged. Therefore, pheromone concentration will decide which path an ant will finally choose. In addition, α and β are of the same importance, which decide the weight of pheromone concentration and the intensity of inspiring signal in the decision[10]. (2)Update of pheromone and the introduction of multi-constraints condition Pheromone concentration of each line of the weighted graph will be updated after each iteration, and the pheromone left by all ants passing this line will be added to the pheromone concentration of the line. The update of pheromone concentration demonstrates the excellence of positive feedback of ant colony algorithm. Setting of pheromone concentration in the paper is decided by the following rules: ⚫ If the path produced by current iteration cannot meet all constraint conditions, the ant does not leave pheromone in this path or even reduce pheromone. In this way, the probability of an ant following this path next time is reduced, thus avoiding the situation that the path is finally chosen as the optimal path. ⚫ If the path produced by current iteration meets all constraint conditions, but the length of the path is bigger than the current shortest path that meets all conditions, the ant will reduce the pheromone left by it according to a certain proportion. ⚫ If the path produced by current iteration meets all conditions and is the current optimal path, it will be handled as the normal pheromone. The algorithm of the paper adopts the path length of current iteration to set pheromone. The shorter the path is, the bigger the value of the pheromone. ⚫ Pheromone concentration will be constantly diluted as time goes by, and the pheromone concentration of the path with less visit times in the iteration will keep decreasing. ⚫ The pheromone concentration of a single limited line is no more than and no less than the set value, in order to prevent that the probability transfer formula falls to the side with bigger weight. 4.3. Realization of ant colony algorithm The final result can be summarized as a problem of shortest path in a directed acyclic graph with multiconstraints condition. As the classic representative of greedy algorithm, Dijkstra algorithm can hardly address such kind of problems. That’s because the core of Dijkstra algorithm is to obtain the optimal solution with local single constraint, while keeping it locally optimal after adding new points that are not labeled. Apparently, when adding constraint condition again, the current locally optimal solution cannot be ensured as the locally optimal one subsequently. Ant colony algorithm can be used to solve the problem of shortest path in a directed acyclic graph with multiconstraints condition. It uses the natural phenomenon of ant searching for food in the nature for reference to solve practical problems in real life. Ants mark path by releasing pheromone on the path during the process of searching
382
Yunfang Ma et al. / Procedia Computer Science 162 (2019) 375–382 Author name / Procedia Computer Science 00 (2017) 000–000
for food. The path with more pheromone can usually attract more ants. Due to the volatility of pheromone, an ant using the shorter path can release more pheromone within the same time, thus attracting other ants and causing following effect, until nearly all ants search for food along the same shortest path. As showed in Figure 5, A-I represent different points. There are two numbers between two points: the first number represents the distance between the two points, and the second number represents the cost; to solve the problem: B 5,2
4,5 2,4 6,3
A 3,4
C
5,2
7,1
D
8,1 7,4
E 4,4
F
G 8,3
8,2
I
4,6 6,6 5,4
6,4
H
Figure 5. Ant colony algorithm experiment
5. Conclusion Based on the analysis of the optimal path algorithm, the improved design of Dijkstra algorithm promotes operating efficiency, reduces calculation times and saves the operation time. From solving the optimality of single factor (cost, length of path) with Dijkstra algorithm, and designing ant colony algorithm in order to figure out the optimal path planning with multi-condition constraints (comprehensive measurement of cost path, node restriction etc.) and designing cases to meet the optimal path choice for China’s coastal port under different conditions can promote the feasibility and practicality of the algorithm. Acknowledgements Research supported by Beijing Logistics Informatics Research Base and Intelligent Emergency Logistics Linkage System of Public Emergencies in Beijing (Project No.18JDGLB019). References [1] S. Orestis and C. Dionelis. Specialized Planning Issues. Handbook of Terminal Planning. 2011 [2] B. Kris, A. Caris, and G. K. Janssens. “Optimal shipping routes and vessel size for intermodal barge transport with empty container repositioning,” Computers in Industry, vol. 64, no. 2, pp. 155-164, 2013. [3] A. Maurizio, S. Mancini, and A. Rosa. “Formulating a Mathematical Model for Container Assignment Optimization on an Intermodal Network,” Procedia - Social and Behavioral Sciences, vol. 111, pp. 1063-1072, 2014. [4] A. Q. Huang, M. Li, and F. M. Yang. “A new nonlinear ensemble forecasting method based on an improved genetic programming,” Journal of Systems Science & Mathematical Sciences, vol.11, pp. 1332-1344, 2013. [5] A. Q. Huang, J. Xiao, S. Y. Wang. “A combined forecasting method integrating contextual knowledge,” Systems Engineering Theory & Practice, Chinese, vol. S1, pp. 55-65, 2011. [6] T. Xu, X. L. Ding, and J. F. Li. “Review on K shortest paths algorithms,” Computer Engineering and design, vol. 11, pp. 39003906+3911, 2013. [7] A. Sedeño-noda and M. Colebrook. “A biobjective Dijkstra algorithm,” European Journal of Operational Research, vol.276, no.1, pp. 106-118, 2019. [8] O. Engin and G. Abdullah. “A new hybrid ant colony optimization algorithm for solving the no-wait flow shop scheduling problems,” Applied Soft Computing, vol.72, pp.166-176, 2018. [9] D. Marco, and T. Stützle. "Ant colony optimization: overview and recent advances." Handbook of metaheuristics. Springer, Cham, 2019. 311-351. [10] S. Marcella, et al. “Ant colony optimization for the real-time train routing selection problem,” Transportation Research Part B: Methodological, vol. 85, pp. 89-108, 2016.