Application Research on Real-Time Interactive Simulation System of Container Yard Based on Unity3D

Abstract

In view of the limitations of the mathematical method used in the container terminal logistics system, this paper uses Unity3D to establish a computer simulation model for the container automated yard, which dynamically displays the operation process of the container automated yard logistics system in real time. Through the plane four-parameter coordinate conversion method and by taking the Shanghai urban construction coordinate system as the medium, it completes the conversion from the satellite positioning reference ellipsoid coordinates to the three-dimensional virtual scene coordinates. The example results show that the method is reliable and practical, improves the accuracy and efficiency of positioning, and provides a reliable reference basis for the container terminal logistics system.

Share and Cite:

Hu, R. , Zhou, X. and Yu, Y. (2022) Application Research on Real-Time Interactive Simulation System of Container Yard Based on Unity3D. Open Journal of Modelling and Simulation, 10, 292-302. doi: 10.4236/ojmsi.2022.103016.

1. Introduction

By December 2021, Shanghai Port has maintained the world’s largest container throughput for 11 years, and the annual container throughput of the Yangtze River Delta port group has exceeded 100 million TEUs [1]. As the transportation centers for maritime logistics, ports have become more and more important, and container terminals with large-scale distribution capabilities have become the hub and value-added service center of the entire logistics chain. Traditional terminal yard planning is a non-dynamic and low-information method [2]. The asynchronous development of port cargo throughput and port handling technology has made port areas put forward higher and higher requirements for terminal planning [2]. However, as a complex discrete event dynamic system, the container terminal logistics system has certain limitations simply by using mathematical analysis methods [3]. Computer simulation for area mapping and management has been verified possible [4] based on the coordinate systems; however, this simulation has not been applied to container yard before. By the computer simulation technology, not only the interface display is more intuitive [5], but also more random factors can be considered. Before the establishment of the port logistics system, the simulation results and data are analyzed and evaluated in order to modify and make decisions on the port logistics system planning.

2. Coordinate Conversion Mapping

At present, GNSS measurement has been more and more widely used in many industries as an effective measurement method to obtain the local coordinates of the measurement point [6]. There are two types of conversion modes for converting GNSS coordinates to local coordinates, the two-dimensional conversion mode and the three-dimensional conversion mode. The two-dimensional conversion mode is able to converse the GNSS coordinates in a small area to local coordinates while the three-dimensional conversion is able to converse the GNSS coordinates and local coordinates in a large area [7].

By optimizing the differential GPS positioning system, the GPS data of the mobile machinery can be accurately obtained by the system and mapped to the three-dimensional scene [8]. The entire mapping process takes two steps. First, map from the GPS WGS84 (latitude and longitude) to the Shanghai urban construction coordinates, and then map the Shanghai urban construction coordinates to the local coordinate system of the 3D virtual scene. Through this scheme, the mobile machine can be simulated in real time in the road or field of the three-dimensional scene [9]. There are basically the following two schemes shown in Figure 1 and Figure 2 for mapping GPS WGS84 coordinates to Shanghai urban construction coordinates.

Scheme 1: Rigorous Conversion (Over 30 km).

Scheme 2: Approximate Conversion (Less than 30 km).

As the loading and unloading area of Yangshan Port is far less than 30 km and the calculation of the first method is quite complicated, based on performance considerations, the second approximation scheme is selected. After testing, the conversion result has reached the centimeter-level error range. For the second approximate scheme, this project uses the horizontal axis Mercator projection calculation formula as the coordinate projection scheme:

