An Approach to Control Automated Warehouse Systems