Esacode

Docs / Blocks / Simulation

Warehouse fleet

A warehouse of 3,600 m² run live: deliveries stored on the shelves and orders picked by up to 60 mobile robots, with real speeds, times, batteries and incidents, on the CPU, an NVIDIA GPU or Tenstorrent cards.

Runs on a worker (Python) Simulation Version 1.0 Code you can open and adapt

How it works

Runs a warehouse live for Minutes, with goods coming in and going out.

The hall (65 x 56 m with the defaults, about 3,600 m²) has 20 pairs of rack rows in 5 blocks with 3 shelf levels (4,800 slots, one package each), one-way aisles, cross-aisles, highways at both ends, 4 receiving stations on the north wall, 8 pack-out stations on the south wall and docks with chargers along the walls; Layout changes it within the same hall, as the Warehouse layouts block compares them.

The shelves start Shelves full at the start, with popular (A) packages near the pack-out stations. Deliveries arrive (Deliveries per hour; 0 = as many as the orders take out) on the receiving conveyors; a free robot drives there, loads up to three (Seconds to load a delivery each) and stores each in a free slot chosen by its class.

Orders arrive (Orders per hour) with 1 to 3 lines, each a stored package; a robot drives to each slot, waits while the picker puts it in its tote (Seconds to pick an item), takes the tote to the least busy pack-out station and waits while it is unloaded; the order leaves on the conveyor. Orders and deliveries are served oldest first.

Batteries run down on the move and less standing; a robot below Go to charge below finishes its task and charges at its dock; idle robots charge too. The defaults follow real robots: MiR100 drives at up to 1.5 m/s, about 10 h on a charge, 2-3 h to charge; Locus Origin about 8 h, about 50 min to charge; collaborative picking 8-12 s per item.

Incidents (Incidents per hour): a spill or a dropped item closes an aisle cell, or a robot stops with a fault where it is; someone comes after Minutes until someone comes (on average) and cleans up or repairs it; meanwhile the routes are planned around it. The times of the incidents are assumptions to set for your site, not measured figures.

Routes come from distance fields of every target, computed on the worker's accelerator (CPU: SciPy breadth-first search; NVIDIA: wavefront on the GPU; Tenstorrent: TT-NN tile matmuls on the cards), and again whenever an aisle is closed or opened.