{ E = F E + k 0 v [ A + 1 6 ( 1 T + C ) A 3 + 1 120 ( 5 18 T + T 2 + 72 C 58 e 2 ) A 5 ] N = F N + k 0 { M M 0 + v tan L [ 1 2 A 2 + 1 24 ( 5 T + 9 C + 4 C 2 ) A 4 + 1 720 ( 61 58 T + T 2 + 600 C 330 e 2 ) A 6 ] }

Figure 1. Coordinate rigorous transformation scheme.

In the formula,

T = tan 2 B

C = e 2 cos 2 B 1 e 2

A = ( L L 0 ) cos B

v = a 1 e 2 sin 2 B

M = a [ ( 1 1 4 e 2 3 64 e 4 5 256 e 6 ) B ( 3 8 e 2 + 3 32 e 4 + 45 1024 e 6 + ) sin ( 2 B ) + ( 15 256 e 4 + 45 1024 e 6 + ) sin ( 4 B ) ( 35 3072 e 6 + ) sin ( 6 B ) + ]

Figure 2. Coordinate rigorous transformation scheme.

M 0 = a [ ( 1 1 4 e 2 3 64 e 4 5 256 e 6 ) B 0 ( 3 8 e 2 + 3 32 e 4 + 45 1024 e 6 + ) sin ( 2 B 0 ) + ( 15 256 e 4 + 45 1024 e 6 + ) sin ( 4 B 0 ) ( 35 3072 e 6 + ) sin ( 6 B 0 ) + ]

Parameter Symbol:

a: Semimajor axis of ellipsoid.

e 2 : The square of the first eccentricity, e 2 = ( a 2 b 2 ) / a 2 , Flatness = (ab)/a.

e 2 : Square of the second eccentricity, e 2 = ( a 2 b 2 ) / b 2 .

B 0 : Origin latitude.

L 0 : Origin Longitude.

k 0 : The scale factor at the origin.

F E : Eastward shift (false east).

F N : Northing shift (false north).

B: Latitude.

L: Longitude.

The four-parameter coordinate conversion formula used in this project is as follows:

[ x y ] conversion Ι Ι = [ Δ x Δ y ] + k [ cos θ sin θ sin θ cos θ ] [ x y ] Ι

Make p = k cos θ , q = k sin θ , Indirect four parameters: [ Δ x , Δ y , p , q ].

Direct four parameters: [ Δ x , Δ y , k , θ ].

Four-parameter matrix expression:

[ x Ι Ι y Ι Ι ] conversion = [ 1 0 x Ι y Ι 0 1 y Ι x Ι ] [ Δ x Δ y p q ]

With common points p 1 , p 2 , , p n .

Its coordinates: ( x 1 Ι , y 1 Ι ) and ( x 1 Ι Ι , y 1 Ι Ι ) , ( x 2 Ι , y 2 Ι ) and ( x 2 Ι Ι , y 2 Ι Ι ) , , ( x n Ι , y n Ι ) and ( x n Ι Ι , y n Ι Ι ) .

Matrix representation of n common points:

[ x 1 Ι Ι y 1 Ι Ι x 2 Ι Ι y 2 Ι Ι x n Ι Ι y n Ι Ι ] conversion = [ 1 0 x 1 Ι y 1 Ι 0 1 y 1 Ι x 1 Ι 1 0 x 2 Ι y 2 Ι 0 1 y 2 Ι x 2 Ι 1 0 x n Ι y n Ι 0 1 y n Ι x n Ι ] [ Δ x Δ y p q ]

Error equation form of n common points:

[ v x 1 Ι Ι v y 1 Ι Ι v x 2 Ι Ι v y 2 Ι Ι v x 3 Ι Ι v y 3 Ι Ι ] = [ x 1 Ι Ι y 1 Ι Ι x 2 Ι Ι y 2 Ι Ι x n Ι Ι y n Ι Ι ] known [ x 1 Ι Ι y 1 Ι Ι x 2 Ι Ι y 2 Ι Ι x n Ι Ι y n Ι Ι ] conversion

So

[ v x 1 Ι Ι v y 1 Ι Ι v x 2 Ι Ι v y 2 Ι Ι v x 3 Ι Ι v y 3 Ι Ι ] = [ 1 0 x 1 Ι y 1 Ι 0 1 y 1 Ι x 1 Ι 1 0 x 2 Ι y 2 Ι 0 1 y 2 Ι x 2 Ι 1 0 x n Ι y n Ι 0 1 y n Ι x n Ι ] [ Δ x Δ y p q ] + [ x 1 Ι Ι y 1 Ι Ι x 2 Ι Ι y 2 Ι Ι x n Ι Ι y n Ι Ι ] known

V = B X ^ + l

Get the indirect four parameters: [ Δ x Δ y p q ] = X ^ = ( B T B ) 1 B T l

Convert the real four parameters: { Δ x Δ y θ = arctan q p k = p 2 + q 2 .

Since the distance actually applied in this article does not exceed 30 km, the accuracy requirement can be achieved by using the plane four-parameter conversion method. Conversion principle: The geodetic coordinates B and L (based on the satellite positioning reference ellipsoid) given by the GNSS receiver are transformed into the satellite positioning reference ellipsoid plane rectangular coordinates xI, yI through Gaussian projection, and then xI, yI are converted into local plane rectangular coordinates xI, yI (based on the local ellipsoid).

The specific process is as follows:

First, project the common point satellite positioning reference ellipsoid coordinates and the local coordinate system onto the Gaussian plane of the respective reference ellipsoid system to obtain the plane coordinates of the common point in the satellite positioning reference ellipsoid and the local coordinate system respectively.

Secondly, obtain four parameters by the least square method by more than two sets of coordinate data.

Finally, convert the Gaussian plane coordinates of the satellite positioning into the plane coordinates of the Gaussian projection surface of the local coordinate system by using the four parameters sought.

3. Case Analysis of Container Yard

3.1. Modeling and Simulation Technology

In order to simulate the real state of the container in the loading and unloading area (including position, appearance, etc.) and the real operating state (including position, appearance, etc.) of the mobile operating machinery in real time, the size ratio of the produced 3D scene to the real scene must be 1:1, including containers, mobile operating machinery, sites, buildings, roads, etc [10]. In order to achieve this goal, three-dimensional models of roads, buildings, etc. must be made according to the completed CAD drawings surveyed and mapped, so as to achieve a 1:1 ratio [11].

In order to achieve the efficiency of 3D modeling, BIM technology and Autodesk Revit are used to improve the efficiency of 3D modeling of sites, roads, and buildings. Revit software is designed for building information modeling, helping architects build and maintain better quality and more energy-efficient buildings. However, due to certain defects in the production of 3D models in Revit, for example, the appearance cannot achieve the real super-realistic effect required by this project, the number of output models is too large, which is not conducive to running on low-end computers or the interaction cannot be performed in Revit for simulation, the model exported by Revit needs to be further processed. The software Maya is used to process and improve the BIM-derived model in two ways. One is to make super-realistic materials for buildings and sites based on the materials collected on-site in the container handling area, and the other is to optimize the output model such as surface reduction. The entire technical framework is not only suitable for container yards, but also for other interactive simulation systems to achieve super-realistic scene appearance and efficient interactive simulation functions with higher development efficiency.

Since Maya is only modeling software and does not have the function of interactive simulation, the virtual container yard ultimately needs to develop an interactive simulation system based on a three-dimensional engine. Unity3D is a comprehensive development tool developed by Unity Technologies that allows developers to create types such as 3D video games, architectural visualization, and real-time 3D animation. It is a fully integrated professional 3D engine. At the same time, Unity3D supports importing 3D models made by Maya. Therefore, this paper studies the use of Unity3D to construct a model with three-dimensional data through a virtual three-dimensional space, develop interactive simulation functions of the entire system, and achieve a high degree of restoration and interaction of the scene.

3.2. Differential GNSS System

Through the differential GNSS reference station with accurate three-dimensional coordinates, Differential GNSS is used to obtain the pseudo range correction or position correction, and then sends the correction to the user in real time or afterwards to correct the user’s measurement data to improve the GNSS positioning accuracy [12]. In order to achieve real-time simulation of mobile machinery, mobile machinery is required to provide centimeter-level precision positioning. The base station has been built in the Yangshan Deepwater Port Logistics Park according to the working mode of the differential GNSS reference station. The distance between the base station and the mobile terminal is closer, the transmission path is more direct, the potential interference source is effectively reduced, the solution speed is faster, and the positioning accuracy is higher. The base station seamlessly covers the entire park, the signal strength is strong and there is a certain degree of redundancy, even if the radio signal is attenuated after working for a period of time, it can ensure high positioning accuracy of mobile machinery. The front-end equipment has multi-satellite and multi-frequency receiving capabilities, and can currently track and receive all satellite signals from the GNSS of US, Glonass of Russia, and Beidou of China.

The mobile network mode and the latest international RTCM3.2 data format as the differential data transmission format are both used in the differential GNSS system for data transmission and communication to avoid the inconsistency of the radio mode frequency and the incompatibility of the data format in the traditional way. After the rover is calculated, the internationally accepted NMEA standard format will be sent back through the network, and be connected to the 3D smart plat form after sorting.

3.3. Coordinate Transformation Mapping

In order to verify the practicability and stability of the system, experiments were carried out in the Shanghai Yangshan deep-water port area. By optimizing the differential GNSS positioning system, the system accurately obtains the GNSS data of the mobile machinery [13]. Since the entire site, roads, and buildings are modeled according to as-built CAD drawings, accurate GNSS data can be mapped to the three-dimensional scene [14]. The entire mapping needs to be divided into two steps [15]. First, map the GNSS satellite positioning reference ellipsoid (longitude and latitude coordinates) to the Shanghai urban construction coordinates, and then map the Shanghai urban construction coordinates to the local coordinate system of the 3D virtual scene. Through this scheme, the mobile machine can be simulated in real time in the road or field of the three-dimensional scene [16]. The 3D virtual scene is made based on the CAD drawings that have been surveyed and mapped. The drawings are related to the Shanghai urban construction coordinates by rotation, translation and zoom. The mapping formula is constructed from Shanghai urban construction coordinates to the 3D virtual scene after calculation.

From the implementation of the overall system design to the final trial run, it completely verified the feasibility of the system integration studied in this paper. During the trial operation of the system, six functions have been successfully achieved or simulated. The production information interaction function has successfully simulated the on-site container (30 - 600 seconds refresh synchronization).The crossing access control function is able to reflect the statistical status of the vehicles in and out (2 - 300 seconds refresh synchronization) and the GNSS tracking vehicle function can perform virtual simulation of the on-site mobile operating machinery in real time (1 - 3 seconds refresh synchronization). Furthermore, the digital surveillance interactive function achieved in the real time image by digital surveillance camera and the scene display function can virtually simulate the actual scene and obtain its information about related buildings, venues, etc. [17]. Last but not least, the GNSS tracking vehicle function is able to track mobile operating machinery in real time by digital surveillance cameras with both historical tracking trajectories and historical tracking video playback functions.

4. Benefit Analysis

4.1. Economic Benefit Analysis

1) The GNSS global positioning system project in Yangshan Deep-water port will effectively realize the high integration of traditional various security monitoring systems and emergency handling services. It enables managers to control the state of affairs in all aspects of the storage yard in real time [18], and to remotely understand the current state of the storage yard and the state of affairs which is taking place anytime and anywhere [19]. To further enhance the comprehensive management capabilities in the yard and the coordination and handling capabilities for emergencies [20]. After the completion of the project, it is expected to reduce the annual operating cost to 197 million.

2) The application of GNSS global positioning system will effectively help to manage the container vehicles and track the status of containers [21]. Through the feedback of yard and warehouse information, it can even effectively manage the container dynamics to ensure the orderly entry and exit of container vehicles to reduce waiting time. At the same time, the business volume is expected to reach 478,900 tons per year.

