Skip to content
Sam edited this page Apr 19, 2023 · 36 revisions

Automated Warehouse

This folder contains development scripts testing out an automated warehouse project.

What all goes into logistics? I explore this by building a simulated automated warehouse and the systems needed to consolidate orders with multiple agents.

We first assume a spherical cow / 2D grid world layout for the warehouse, we will have N robots that can move items from load zones to stations, and then a system for tracking incoming Orders and fulfilling them with those Robots.

This breaks up into two parts, the algorithm side (Multi-Agent Path Finding - MAPF) and the logistics/database side (inventory management system / automated warehouse).

The automated warehouse project utilizes a system of Orders, Tasks, and Jobs managed by a Robot Allocator, which assigns Robots to transport Items from Item Zones to Stations for assembly and order fulfillment.

media_automated_warehouse_example3.mp4

How it works

graph LR
A[Receive Order] --> B[Create Tasks]
B --> C[Robot Allocator]
C --> D[Assign Jobs to Robots]
D --> E[Pick Items from Item Zones]
E --> F[Deliver Items to Stations]
F --> G[Complete Tasks]
G --> H[Assemble Order at Station]
H --> I[Order Completed]
I --> J[Free Station for New Order]
Loading

Concepts

  • Orders are comprised of various combinations of Items that need to be picked up and assembled.
  • Items are located in designated Item Zones within the Warehouse.
  • Stations are responsible for processing Orders. An Order is considered complete once all its associated Items have been delivered to the Station through a series of Tasks.
  • The Warehouse contains multiple Stations for gathering and assembling Items to fulfill Orders.
  • Robots are responsible for transporting Items from the Item Zones to the Stations within the Warehouse.
  • Tasks represent the delivery of a specified quantity of an Item to a Station.
  • Each Robot is assigned a single Job, which involves moving one Item to a Station.
  • The Robot Allocator generates Jobs based on outstanding Tasks and assigns them to available Robots.
  • As Robots complete their Jobs, the corresponding Tasks are fulfilled, eventually leading to the completion of Orders. Once an Order is completed, the Station becomes available for a new Order.
  • This process continues indefinitely as new Orders are received and processed.

Sequence diagram

sequenceDiagram
    participant OrderProcessor as Order Processor
    participant Database as Database
    participant RobotAllocator as Robot Allocator
    participant Robot as Robot
    participant ItemZone as Item Zone
    participant Station as Station

    OrderProcessor->>Database: Check for available Orders
    Database->>OrderProcessor: Return available Orders
    loop Process Orders
        OrderProcessor->>Database: Create Task entries for Order
        RobotAllocator->>Database: Query Task entries
        Database->>RobotAllocator: Return available Tasks
        RobotAllocator->>Robot: Assign Jobs based on Tasks
        loop Pick and Deliver Items
            Robot->>ItemZone: Pick Items
            Robot->>Station: Deliver Items
        end
        Station->>Database: Update Task completion
        Database->>OrderProcessor: Update Order Progress
    end
    OrderProcessor->>Station: Order Completed, Free Station
Loading

Modules

A python module for tracking creating and tracking Orders, Items, Stations, and Tasks.

ims_example

scenario4

A python module for finding paths in a 2D grid world for singular and multiple agents without collisions.

A node module for seeing a live view of the tables of Orders/Stations and their status as they get completed.

warehouse_view1

Scripts

Simulates the environment and robots.

Manages Robot states and assigns Tasks to them, updating the warehouse as needed

Manages open orders, assigns to stations, creates tasks, etc.


Running

Run commands from this dev folder.

Either use the all-in-one start_warehouse.bat or individually start it with the following commands.

Start order processor and reset the inventory management database:

python -m inventory_management_system.order_processor reset

Start the world simulator

python -m world_sim

Run the order/station live visualizer (Need flask installed)

flask --app inventory_management_system.order_tracking_web_server --debug run

Run the world (the robots, zones,etc. on a 2D grid) live visualizer

node env_visualizer

Create fake orders with:

python -m inventory_management_system.fake_order_sender

Tests

Using the python unit testing framework.

python -m unittest
Clone this wiki locally