File size: 19,315 Bytes
f0d7273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44a98c9
f0d7273
44a98c9
f0d7273
 
44a98c9
f0d7273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44a98c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
---
pretty_name: Phase 1 Cold-Chain Warehouse Dispatch
language:
- en
size_categories:
- 1K<n<10K
task_categories:
- text-generation
annotations_creators:
- machine-generated
language_creators:
- machine-generated
source_datasets:
- extended
tags:
- synthetic
- text
- tabular
- cold-chain
- warehouse-dispatch
- simulation
- optimization
- instruction-tuning
configs:
- config_name: default
  data_files:
  - split: train
    path: train.jsonl
  - split: validation
    path: validation.jsonl
  - split: test
    path: test.jsonl
---

# Phase 1 Cold-Chain Warehouse Dispatch

This export contains **4,000 simulation-labeled examples**, built from
**1,000 source picking-wave cohorts × four scenario variants**.

| Split | Examples | JSONL | CSV |
| --- | ---: | --- | --- |
| Train | 3,192 | [train.jsonl](train.jsonl) | [train.csv](train.csv) |
| Validation | 380 | [validation.jsonl](validation.jsonl) | [validation.csv](validation.csv) |
| Test | 428 | [test.jsonl](test.jsonl) | [test.csv](test.csv) |

CSV and JSONL were exported as alternative representations of the same examples,
not separate datasets. [manifest.json](manifest.json) records the original file
checksums, counts, run fingerprint, and validation summary. A locally edited file
may no longer match that manifest; compare its checksum before using it as the
original export.

## Dataset description

This English instruction/response dataset pairs warehouse states with structured
JSON dispatch plans. It combines real footwear picking workloads with synthetic
produce inventory, literature-conditioned shelf-life models and simulated
thermal disruptions. The reference answers are generated by exhaustive search
with a deterministic simulator. This release uses schema `stage1-v1`.

Full Code: https://github.com/MeRichard123/Dynamic_FEFO_Cold-Zone_Dispatch

### Intended uses

- Supervised fine-tuning for warehouse-state-to-JSON dispatch generation.
- Zero-shot and few-shot research on constrained picking and temperature decisions.
- Evaluation against reproducible simulation actions and outcomes, with source
  workload cohorts kept separate across training and evaluation.

Direct deployment for refrigeration control, food-safety clearance or claims of
measured waste reduction is outside the dataset's validated scope. There are no
reported trained-model results or leaderboard scores for this release.

### Dataset structure and fields

Each JSONL line is one object:

| Field | Type | Meaning |
| --- | --- | --- |
| `id` | string | SHA-256 fingerprint of the input prompt and schema |
| `schema_version` | string | `stage1-v1` |
| `messages` | list of role/content objects | System instructions, user warehouse task, assistant reference JSON |
| `metadata` | object | Source lineage, solver status, baseline metrics and replay configurations |

The user message contains prose followed by separate JSON blocks for warehouse
state, decision domain and objective weights. The assistant's `content` is a
JSON-encoded string, not an already parsed object. Parse it with `json.loads`.
Its keys are `dispatch_plan`, `optimization_status`, `kg_food_saved`,
`food_saved_baseline` and `metrics`. `dispatch_plan` contains `put_away`,
`pick_priorities`, `chiller_adjustments`, `alerts` and `execution`.

CSV columns are `id`, `schema_version`, `system`, `input`, `output`, `variant`,
`kg_food_saved`, `optimization_status` and `metadata_json`. The last column is
JSON-encoded audit metadata. Numerical units are Celsius, minutes, kg, kWh,
kg CO2 and reference-temperature remaining-life hours as specified in the prompt.

### Loading a local example

This dependency-free example loads the original JSONL without inferring a nested
Arrow schema for the heterogeneous replay metadata:

```python
import json
from pathlib import Path

with Path("dataset/train.jsonl").open(encoding="utf-8") as stream:
    example = json.loads(next(stream))

prompt = [m for m in example["messages"] if m["role"] != "assistant"]
ground_truth = json.loads(next(
    m["content"] for m in example["messages"] if m["role"] == "assistant"
))
print(json.dumps(ground_truth, indent=2))
```

When running from the dataset directory itself, use `train.jsonl` instead of
`dataset/train.jsonl`. 

## Sources used in this export

### Warehouse layout and picking workloads