Tenstorrent runs the robots' steps on the cards too when PyTorch/XLA for Tenstorrent (tt-xla) is installed, else on the CPU beside them; the Linux computer with the cards needs TT-NN in the worker's Python (pip install ttnn, the version of the cards' firmware). auto uses Tenstorrent cards when the worker has them, else an NVIDIA GPU, else the CPU; naming one makes the block stop if it is not there.

Connect its telemetry to a 3D view: it draws the building and the warehouse (layout, with the incidents), the robots with their battery and what they carry (fleet), the packages on the shelves and the deliveries waiting (stock), the KPIs (kpi), where robots wait (heat) and what happened (event); and to a Run timeline for the events and the performance over time.

Commands on the control channel, as the 3D view's Controls or a Controls view send them ({"control": NAME, "value": …}): order_rate, inbound_rate, robots, speed, paused, block_aisle ([x, y]: blocks that aisle cell, or opens it again) and Open all aisles.

Results: kpis.json (orders, stored, order and putaway times, reaction time, robots busy, incidents, metres per item), timeline.csv and events.json, warehouse.json, and the records of every order (orders.csv: created, assigned, first pick, done, robot, station, packages) and every package moved (packages.csv: arrived, loaded, stored, slot and level, ordered, picked, shipped, robots) and the stock at the end (stock.csv).

Inputs

InputTakesWhat it is
Warehouse models
kit
Files
glb, json, txt
From Warehouse models: the run starts once the view has its models Optional.

Outputs

OutputGivesWhat it is
KPIs
kpis
Metrics
json
kpis.json: orders and packages stored per hour, order, putaway and reaction times, robots busy, incidents, metres per item
Timeline
timeline
Table
csv, json
timeline.csv (every 30 simulated seconds) and events.json (what changed, incidents and their clearing)
Layout
layout
Files
json
warehouse.json (esasim.warehouse/1)
Records
records
Table
csv
orders.csv (every order: when created, assigned, picked, done, by which robot), packages.csv (every package moved: arrived, loaded, stored in which slot, ordered, picked, shipped) and stock.csv (the shelves at the end)
Live telemetry
telemetry
Live telemetryWhat the block sends while it runs, for views such as Chart or 3D view.

Settings

SettingDefaultWhat it does
Robots at the start
robots
50
From 1 to 60
Orders per hour at the start
order_rate
300 Each order has 1 to 3 lines (packages); about 50 robots serve 300 orders per hour and the deliveries that replace them in this hall
From 0 to 6000
Deliveries per hour at the start
inbound_rate
0 Packages arriving at the receiving stations; 0: as many as the orders take out (about 1.7 per order)
From 0 to 20000
Simulation speed
speed
2 Times real time; the view can change it
One of: 1, 2, 4, 8
Minutes it runs
minutes
20 Real minutes; the run's Stop ends it before
From 1 to 180
Accelerator
accelerator
auto auto: Tenstorrent cards, else an NVIDIA GPU, else the CPU of the worker that runs it
One of: auto, CPU, NVIDIA GPU, Tenstorrent
Layout
layout
empty Changes to the layout in the same hall, as key=value: blocks=3 (rack blocks from front to back), stations=6, stations_at=both (south and north walls), inbound=2, inbound_at=south (receiving on the pack-out wall), levels=4, slotting=random (popular packages anywhere). Empty: the hall below as it is
Rack pairs
rack_pairs
20 Double rows of racks across the hall, with one-way aisles between them (3 m each)
From 4 to 30
Rack blocks
rack_blocks
5 Blocks of racks from front to back, with cross-aisles between them
From 1 to 8
Rack length (m)
rack_len
8
From 4 to 16
Pack-out stations
stations
8
From 1 to 20
Receiving stations
inbound
4 Where deliveries come in on a conveyor and robots load them (north wall unless the Layout says inbound_at=south)
From 0 to 20
Shelf levels
levels
3 Levels of each rack; each level holds one package per metre on each side
From 1 to 4
Shelves full at the start (%)
fill
70 The run starts from this stock, A packages near the pack-out stations, so it begins in a steady state
From 0 to 98
Seconds to pick an item
pick_s
10 Collaborative picking takes about 8-12 s per item
From 1 to 120
Seconds to unload at the station
station_s
15
From 1 to 120
Seconds to load a delivery
load_s
6 At the receiving station, per package; storing one on a shelf takes as long as a pick
From 1 to 120
Robot speed (m/s)
robot_speed
1.2 Warehouse AMRs drive at 1 to 1.5 m/s at most; 1.2 allows for slowing at turns
From 0.3 to 2
Hours on a charge
battery_h
8 Working, on the move; standing uses about a third
From 0.5 to 24
Minutes to charge from empty
charge_min
60
From 5 to 600
Go to charge below (%)
charge_below
25
From 5 to 80
Incidents per hour
incidents_h
2 Spills or dropped items that close an aisle, and robot faults; 0 for none
From 0 to 60
Robot faults (% of incidents)
fault_share
40
From 0 to 100
Minutes until someone comes
response_min
3 Average; each incident varies
From 0 to 120
Minutes to clean up a spill
clear_min
4
From 0.1 to 240
Minutes to repair a robot
repair_min
8
From 0.1 to 480
Random seed
seed
1

Where it runs

On one of your computers with the EsaSim worker: Any worker, NVIDIA GPU, Tenstorrent. The worker installs the Python packages it needs when they are missing: torch[cuda]</code>, <code>scipy.

In its code, settings are ctx.params["key"], inputs ctx.inputs["id"] and outputs ctx.output("id", "name.ext"); see Custom blocks.

More in Simulation