| Did you know ... | Search Documentation: |
| Pack calculiva_waste_benchmark -- README.md |
SWI-Prolog pack that embeds the 42-row summary table of the Calculiva plank waste study, version 1.0.0, published on Harvard Dataverse as doi:10.7910/DVN/8VL3MW.
The study counts source planks and offcut area with the Calculiva flooring layout engine for 1,369 rectangular rooms, 3 sourced and 3 parametric plank formats, row offsets 1/2 and 1/3 (0 as a reference only), offcut reuse on (kerf 0 and 3 mm) and off (worst case), and compares the result with flat 5, 8, 10 and 15 % waste allowances. Each row gives the minimum, median, mean and maximum waste percentage and, for each allowance, how many rooms the order falls short of, matches or exceeds the counted planks.
The package is a read-only lookup and computes nothing: the layout engine is not included. To lay out a room, use the Calculiva flooring calculator.
?- pack_install(calculiva_waste_benchmark).
?- use_module(library(calculiva_waste_benchmark)).
?- waste_rows(Rows), length(Rows, N). % 42 rows, order of summary.csv
?- waste_lookup('48x7.5in', '1/2', true, 0, Row), % fails when the combination is absent
waste_shortfall_pct(Row, 10, Pct). % % of rooms where a flat 10 % order is short
Allowances other than 5, 8, 10 and 15 raise a domain error.
The embedded table (prolog/calculiva_waste_benchmark_data.pl) and the test vectors (test/vectors.json) are generated by a script from summary.csv of the
published dataset; no value is typed by hand. `swipl -g run_tests -t halt test/test_calculiva_waste_benchmark.pl` compares every row, every allowance and the error cases.