Rodrigo Furlan de Assis (2024), *Order Picking Dataset from a Warehouse of a
Footwear Manufacturing Company*, Mendeley Data, version 1,
[DOI: 10.17632/pf2w725pw3.1](https://doi.org/10.17632/pf2w725pw3.1).
The accompanying article is de Assis, de Paula Ferreira and Ouhimmou (2025),
*Data in Brief* 61, 111837,
[DOI: 10.1016/j.dib.2025.111837](https://doi.org/10.1016/j.dib.2025.111837).

The local input is
`Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip`
in the repository root. The pipeline reads `Storage_Location.csv` for coordinates,
`Picking_Wave.csv` for picks, and `Customer_Order.csv` for wave dates. The archive
contains 2,292 storage slots, 215,192 picking rows and 9,707 waves. Of those waves,
9,143 contain storage-location picks and 564 are ineligible for this build.

These are footwear operations. Produce identities, mass conversion, stock ages,
thermal zones and food-quality behavior were added by this project; the source
contains no measured produce spoilage outcomes.

### Fruit shelf-life parameters

Zou et al. (2025),
[DOI: 10.1016/j.jfoodeng.2025.112577](https://doi.org/10.1016/j.jfoodeng.2025.112577),
with the supplied supplement `1-s2.0-S0260877425001128-mmc1.docx`.

| Product | Evidence used | Simulation model |
| --- | --- | --- |
| Apples | Supplement S8: b* shelf-life endpoints, 240/171/78/36 days at 0/5/15/25 °C | Linear interpolation of reciprocal lifetime (quality-loss rate) |
| Strawberries | Supplement S5: 18/11.1/7/4.2/2.8 days at 4/10/15/20/25 °C | Linear interpolation of reciprocal lifetime (quality-loss rate) |
| Oranges | S17 Q10 = 2 and Annex II citrus lifetime of 56 days at 4 °C | Literature-prior lifetime with the implemented linear Q10 temperature factor |

A normalized remaining-quality budget starts at 1 and expires at 0. For apple
and strawberry endpoints, rate is `1 / shelf_life_hours`; interpolation is in
rate, not lifetime. Remaining life is expressed in reference-temperature hours
at 4 °C. Full reference lifetimes are approximately 4,354.38 hours for apples,
1,344 hours for oranges and 432 hours for strawberries. Curve extrapolation is
rejected. The supplement's printed k0 values were not used because their units
and normalization do not consistently reconcile with its reported lifetimes.

See [parameter derivation and assumptions](../docs/paper-parameters.md) and
[the supplement importer](../warehouse_sim/literature.py). These parameters
condition the simulator; they do not validate individual warehouse batches.

### Electricity carbon intensity

The [official GB Carbon Intensity API](https://carbon-intensity.github.io/api-definitions/)
supplied the cached response for
[5 January 2023](https://api.carbonintensity.org.uk/intensity/date/2023-01-05).
The preserved input is [data/grid-2023-01-05.json](../data/grid-2023-01-05.json).
It stores the raw response and the simulation's time-indexed intensity intervals
in kg CO2/kWh, beginning at `2023-01-05T07:42:00+00:00`.

All workloads reuse this cached interval. Their original source dates are not
matched to separate historical grid days. Although interval values are marked
`actual`, the benchmark explicitly makes the entire grid schedule available as
known scenario context; this is not a causal evaluation using only forecasts
available at each operational instant.

### Recorded model-generated disruption

[data/generated-42.json](../data/generated-42.json) preserves **one** Ollama
`qwen2.5:7b` response, quantized as `Q4_K_M`, generated with seed 42. It includes
the request, response and parsed event. The structured event is a cooling
failure in the `cool` zone, starting at minute 60, lasting 30 minutes, with
available cooling fraction `0.7`.

The simulator uses that structured event. The generated prose's assertion of a
3 °C rise is not an imposed physical observation or temperature trajectory.
This one response is replayed across 500 workloads; it is not 500 independent
model generations. All other faults are explicitly procedural.

### Earlier experiments excluded from the final label source

The downloaded [Datcolabssnet Cold Chain Logistics dataset](https://www.kaggle.com/datasets/datcolabssnet/cold-chain-logistics-dataset),
local `Cold_Chain_Logistics_Dataset.csv`, was inspected for an earlier aggregate
estimated-freshness calibration experiment. Its 7,000 rows do **not** supply the
final apple/orange/strawberry kinetic profile or dispatch ground truths.

The fruit-image Kaggle dataset and Mendeley `czz68d9fwj` discussed in
[the source assessment](../docs/data-sources.md) were candidate inputs, not data
imported into these 4,000 examples.

## Creation process

The implementation is in [batch.py](../warehouse_sim/batch.py),
[pmc.py](../warehouse_sim/pmc.py), [scenarios.py](../warehouse_sim/scenarios.py),
[engine.py](../warehouse_sim/engine.py),
[optimizer.py](../warehouse_sim/optimizer.py) and
[dataset.py](../warehouse_sim/dataset.py).

1. **Load the preserved simulation template.**
   [examples/paper-template.json](../examples/paper-template.json) sets seed 42,
   a 480-minute horizon, one-minute ticks, ambient temperature 22 °C, one picker,
   walking speed 1.2 m/s, two-minute picks, coordinate scale 1 metre per unit,
   and dispatch coordinates `[66, -29]`. Thermal capacities, conductances,
   cooling capacities and COP values are explicit scenario parameters stored
   in that template, not measurements fitted from the footwear dataset.

2. **Index and select workloads.** Read the archive, group picks by source wave,
   and select the first 1,000 eligible waves, with one wave per cohort and
   eligible-wave offset 0. Source wave IDs, original archive hash and exclusion
   counts are retained. Navigation-only waves are skipped rather than converted
   into invented inventory.

3. **Convert footwear workloads into synthetic produce cases.** Map aisles A–F
   to chilled/apples (532 slots), G–L to cool/oranges (852), and M–R to
   temperate/strawberries (908). Within each zone, retain at most the first two
   lexicographically sorted storage slots touched by the selected wave. Record
   picks excluded for nonstorage locations or for being outside that decision
   window. Convert each source unit into **one synthetic kg**. Aggregate demand
   by wave and mapped SKU, and create one initial pallet per retained slot with
   its corresponding aggregate quantity. Pallet IDs are `PMC-<source slot>`;
   original product references are retained for lineage. Wave times are relative
   to the cohort's earliest date with time scale 1.0. The batch increments the
   template seed by the zero-based cohort index.

4. **Assign synthetic initial remaining life.** Ordinary cases draw uniformly
   from 50–100% of each product's full reference lifetime. The near-expiry
   variant redraws ages uniformly from 0.01–0.8%. These are synthetic ages,
   not receiving dates or measured source quality. FIFO uses assumed arrival
   time (default 0) and pallet ID to break ties.

5. **Attach the cached grid and create four variants per cohort.**

   | Variant | Count | Construction |
   | --- | ---: | --- |
   | `normal` | 1,000 | Ordinary stock; no fault |
   | `near_expiry` | 1,000 | Same workload; synthetic aged stock; no fault |
   | `sensor_drift` | 1,000 | Ordinary stock; seeded negative sensor bias |
   | `disruption` | 1,000 | Even cohort indices replay the saved Ollama event; odd indices alternate procedural cooling failure and stuck door |

   Procedural random seed is `config.seed * 1009 + cohort_index`, plus 1 for
   sensor drift or 2 for the disruption variant. A random zone is selected;
   start time is uniform from 0 to `min(30, 0.2 * horizon)` minutes, and duration
   is uniform from 30 to 90 minutes, capped by the remaining horizon. Parameters
   are rounded to three decimals. Sensor bias is uniform from −2 to −0.4 °C;
   cooling availability is uniform from 0 to 0.15; a stuck door has value 1.
   Events must satisfy the disruption schema and horizon constraints.

   Totals are **2,000 controls, 1,500 procedural-fault cases and 500 recorded-model
   replays**. Fault kinds total 1,000 sensor-bias, 750 cooling-failure and 250
   stuck-door cases.

6. **Generate the ground truth using exhaustive simulation search.** Enumerate
   pallet permutations within each SKU and all allowed static zone setpoints:
   chilled `[0, 1]`, cool `[2, 3]`, temperate `[4, 5]` °C. Put-away is fixed by
   the existing greedy rule, wave arrival order is fixed, and idling/relocation
   are excluded. The default per-case exact-search budget is 2,000 candidates;
   this build used 105,696 candidate evaluations in total. Minimize:

   ```text
   expired_kg
   + 2.0 * unfilled_kg
   + 0.1 * compressor_kwh
   + 0.1 * grid_kg_co2
   - 0.001 * dispatched_life_kg_hours
   ```

   Simulate the chosen plan and matched FIFO/FEFO baselines. The exported
   food-saving target is `FIFO expired_kg - chosen_plan expired_kg` under the
   same initial stock, demand, disruptions and horizon. All 4,000 exported
   records are labeled `optimal_in_declared_domain`; this means exact within
   this finite domain, not globally optimal warehouse control.

7. **Construct prompt/answer pairs.** The system message defines a cold-chain
   coordinator. The user message contains the state, known disruption/grid
   schedules, decision domain and objective weights. The assistant target
   contains put-away assignments, pallet priorities, chiller adjustments,
   alerts, execution events, optimization status, food saved and metrics.
   Labels come from the solver/simulator, not from the scenario-generating LLM.
   Metadata stores provenance, configurations and baseline results for replay.

8. **Split by source cohort, then export.** `base_case_id` fingerprints the source
   archive hash and sorted selected wave IDs. Calculate
   `int(sha256(base_case_id.encode()).hexdigest()[:8], 16) % 100`:
   buckets 0–79 are train, 80–89 validation, and 90–99 test. All four variants
   stay together. This produces 3,192/380/428 examples rather than enforcing
   exact row-level 80/10/10 quotas. Each split is provided as JSONL and CSV.

9. **Verify the export.** The recorded build replay-verified all 4,000 JSONL
   records: checksums, layout identity, actions, execution events, metrics,
   matched-FIFO food savings and source-cohort split isolation. Its manifest
   records 49 passing tests. These are historical build results; they do not
   certify later local edits. Checkpoints and historical run logs were removed
   after the final export; the input files and per-example replay metadata remain.

## Regenerate or verify

Run from the repository root with a Python environment that can run this project:

```bash
python3 -m warehouse_sim.stage1 batch-build \
  --dataset 'Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip' \
  --template examples/paper-template.json \
  --scenario data/generated-42.json \
  --grid data/grid-2023-01-05.json \
  --variant-suite standard --cases 1000 --resume \
  --output runs/phase1-regenerated
```

This uses the preserved scenario without calling Ollama or downloading weights.
Add `--dry-run` for a preflight. Use a fresh output directory for a new run;
`--resume` applies to checkpoints created there, not the deleted original run.
The command rebuilds the simulation pairs; the final CSV packaging is separate
from the JSONL batch exporter.

```bash
python3 -m warehouse_sim.stage1 verify \
  --dataset 'Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip' \
  --export dataset
```

The replay verifier checks JSONL. CSV checksums must be compared separately
against `manifest.json`.

### Preserved input SHA-256 values

| Input | SHA-256 |
| --- | --- |
| Footwear source ZIP | `0de6901d639cae782e661ee63d479360b6942b31072e53d07bbde8313cbe9880` |
| Zou supplement DOCX | `fd56de4d5ea43d55aabe331461e1d33d7b7864db8052e273919253b56387a43a` |
| `examples/paper-template.json` | `b8b432185772aeebeae4b575f568e8655baf2ceaf0a6b6a436c61375f7cdc8cd` |
| `data/generated-42.json` | `6539033bf12ab82c541a656fa714229cff7bb38cc18f301f3621a86c48358216` |
| `data/grid-2023-01-05.json` | `e2c6a0e3311f8b57779b28666c68fb425ac9e34e7d07aa30f6cc70c17f5d047f` |

## Using the records and interpreting ground truth

For JSONL training, use `messages`; for CSV use `system`, `input` and `output`.
`metadata` / `metadata_json` contain solver controls and replay information and
must not be appended to model inputs. For evaluation, hold back the assistant
answer and compare it with the model's response. [EDA.py](../EDA.py) prints a
small zero-shot pick-order exercise and its reference answer separately.

The full benchmark evaluates a model-conditioned planning task. It does not
establish microbiological safety, measured food savings, or independent
validation on real cold-chain batches. Only 192 examples have positive simulated
food savings; the other 3,808 have zero. Replaying one model scenario and creating
four variants per workload does not create 4,000 independent operational samples.
See [the expansion report](../docs/scale-to-4000.md) and
[simulation methods](../docs/simulation-methods.md) for further detail.

## Bias, risks and limitations

The source workload represents one footwear warehouse, while the cold-chain
behavior is synthetic. Results may not transfer to other layouts, product
cultivars, equipment, operators or demand distributions. Only three produce
profiles and four standard variants are represented; the decision space is
small and static. Parameters and objective weights encode project choices.

The 1,000 cohorts share the facility, grid day, parameter template and one
recorded model scenario. Cohort isolation prevents wave variants leaking across
splits, but does not test generalization to a new facility or unseen physical
model. Positive savings occur in 192/4,000 examples (4.8%); a model predicting
zero everywhere would match that scalar target on 95.2% of examples. Evaluate
plan feasibility, action quality and simulator outcomes as well as scalar error.

Full future disruption schedules and cached grid intensities are disclosed in
the inputs. This can overstate performance relative to an operational setting
with uncertain forecasts. Reference labels are optimal only in the declared
finite search domain. Human review of every generated example is not documented.

## Personal and sensitive information

Prompts retain warehouse slot IDs; audit metadata retains source wave IDs,
product references, timestamps and file hashes for lineage. The conversion does
not intentionally add names or contact details, but this project has not
performed a comprehensive privacy or re-identification audit of the original
archive or generated export. Source operational identifiers should be treated
as provenance rather than evidence of produce observations.

## Licensing and distribution

MIT License see LICENSE