Datasets:
Upload folder using huggingface_hub
Browse files
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License Copyright (c) 2026 Richard
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of
|
| 4 |
+
charge, to any person obtaining a copy of this software and associated
|
| 5 |
+
documentation files (the "Software"), to deal in the Software without
|
| 6 |
+
restriction, including without limitation the rights to use, copy, modify, merge,
|
| 7 |
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
| 8 |
+
permit persons to whom the Software is furnished to do so, subject to the
|
| 9 |
+
following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice
|
| 12 |
+
(including the next paragraph) shall be included in all copies or substantial
|
| 13 |
+
portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
| 16 |
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 17 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
| 18 |
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
| 19 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 20 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 21 |
+
THE SOFTWARE.
|
README.md
CHANGED
|
@@ -1,16 +1,394 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
and 428 test. Choose CSV or JSONL; they contain the same examples.
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
- `metadata` / `metadata_json`: provenance and replay information for audit.
|
| 9 |
-
These contain solver controls and should not be appended to model inputs.
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
Labels are generated by a literature-conditioned simulation. There are 2,000
|
| 15 |
-
controls, 1,500 procedural-fault examples, and 500 replays of one saved Ollama
|
| 16 |
-
scenario. These are not 4,000 independent LLM generations or field observations.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: Phase 1 Cold-Chain Warehouse Dispatch
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
size_categories:
|
| 6 |
+
- 1K<n<10K
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-generation
|
| 9 |
+
annotations_creators:
|
| 10 |
+
- machine-generated
|
| 11 |
+
language_creators:
|
| 12 |
+
- machine-generated
|
| 13 |
+
source_datasets:
|
| 14 |
+
- extended
|
| 15 |
+
tags:
|
| 16 |
+
- synthetic
|
| 17 |
+
- text
|
| 18 |
+
- tabular
|
| 19 |
+
- cold-chain
|
| 20 |
+
- warehouse-dispatch
|
| 21 |
+
- simulation
|
| 22 |
+
- optimization
|
| 23 |
+
- instruction-tuning
|
| 24 |
+
configs:
|
| 25 |
+
- config_name: default
|
| 26 |
+
data_files:
|
| 27 |
+
- split: train
|
| 28 |
+
path: train.jsonl
|
| 29 |
+
- split: validation
|
| 30 |
+
path: validation.jsonl
|
| 31 |
+
- split: test
|
| 32 |
+
path: test.jsonl
|
| 33 |
+
---
|
| 34 |
|
| 35 |
+
# Phase 1 Cold-Chain Warehouse Dispatch
|
|
|
|
| 36 |
|
| 37 |
+
This export contains **4,000 simulation-labeled examples**, built from
|
| 38 |
+
**1,000 source picking-wave cohorts × four scenario variants**.
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
| Split | Examples | JSONL | CSV |
|
| 41 |
+
| --- | ---: | --- | --- |
|
| 42 |
+
| Train | 3,192 | [train.jsonl](train.jsonl) | [train.csv](train.csv) |
|
| 43 |
+
| Validation | 380 | [validation.jsonl](validation.jsonl) | [validation.csv](validation.csv) |
|
| 44 |
+
| Test | 428 | [test.jsonl](test.jsonl) | [test.csv](test.csv) |
|
| 45 |
+
|
| 46 |
+
CSV and JSONL were exported as alternative representations of the same examples,
|
| 47 |
+
not separate datasets. [manifest.json](manifest.json) records the original file
|
| 48 |
+
checksums, counts, run fingerprint, and validation summary. A locally edited file
|
| 49 |
+
may no longer match that manifest; compare its checksum before using it as the
|
| 50 |
+
original export.
|
| 51 |
+
|
| 52 |
+
## Dataset description
|
| 53 |
+
|
| 54 |
+
This English instruction/response dataset pairs warehouse states with structured
|
| 55 |
+
JSON dispatch plans. It combines real footwear picking workloads with synthetic
|
| 56 |
+
produce inventory, literature-conditioned shelf-life models and simulated
|
| 57 |
+
thermal disruptions. The reference answers are generated by exhaustive search
|
| 58 |
+
with a deterministic simulator. This release uses schema `stage1-v1`.
|
| 59 |
+
|
| 60 |
+
Full Code: https://github.com/MeRichard123/Dynamic_FEFO_Cold-Zone_Dispatch
|
| 61 |
+
|
| 62 |
+
### Intended uses
|
| 63 |
+
|
| 64 |
+
- Supervised fine-tuning for warehouse-state-to-JSON dispatch generation.
|
| 65 |
+
- Zero-shot and few-shot research on constrained picking and temperature decisions.
|
| 66 |
+
- Evaluation against reproducible simulation actions and outcomes, with source
|
| 67 |
+
workload cohorts kept separate across training and evaluation.
|
| 68 |
+
|
| 69 |
+
Direct deployment for refrigeration control, food-safety clearance or claims of
|
| 70 |
+
measured waste reduction is outside the dataset's validated scope. There are no
|
| 71 |
+
reported trained-model results or leaderboard scores for this release.
|
| 72 |
+
|
| 73 |
+
### Dataset structure and fields
|
| 74 |
+
|
| 75 |
+
Each JSONL line is one object:
|
| 76 |
+
|
| 77 |
+
| Field | Type | Meaning |
|
| 78 |
+
| --- | --- | --- |
|
| 79 |
+
| `id` | string | SHA-256 fingerprint of the input prompt and schema |
|
| 80 |
+
| `schema_version` | string | `stage1-v1` |
|
| 81 |
+
| `messages` | list of role/content objects | System instructions, user warehouse task, assistant reference JSON |
|
| 82 |
+
| `metadata` | object | Source lineage, solver status, baseline metrics and replay configurations |
|
| 83 |
+
|
| 84 |
+
The user message contains prose followed by separate JSON blocks for warehouse
|
| 85 |
+
state, decision domain and objective weights. The assistant's `content` is a
|
| 86 |
+
JSON-encoded string, not an already parsed object. Parse it with `json.loads`.
|
| 87 |
+
Its keys are `dispatch_plan`, `optimization_status`, `kg_food_saved`,
|
| 88 |
+
`food_saved_baseline` and `metrics`. `dispatch_plan` contains `put_away`,
|
| 89 |
+
`pick_priorities`, `chiller_adjustments`, `alerts` and `execution`.
|
| 90 |
+
|
| 91 |
+
CSV columns are `id`, `schema_version`, `system`, `input`, `output`, `variant`,
|
| 92 |
+
`kg_food_saved`, `optimization_status` and `metadata_json`. The last column is
|
| 93 |
+
JSON-encoded audit metadata. Numerical units are Celsius, minutes, kg, kWh,
|
| 94 |
+
kg CO2 and reference-temperature remaining-life hours as specified in the prompt.
|
| 95 |
+
|
| 96 |
+
### Loading a local example
|
| 97 |
+
|
| 98 |
+
This dependency-free example loads the original JSONL without inferring a nested
|
| 99 |
+
Arrow schema for the heterogeneous replay metadata:
|
| 100 |
+
|
| 101 |
+
```python
|
| 102 |
+
import json
|
| 103 |
+
from pathlib import Path
|
| 104 |
+
|
| 105 |
+
with Path("dataset/train.jsonl").open(encoding="utf-8") as stream:
|
| 106 |
+
example = json.loads(next(stream))
|
| 107 |
+
|
| 108 |
+
prompt = [m for m in example["messages"] if m["role"] != "assistant"]
|
| 109 |
+
ground_truth = json.loads(next(
|
| 110 |
+
m["content"] for m in example["messages"] if m["role"] == "assistant"
|
| 111 |
+
))
|
| 112 |
+
print(json.dumps(ground_truth, indent=2))
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
When running from the dataset directory itself, use `train.jsonl` instead of
|
| 116 |
+
`dataset/train.jsonl`.
|
| 117 |
+
|
| 118 |
+
## Sources used in this export
|
| 119 |
+
|
| 120 |
+
### Warehouse layout and picking workloads
|
| 121 |
+
|
| 122 |
+
Rodrigo Furlan de Assis (2024), *Order Picking Dataset from a Warehouse of a
|
| 123 |
+
Footwear Manufacturing Company*, Mendeley Data, version 1,
|
| 124 |
+
[DOI: 10.17632/pf2w725pw3.1](https://doi.org/10.17632/pf2w725pw3.1).
|
| 125 |
+
The accompanying article is de Assis, de Paula Ferreira and Ouhimmou (2025),
|
| 126 |
+
*Data in Brief* 61, 111837,
|
| 127 |
+
[DOI: 10.1016/j.dib.2025.111837](https://doi.org/10.1016/j.dib.2025.111837).
|
| 128 |
+
|
| 129 |
+
The local input is
|
| 130 |
+
`Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip`
|
| 131 |
+
in the repository root. The pipeline reads `Storage_Location.csv` for coordinates,
|
| 132 |
+
`Picking_Wave.csv` for picks, and `Customer_Order.csv` for wave dates. The archive
|
| 133 |
+
contains 2,292 storage slots, 215,192 picking rows and 9,707 waves. Of those waves,
|
| 134 |
+
9,143 contain storage-location picks and 564 are ineligible for this build.
|
| 135 |
+
|
| 136 |
+
These are footwear operations. Produce identities, mass conversion, stock ages,
|
| 137 |
+
thermal zones and food-quality behavior were added by this project; the source
|
| 138 |
+
contains no measured produce spoilage outcomes.
|
| 139 |
+
|
| 140 |
+
### Fruit shelf-life parameters
|
| 141 |
+
|
| 142 |
+
Zou et al. (2025),
|
| 143 |
+
[DOI: 10.1016/j.jfoodeng.2025.112577](https://doi.org/10.1016/j.jfoodeng.2025.112577),
|
| 144 |
+
with the supplied supplement `1-s2.0-S0260877425001128-mmc1.docx`.
|
| 145 |
+
|
| 146 |
+
| Product | Evidence used | Simulation model |
|
| 147 |
+
| --- | --- | --- |
|
| 148 |
+
| 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) |
|
| 149 |
+
| 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) |
|
| 150 |
+
| 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 |
|
| 151 |
+
|
| 152 |
+
A normalized remaining-quality budget starts at 1 and expires at 0. For apple
|
| 153 |
+
and strawberry endpoints, rate is `1 / shelf_life_hours`; interpolation is in
|
| 154 |
+
rate, not lifetime. Remaining life is expressed in reference-temperature hours
|
| 155 |
+
at 4 °C. Full reference lifetimes are approximately 4,354.38 hours for apples,
|
| 156 |
+
1,344 hours for oranges and 432 hours for strawberries. Curve extrapolation is
|
| 157 |
+
rejected. The supplement's printed k0 values were not used because their units
|
| 158 |
+
and normalization do not consistently reconcile with its reported lifetimes.
|
| 159 |
+
|
| 160 |
+
See [parameter derivation and assumptions](../docs/paper-parameters.md) and
|
| 161 |
+
[the supplement importer](../warehouse_sim/literature.py). These parameters
|
| 162 |
+
condition the simulator; they do not validate individual warehouse batches.
|
| 163 |
+
|
| 164 |
+
### Electricity carbon intensity
|
| 165 |
+
|
| 166 |
+
The [official GB Carbon Intensity API](https://carbon-intensity.github.io/api-definitions/)
|
| 167 |
+
supplied the cached response for
|
| 168 |
+
[5 January 2023](https://api.carbonintensity.org.uk/intensity/date/2023-01-05).
|
| 169 |
+
The preserved input is [data/grid-2023-01-05.json](../data/grid-2023-01-05.json).
|
| 170 |
+
It stores the raw response and the simulation's time-indexed intensity intervals
|
| 171 |
+
in kg CO2/kWh, beginning at `2023-01-05T07:42:00+00:00`.
|
| 172 |
+
|
| 173 |
+
All workloads reuse this cached interval. Their original source dates are not
|
| 174 |
+
matched to separate historical grid days. Although interval values are marked
|
| 175 |
+
`actual`, the benchmark explicitly makes the entire grid schedule available as
|
| 176 |
+
known scenario context; this is not a causal evaluation using only forecasts
|
| 177 |
+
available at each operational instant.
|
| 178 |
+
|
| 179 |
+
### Recorded model-generated disruption
|
| 180 |
+
|
| 181 |
+
[data/generated-42.json](../data/generated-42.json) preserves **one** Ollama
|
| 182 |
+
`qwen2.5:7b` response, quantized as `Q4_K_M`, generated with seed 42. It includes
|
| 183 |
+
the request, response and parsed event. The structured event is a cooling
|
| 184 |
+
failure in the `cool` zone, starting at minute 60, lasting 30 minutes, with
|
| 185 |
+
available cooling fraction `0.7`.
|
| 186 |
+
|
| 187 |
+
The simulator uses that structured event. The generated prose's assertion of a
|
| 188 |
+
3 °C rise is not an imposed physical observation or temperature trajectory.
|
| 189 |
+
This one response is replayed across 500 workloads; it is not 500 independent
|
| 190 |
+
model generations. All other faults are explicitly procedural.
|
| 191 |
+
|
| 192 |
+
### Earlier experiments excluded from the final label source
|
| 193 |
+
|
| 194 |
+
The downloaded [Datcolabssnet Cold Chain Logistics dataset](https://www.kaggle.com/datasets/datcolabssnet/cold-chain-logistics-dataset),
|
| 195 |
+
local `Cold_Chain_Logistics_Dataset.csv`, was inspected for an earlier aggregate
|
| 196 |
+
estimated-freshness calibration experiment. Its 7,000 rows do **not** supply the
|
| 197 |
+
final apple/orange/strawberry kinetic profile or dispatch ground truths.
|
| 198 |
+
|
| 199 |
+
The fruit-image Kaggle dataset and Mendeley `czz68d9fwj` discussed in
|
| 200 |
+
[the source assessment](../docs/data-sources.md) were candidate inputs, not data
|
| 201 |
+
imported into these 4,000 examples.
|
| 202 |
+
|
| 203 |
+
## Creation process
|
| 204 |
+
|
| 205 |
+
The implementation is in [batch.py](../warehouse_sim/batch.py),
|
| 206 |
+
[pmc.py](../warehouse_sim/pmc.py), [scenarios.py](../warehouse_sim/scenarios.py),
|
| 207 |
+
[engine.py](../warehouse_sim/engine.py),
|
| 208 |
+
[optimizer.py](../warehouse_sim/optimizer.py) and
|
| 209 |
+
[dataset.py](../warehouse_sim/dataset.py).
|
| 210 |
+
|
| 211 |
+
1. **Load the preserved simulation template.**
|
| 212 |
+
[examples/paper-template.json](../examples/paper-template.json) sets seed 42,
|
| 213 |
+
a 480-minute horizon, one-minute ticks, ambient temperature 22 °C, one picker,
|
| 214 |
+
walking speed 1.2 m/s, two-minute picks, coordinate scale 1 metre per unit,
|
| 215 |
+
and dispatch coordinates `[66, -29]`. Thermal capacities, conductances,
|
| 216 |
+
cooling capacities and COP values are explicit scenario parameters stored
|
| 217 |
+
in that template, not measurements fitted from the footwear dataset.
|
| 218 |
+
|
| 219 |
+
2. **Index and select workloads.** Read the archive, group picks by source wave,
|
| 220 |
+
and select the first 1,000 eligible waves, with one wave per cohort and
|
| 221 |
+
eligible-wave offset 0. Source wave IDs, original archive hash and exclusion
|
| 222 |
+
counts are retained. Navigation-only waves are skipped rather than converted
|
| 223 |
+
into invented inventory.
|
| 224 |
+
|
| 225 |
+
3. **Convert footwear workloads into synthetic produce cases.** Map aisles A–F
|
| 226 |
+
to chilled/apples (532 slots), G–L to cool/oranges (852), and M–R to
|
| 227 |
+
temperate/strawberries (908). Within each zone, retain at most the first two
|
| 228 |
+
lexicographically sorted storage slots touched by the selected wave. Record
|
| 229 |
+
picks excluded for nonstorage locations or for being outside that decision
|
| 230 |
+
window. Convert each source unit into **one synthetic kg**. Aggregate demand
|
| 231 |
+
by wave and mapped SKU, and create one initial pallet per retained slot with
|
| 232 |
+
its corresponding aggregate quantity. Pallet IDs are `PMC-<source slot>`;
|
| 233 |
+
original product references are retained for lineage. Wave times are relative
|
| 234 |
+
to the cohort's earliest date with time scale 1.0. The batch increments the
|
| 235 |
+
template seed by the zero-based cohort index.
|
| 236 |
+
|
| 237 |
+
4. **Assign synthetic initial remaining life.** Ordinary cases draw uniformly
|
| 238 |
+
from 50–100% of each product's full reference lifetime. The near-expiry
|
| 239 |
+
variant redraws ages uniformly from 0.01–0.8%. These are synthetic ages,
|
| 240 |
+
not receiving dates or measured source quality. FIFO uses assumed arrival
|
| 241 |
+
time (default 0) and pallet ID to break ties.
|
| 242 |
+
|
| 243 |
+
5. **Attach the cached grid and create four variants per cohort.**
|
| 244 |
+
|
| 245 |
+
| Variant | Count | Construction |
|
| 246 |
+
| --- | ---: | --- |
|
| 247 |
+
| `normal` | 1,000 | Ordinary stock; no fault |
|
| 248 |
+
| `near_expiry` | 1,000 | Same workload; synthetic aged stock; no fault |
|
| 249 |
+
| `sensor_drift` | 1,000 | Ordinary stock; seeded negative sensor bias |
|
| 250 |
+
| `disruption` | 1,000 | Even cohort indices replay the saved Ollama event; odd indices alternate procedural cooling failure and stuck door |
|
| 251 |
+
|
| 252 |
+
Procedural random seed is `config.seed * 1009 + cohort_index`, plus 1 for
|
| 253 |
+
sensor drift or 2 for the disruption variant. A random zone is selected;
|
| 254 |
+
start time is uniform from 0 to `min(30, 0.2 * horizon)` minutes, and duration
|
| 255 |
+
is uniform from 30 to 90 minutes, capped by the remaining horizon. Parameters
|
| 256 |
+
are rounded to three decimals. Sensor bias is uniform from −2 to −0.4 °C;
|
| 257 |
+
cooling availability is uniform from 0 to 0.15; a stuck door has value 1.
|
| 258 |
+
Events must satisfy the disruption schema and horizon constraints.
|
| 259 |
+
|
| 260 |
+
Totals are **2,000 controls, 1,500 procedural-fault cases and 500 recorded-model
|
| 261 |
+
replays**. Fault kinds total 1,000 sensor-bias, 750 cooling-failure and 250
|
| 262 |
+
stuck-door cases.
|
| 263 |
+
|
| 264 |
+
6. **Generate the ground truth using exhaustive simulation search.** Enumerate
|
| 265 |
+
pallet permutations within each SKU and all allowed static zone setpoints:
|
| 266 |
+
chilled `[0, 1]`, cool `[2, 3]`, temperate `[4, 5]` °C. Put-away is fixed by
|
| 267 |
+
the existing greedy rule, wave arrival order is fixed, and idling/relocation
|
| 268 |
+
are excluded. The default per-case exact-search budget is 2,000 candidates;
|
| 269 |
+
this build used 105,696 candidate evaluations in total. Minimize:
|
| 270 |
+
|
| 271 |
+
```text
|
| 272 |
+
expired_kg
|
| 273 |
+
+ 2.0 * unfilled_kg
|
| 274 |
+
+ 0.1 * compressor_kwh
|
| 275 |
+
+ 0.1 * grid_kg_co2
|
| 276 |
+
- 0.001 * dispatched_life_kg_hours
|
| 277 |
+
```
|
| 278 |
+
|
| 279 |
+
Simulate the chosen plan and matched FIFO/FEFO baselines. The exported
|
| 280 |
+
food-saving target is `FIFO expired_kg - chosen_plan expired_kg` under the
|
| 281 |
+
same initial stock, demand, disruptions and horizon. All 4,000 exported
|
| 282 |
+
records are labeled `optimal_in_declared_domain`; this means exact within
|
| 283 |
+
this finite domain, not globally optimal warehouse control.
|
| 284 |
+
|
| 285 |
+
7. **Construct prompt/answer pairs.** The system message defines a cold-chain
|
| 286 |
+
coordinator. The user message contains the state, known disruption/grid
|
| 287 |
+
schedules, decision domain and objective weights. The assistant target
|
| 288 |
+
contains put-away assignments, pallet priorities, chiller adjustments,
|
| 289 |
+
alerts, execution events, optimization status, food saved and metrics.
|
| 290 |
+
Labels come from the solver/simulator, not from the scenario-generating LLM.
|
| 291 |
+
Metadata stores provenance, configurations and baseline results for replay.
|
| 292 |
+
|
| 293 |
+
8. **Split by source cohort, then export.** `base_case_id` fingerprints the source
|
| 294 |
+
archive hash and sorted selected wave IDs. Calculate
|
| 295 |
+
`int(sha256(base_case_id.encode()).hexdigest()[:8], 16) % 100`:
|
| 296 |
+
buckets 0–79 are train, 80–89 validation, and 90–99 test. All four variants
|
| 297 |
+
stay together. This produces 3,192/380/428 examples rather than enforcing
|
| 298 |
+
exact row-level 80/10/10 quotas. Each split is provided as JSONL and CSV.
|
| 299 |
+
|
| 300 |
+
9. **Verify the export.** The recorded build replay-verified all 4,000 JSONL
|
| 301 |
+
records: checksums, layout identity, actions, execution events, metrics,
|
| 302 |
+
matched-FIFO food savings and source-cohort split isolation. Its manifest
|
| 303 |
+
records 49 passing tests. These are historical build results; they do not
|
| 304 |
+
certify later local edits. Checkpoints and historical run logs were removed
|
| 305 |
+
after the final export; the input files and per-example replay metadata remain.
|
| 306 |
+
|
| 307 |
+
## Regenerate or verify
|
| 308 |
+
|
| 309 |
+
Run from the repository root with a Python environment that can run this project:
|
| 310 |
+
|
| 311 |
+
```bash
|
| 312 |
+
python3 -m warehouse_sim.stage1 batch-build \
|
| 313 |
+
--dataset 'Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip' \
|
| 314 |
+
--template examples/paper-template.json \
|
| 315 |
+
--scenario data/generated-42.json \
|
| 316 |
+
--grid data/grid-2023-01-05.json \
|
| 317 |
+
--variant-suite standard --cases 1000 --resume \
|
| 318 |
+
--output runs/phase1-regenerated
|
| 319 |
+
```
|
| 320 |
+
|
| 321 |
+
This uses the preserved scenario without calling Ollama or downloading weights.
|
| 322 |
+
Add `--dry-run` for a preflight. Use a fresh output directory for a new run;
|
| 323 |
+
`--resume` applies to checkpoints created there, not the deleted original run.
|
| 324 |
+
The command rebuilds the simulation pairs; the final CSV packaging is separate
|
| 325 |
+
from the JSONL batch exporter.
|
| 326 |
+
|
| 327 |
+
```bash
|
| 328 |
+
python3 -m warehouse_sim.stage1 verify \
|
| 329 |
+
--dataset 'Order Picking Dataset from a Warehouse of a Footwear Manufacturing Company.zip' \
|
| 330 |
+
--export dataset
|
| 331 |
+
```
|
| 332 |
+
|
| 333 |
+
The replay verifier checks JSONL. CSV checksums must be compared separately
|
| 334 |
+
against `manifest.json`.
|
| 335 |
+
|
| 336 |
+
### Preserved input SHA-256 values
|
| 337 |
+
|
| 338 |
+
| Input | SHA-256 |
|
| 339 |
+
| --- | --- |
|
| 340 |
+
| Footwear source ZIP | `0de6901d639cae782e661ee63d479360b6942b31072e53d07bbde8313cbe9880` |
|
| 341 |
+
| Zou supplement DOCX | `fd56de4d5ea43d55aabe331461e1d33d7b7864db8052e273919253b56387a43a` |
|
| 342 |
+
| `examples/paper-template.json` | `b8b432185772aeebeae4b575f568e8655baf2ceaf0a6b6a436c61375f7cdc8cd` |
|
| 343 |
+
| `data/generated-42.json` | `6539033bf12ab82c541a656fa714229cff7bb38cc18f301f3621a86c48358216` |
|
| 344 |
+
| `data/grid-2023-01-05.json` | `e2c6a0e3311f8b57779b28666c68fb425ac9e34e7d07aa30f6cc70c17f5d047f` |
|
| 345 |
+
|
| 346 |
+
## Using the records and interpreting ground truth
|
| 347 |
+
|
| 348 |
+
For JSONL training, use `messages`; for CSV use `system`, `input` and `output`.
|
| 349 |
+
`metadata` / `metadata_json` contain solver controls and replay information and
|
| 350 |
+
must not be appended to model inputs. For evaluation, hold back the assistant
|
| 351 |
+
answer and compare it with the model's response. [EDA.py](../EDA.py) prints a
|
| 352 |
+
small zero-shot pick-order exercise and its reference answer separately.
|
| 353 |
+
|
| 354 |
+
The full benchmark evaluates a model-conditioned planning task. It does not
|
| 355 |
+
establish microbiological safety, measured food savings, or independent
|
| 356 |
+
validation on real cold-chain batches. Only 192 examples have positive simulated
|
| 357 |
+
food savings; the other 3,808 have zero. Replaying one model scenario and creating
|
| 358 |
+
four variants per workload does not create 4,000 independent operational samples.
|
| 359 |
+
See [the expansion report](../docs/scale-to-4000.md) and
|
| 360 |
+
[simulation methods](../docs/simulation-methods.md) for further detail.
|
| 361 |
+
|
| 362 |
+
## Bias, risks and limitations
|
| 363 |
+
|
| 364 |
+
The source workload represents one footwear warehouse, while the cold-chain
|
| 365 |
+
behavior is synthetic. Results may not transfer to other layouts, product
|
| 366 |
+
cultivars, equipment, operators or demand distributions. Only three produce
|
| 367 |
+
profiles and four standard variants are represented; the decision space is
|
| 368 |
+
small and static. Parameters and objective weights encode project choices.
|
| 369 |
+
|
| 370 |
+
The 1,000 cohorts share the facility, grid day, parameter template and one
|
| 371 |
+
recorded model scenario. Cohort isolation prevents wave variants leaking across
|
| 372 |
+
splits, but does not test generalization to a new facility or unseen physical
|
| 373 |
+
model. Positive savings occur in 192/4,000 examples (4.8%); a model predicting
|
| 374 |
+
zero everywhere would match that scalar target on 95.2% of examples. Evaluate
|
| 375 |
+
plan feasibility, action quality and simulator outcomes as well as scalar error.
|
| 376 |
+
|
| 377 |
+
Full future disruption schedules and cached grid intensities are disclosed in
|
| 378 |
+
the inputs. This can overstate performance relative to an operational setting
|
| 379 |
+
with uncertain forecasts. Reference labels are optimal only in the declared
|
| 380 |
+
finite search domain. Human review of every generated example is not documented.
|
| 381 |
+
|
| 382 |
+
## Personal and sensitive information
|
| 383 |
+
|
| 384 |
+
Prompts retain warehouse slot IDs; audit metadata retains source wave IDs,
|
| 385 |
+
product references, timestamps and file hashes for lineage. The conversion does
|
| 386 |
+
not intentionally add names or contact details, but this project has not
|
| 387 |
+
performed a comprehensive privacy or re-identification audit of the original
|
| 388 |
+
archive or generated export. Source operational identifiers should be treated
|
| 389 |
+
as provenance rather than evidence of produce observations.
|
| 390 |
+
|
| 391 |
+
## Licensing and distribution
|
| 392 |
+
|
| 393 |
+
MIT License see LICENSE
|
| 394 |
|
|
|
|
|
|
|
|
|
test.csv
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d45b82244757ee88742daca5065ee4d8653fb163aa1e3d9fe3f23e4aa6562a8c
|
| 3 |
+
size 22776249
|