Within an automated warehouse, a replica is created using a digital twin. The system can use this replica to learn without the impact of negative cycles. The digital twin is used to compute changing system parameters. The system can be trained with the digital twin and fed order variations from time to time, not to mention that the system also learns during live operation. This allows for the warehouse management and material flow systems to be adapted in line with changing requirements in the warehouse.