# Digital Twin for Supply Chain Coordination in Modular Construction
## 3 Digital Twin Framework for Logistics Simulation in Modular Construction
### System Architecture  
The suggested digital twin framework's system architecture is shown in Figure 2. The system architecture shows the overall outline of the system and its data transaction flow in detail; it also shows how data analytics for logistics simulation can be performed without combining BIM and GIS in one data format. The digital twin is composed of a web front end and a back-end. The back-end contains a Unity (Unity; Unity Technologies, San Francisco, CA, USA) engine. Unity is a game engine that helps create interactive 3D content in real-time. Unity also supports BIM plug-ins, connecting all project members on one collaborative and immersive platform for real-time information sharing with visualization. Also, Unity is designed to test different 'what-if' scenarios, by running millions of physical simulations in parallel. Thus, many function modules needed for real-time logistics monitoring and simulation in modular construction can be made on Unity. First, the project manager inputs BIM data required for a modular project (e.g., module geometry, color, material properties, delivery, and assembly schedule) and simulation parameters (e.g., production rate, assembly speed, and transportation speed) into the back-end's system. Meanwhile, IoT sensors collect real-time sensory data (e.g., GPS) from the modules while they are in the logistics stage. The Unity engine creates a virtual asset in a virtual space by combining the BIM and IoT sensor data. The virtual asset includes all information (e.g., geometry, current location, and material properties) from the physical module. The virtual asset itself can be used to monitor conditions or test the performance of logistics. Information required for logistics route searches (e.g., weight, geometry, factory and site location, and location of modules) can be selectively extracted via JSON format, a standard text-based data format that can be  
Figure 1: Digital twin framework for real-time logistics simulation in modular construction: (**a**) data collection; (**b**) virtual asset update; (**c**) what-if analysis. Figure 2: System architecture of the digital twin platform for logistics simulation. read in any programming language. The information is then transferred Bing Maps (Bing; Microsoft, Seattle, Washington, DC, USA), an application that exists outside of the digital twin, through the application gateway in real-time. Bing Maps provides a cloud-based web mapping service for tasks such as finding locations, vehicle routing, and route visualization. Bing also includes an application programming interface (API) which allows users to create different types of map-based applications on their own platforms. For example, when a digital twin requests Bing Maps to search for a delivery route that excludes highways, it returns coordinates for every turning point of the truck based on recently updated GIS. In addition, Bing Maps provides a key benefit to modular truck routing in being capable of incorporating search constraints such as maximum slope, minimum turning radius, height and width restrictions, and maximum load restrictions [45]. There are two simulators in the back-end. One simulator is for the module's offsite production and onsite assembly simulation in the Unity Engine. Unity allows detailed 3D simulation and data analytics (e.g., performance test) [46]. For example, module production time, assembly time, cost, and equipment idle time can be simulated in Unity with a 3D model in real-time. The other simulator is for logistics simulation that is connected to Bing Maps in real-time and is responsible for finding the optimal logistics scenario with alternative routes. For example, the logistics simulator sends the current location and geometry of the module to Bing Maps and requests a route which does not require any permissions or tolls for transit. Alternatively, the simulator can request the fastest route regardless of tolls to deliver the module as soon as possible if onsite teams are finished with prior work and waiting for the next module.