# Exploring Decentralized Warehouse Management Using Large Language Models: A Proof of Concept
## 3 System Architecture
### Digital Shadow Layer  
The digital shadow layer is a part of the system's digital twin, providing a real-time, synchronized reflection of the physical layer. This layer mirrors the current states of packages and warehouse slots, allowing other system layers to access up-to-date information without directly interacting with the physical components. The state of the system in the digital shadow is updated continuously by measuring the real-world physical processes, ensuring accurate and timely representation of the system.  
The package state in the digital shadow mirrors the physical layer. The location of each package at time \(t\) is reflected in the digital shadow, as shown in Equation (21):\[\hat{P}_{i}(t)=(x_{i}(t),y_{i}(t),z_{i}(t))\quad\forall i\in\{1,2,\ldots,N_{P}\} \tag{21}\]  
where \(\hat{P}_{i}(t)\) represents the digital shadow state of the \(i\)-th package and \((x_{i}(t),y_{i}(t),z_{i}(t))\) are the 3D coordinates of the package at time \(t\), mirroring the real-world location. \(N_{P}\) represents the total number of packages.  
Similarly, the warehouse slot state in the digital shadow reflects the physical state of the slot, including both its location and occupancy status, as shown in Equation (22):  
\[\hat{W}_{j}(t)=(x_{j}(t),y_{j}(t),z_{j}(t),S_{j}(t))\quad\forall j\in\{1,2, \ldots,N_{S}\} \tag{22}\]  
where \(\hat{W}_{j}(t)\) represents the digital shadow state of the \(j\)-th warehouse slot, \(S_{j}(t)\) is the occupancy status of the warehouse slot at time \(t\), with \(S_{j}(t)=1\) if it is occupied and \(S_{j}(t)=0\) if it is vacant, and \(N_{S}\) represents the total number of warehouse slots.  
The digital shadow layer can also perform a higher level of data abstraction. The spatial part of each slot's location can be simplified by using slot IDs instead of precise 3D coordinates, as shown in Equation (23):  
\[\hat{W}_{j}(t)=(\text{Slot}_{j}(t),S_{j}(t))\quad\forall j\in\{1,2,\ldots,N_ {S}\} \tag{23}\]  
where \(\text{Slot}_{j}(t)\) is the ID that abstracts the warehouse slot's spatial position and \(S_{j}(t)\) represents the occupancy status, indicating whether the slot is occupied (1) or vacant (0).  
Similarly, an abstraction of the spatial location of packages to the warehouse slot IDs can be performed. This means that, instead of tracking the exact 3D coordinates of packages throughout their journey, the system simplifies the process by associating each package with the ID of the warehouse slot where it is stored. This abstraction helps streamline the management of packages, focusing on the start and end points of the package's journey rather than continuously monitoring every movement.  
When a package arrives at a specific warehouse slot, it adopts the ID of that slot as its location. Thus, the final state of the package is represented by the slot ID, as shown in Equation (24):  
\[\hat{P}_{i}(t)=\text{Slot}_{j}(t)\quad\forall i\in\{1,2,\ldots,N_{P}\} \tag{24}\]  
where \(\hat{P}_{i}(t)\) represents the digital shadow state of the \(i\)-th package and \(\text{Slot}_{j}(t)\) is the ID of the warehouse slot where the package is stored.  
The digital shadow layer includes both detailed physical data and abstracted information. While the exact 3D coordinates of packages and warehouse slots are continuously tracked for precise monitoring, spatial abstraction simplifies management by mapping package locations to slot IDs. This duality ensures both real-time accuracy and simplified data which can be utilized by other layers.