3) Optimize the intelligent management level of the storage yard. It helps to facilitate the enterprises to handle customs clearance procedures more efficiency for both import and export cargo. It will also indirectly improve the economic benefits of related parties such as export goods dealers, freight forwarders and transportation companies. Finally, the application of the GNSS system is expected to further enhance Shanghai as the international shipping center.

4.2. Social Benefit Analysis

Based on the technologies of data backup, virtual reality, sensor, internet and infrared thermal imaging, it is able to establish an information database of dangerous goods warehouses and management places. With the real time technology, the database and the management system are coordinated and interconnected, and realize the data backup of the management system database. When the business system is operating, the corresponding information display in the 3D scene will be updated in real time, so as to realize the function of data synchronization and the real-time management of the 3D scene. It can fully display the basic information of containers, mobile equipment and machinery in the yard, which is conducive to real-time update, control and effective distribution of container conditions, and can simulate emergencies and adopt corresponding emergency plans to realize intelligent management of the yard.

5. Conclusion

The application of Unity3D in computer simulation technology is becoming more and more extensive. It has been widely recognized for its overcoming the shortages of traditional design methods such as long design cycle, high cost, low degree of informatization and random modification. This article plans the overall layout, mechanical configuration and operation planning of the container automated yard logistics system. On the basis of theoretical analysis, a computer simulation model of the container automated yard is established by using Unity3D, which dynamically displays the container automated yard logistics in real time. The operation process of the system, as an optimization analysis of the entire system, provides a relatively reliable reference basis for planning and design, and has achieved relatively satisfactory results.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Wang, D. (2022).
http://www.sh.chinanews.com.cn/chanjing/2022-01-04/94982.shtml
[2] Polat, C., Kurt, H.M. and Rtem, E.S. (2019) Container Yard Management Systems and Research Their Efficiency about Port Productivity. Journal of Coastal Research, 1, 32-34.
[3] Sermeo, L., Orellana, J. and Eyzaguirre, J. (2020) Improvement of Attention Times and Efficiency of Container Movements in a Port Terminal Using a Truck Appointment System, LIFO Management and Poka Yoke. International Conference on Human Interaction and Emerging Technologies, Lausanne, 23-25 April 2020, 967-974.
https://doi.org/10.1007/978-3-030-25629-6_150
[4] Dong, L. and Gary, M. (2004) Synthetic Zero-Offset VSP Including Attenuation.
[5] Yu, X., Ye, F., Wang, D., Xi, J. and Xu, Z. (2012) Research on Key Technologies of Intelligent Management of Railway Container Yard. Road Freight, 38, 6.
[6] Li, X., Yan, B. and Liu, Y. (2016) A Rapid Expansion Algorithm for Panoramic Images Based on Mapping Transformation. Electronics Testing, 4, 31-34.
[7] Wang, H., Peng, Z. and Jiao, R. (2016) The Rendering Algorithm of Fast Three-Dimensional Coordinate Transformation. Chinese Journal of Image and Graphics, 21, 805-814.
[8] Yoo, S., Jo, Y. and Bahn, H. (2021) Integrated Scheduling of Real-Time and Interactive Tasks for Configurable Industrial Systems. IEEE Transactions on Industrial Informatics, 18, 631-641.
https://doi.org/10.1109/TII.2021.3067714
[9] An, D., Gai, S. and Da, F. (2014) A New 3D Profile Measurement System Model Based on Fringe Projection. Acta Optics, 34, 122-127.
[10] Chen, Z.L., et al. (2010) Design and Implementation of the 3D Simulation System for Container Yard. Journal of Huaqiao University (Natural Science), 11, 47-49.
[11] Andaluz, H.V., Chicaiza, F.A. and Gallardo, C. (2016) Unity3D-MatLab Simulator in Real Time for Robotics Applications. International Conference on Augmented Reality, Virtual Reality and Computer Graphics, Lecce, 15-18 June 2016, 246-263.
https://doi.org/10.1007/978-3-319-40621-3_19
[12] Serdar, B., Erol, R. and Metin, A. (2020) Performance Analysis of Real-Time and Post-Mission Kinematic Precise Point Positioning in Marine Environments. Geodesy and Geodynamics, 11, 5-14.
https://doi.org/10.1016/j.geog.2020.09.002
[13] Peng, X., Ren, H. and Yu, J. (2018) The Development of the Rotary Deck Crane Simulation System Based on Unity3D. 2018 International Computers, Signals and Systems Conference, Dalian, 28-30 September 2018, 630-634.
[14] Korth, B., Schwede, C. and Zajac, M. (2018) Simulation-Ready Digital Twin for Realtime Management of Logistics Systems. 2018 IEEE International Conference on Big Data (Big Data), Seattle, 10-13 December 2018, 4194-4201.
https://doi.org/10.1109/BigData.2018.8622160
[15] Ng, H.F., Zhang, G. and Hsu, L.T. (2020) A Computation Effective Range-Based 3D Mapping Aided GNSS with NLOS Correction Method. Journal of Navigation, 73, 1202-1222.
https://doi.org/10.1017/S037346332000003X
[16] Chen, W., Xiong, C. and Yu, L. (2021) Dynamic Monitoring of an Offshore Jacket Platform Based on RTK-GNSS Measurement by CF-CEEMDAN Method. Applied Ocean Research, 115, 102844.
https://doi.org/10.1016/j.apor.2021.102844
[17] Sun, H. and Fan, R. (2019) Intelligent Safety Supervision of Container Yard in Yangshan Deepwater Port. Port Technology, 6, 5.
[18] Mazouz, A., Naji, L. and Lyu, Y. (2017) Container-Terminal-Gate-System Optimization. Journal of Applied Business Research, 33, 605-614.
https://doi.org/10.19030/jabr.v33i3.9949
[19] Wei, Y., He, J., et al. (2014) A Yard Allocation Strategy for Export Containers via Simulation and Optimization.
[20] Zheng, M., et al. (2019) Simulation of Crane Load Motion Trajectory Based on Unity3D. 2019 2nd International Conference on Safety Produce Informatization, Chongqing, 28-30 November 2019, 223-226.
[21] Zhou, C., Lee, B.K. and Li, H. (2020) Integrated Optimization on Yard Crane Scheduling and Vehicle Positioning at Container Yards. Transportation Research Part E Logistics and Transportation Review, 138, 101966.
https://doi.org/10.1016/j.tre.2020.101966

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.