Files
production-analytics/docs/bento1-fresh-bentonite.md
T

61 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Bento 1 fresh bentonite consumption
`config/bento1-material-consumption.yaml` defines
`bento1-fresh-bentonite-consumption`. This KPI estimates **fresh bentonite
consumption** from the two fresh-spreader setpoints in g/m². The third spreader
uses recycled/recovered bentonite and is deliberately excluded; it is neither
missing data nor estimated. This is not total bentonite deposited on the product,
and setpoints are not a measurement of actual mass flow.
The generic `area_application` source sums the configured application signals
and converts them to kg/h using `sum(g/m²) × nominal_width_m × speed_m/min × 60 / 1000`.
The existing previous-value integrator then accumulates kilograms only while
speed is strictly greater than 0.3 m/min. `direct_mass_rate` remains the default
for existing configurations, including K7. The persistent state schema and
production-order bootstrap/resume behavior are unchanged; each disjoint run
starts with a new sample baseline while retaining order totals.
Width comes from the existing ERP workplace status adapter and generic nominal
width parser. The ERP order must format to the ENLYZE order using
`Bento 1-{production_order}`. Missing/mismatched ERP context or an unparseable
width rejects the polling cycle without saving state. ENLYZE product metadata is
not used for width. The current ERP context supplies width for all runs of that
same order; this assumes the order's article width stays constant. Historical
orders no longer present in current ERP workplace status require a separate
historical context source for offline replay.
Run with:
```sh
production-analytics run material-poll \
--config config/bento1-material-consumption.yaml \
--erp-secrets-file secrets/erp.env
```
`erp_workplace: Bento 1` assumes that exact ERP workplace identifier; verify it
against the deployment's workplace view. The 20-second maximum sample gap is a
generic policy shared with K7, intended for a nominal 10-second sampling cadence.
One missing sample is tolerated: the resulting 20-second interval is integrated
using the preceding rate and gate. Gaps greater than 20 seconds are not
integrated, so prolonged or repeated gaps can undercount consumption.
Missing/nonfinite values from either configured fresh spreader reject the cycle.
Intervals exceeding the maximum gap and unobserved run tails are not inferred.
Before implementation, the calculation was independently validated manually
against the same three real ENLYZE signals over the two runs below, yielding
approximately **147021.9 kg** of fresh bentonite for `Bento 1-12026000814`.
The post-implementation live replay could not be repeated because ENLYZE
connectivity was temporarily unavailable (DNS resolution failure), not because
of a known implementation issue. Exact production-path replay remains a
follow-up verification rather than a blocker for this milestone.
The regression uses article 180305, description `Bfix NSP 5300, 5,00 x 40 m`
(width 5.00 m), and the supplied boundaries of runs
`b675818c-4636-4976-be6c-3e0e24da9e8a` and
`25d67424-8346-42d4-b844-75b4097382bd` for order `Bento 1-12026000814`.
It constructs synthetic samples from the supplied aggregates: 1256.0 active
minutes, 31294.6 m² and 4698.0 g/m², yielding approximately 147021.9 kg.
It verifies bootstrap across both runs and persisted resume without counting the
inter-run gap. It is an aggregate plausibility regression, not an independent
replay of recorded signals; raw reference samples were not supplied.