Companion guide

Compare different priced stock scenarios

Use this when you have two complete saved cost plans for the same demand, units and allowances, each against its own different stock or prices. It is separate from the one-original-input comparison. That operation requires the exact same stock and prices and has different refutation semantics.

From the companion's cost folder, with Python 3.11+ and its standard library:

python compare_scenarios.py A-input.json A-report.json B-input.json B-report.json --cost-unit units --a-cuts A-cuts.csv --a-stock A-stock.csv --b-cuts B-cuts.csv --b-stock B-stock.csv --uniform-proof --output new-scenario-record

Both original input/report pairs must independently verify. Optional CSVs must match their own report. The same part codes, lengths, quantities, dimensional unit, kerf, start/end allowances and offcut threshold are required. Explicit codes can preserve demand identity when part rows change order. Each retained layout still keeps its own original row identities.

Declare one common display amount unit: units, EUR, USD, GBP or CHF. The source input contract carries no currency field, so this is a caller assumption, not currency verification. No conversion, actual quote, physical material identity, supplier, purchase or realized saving is assessed. Assume the same material/profile in both numerical models before comparing amounts.

Compare supplied amount first, then raw stock length, then bars. Signed deltas are B minus A. Both scenarios can be independently optimal under their own inputs. A cheaper feasible scenario under different stock/prices does not refute the other optimum. Source flags and independent proofs remain separate. A cost-only proof can leave full raw/bar ties unassessed. A complete objective tie gives no preference, and residual material receives no monetary value.

The new folder contains scenario-comparison.json and a static printable scenario-comparison.html, retaining both complete coordinate/part/stock/amount records and all original input/report/supplied CSV byte hashes. Keep those files. An existing output folder is refused without changing it. The command starts no Actor and generates no new layout; it needs no SDK, scientific library, credentials or network. JSON reads are bounded at 4 MiB and optional CSV reads at 1 MiB; the underlying numeric CSV limit remains 64 KiB.

This separate comparison envelope has kind cost_scenario_comparison, schema 1.0 and comparisonVersion 1.0.0. It is not an Actor REPORT. Unknown versions, bad certificates, mismatched inputs/CSVs, duplicate fields and identical usable priced catalogues are refused. A price change is never forced through the same-original-input tool by changing report tags or rewriting source values.

Seven complete local pairs use the exact staged source, not native runs: