| Did you know ... | Search Documentation: |
| Pack takeoffmetric -- README.md |
Dependency-free SWI-Prolog pack (standard libraries only) that embeds version 1.2.0 of the US construction estimating constants published by TakeoffMetric as read-only records: bag yields, aggregate and soil densities, swell and compaction ratios, rebar weights, dressed lumber sizes, block counts, shingle coverage, asphalt unit weights and air properties. These are published constants with their sources, not original research: each record gives the value, its unit, an SI conversion, the condition it applies to and the source it was read in.
It is a port of the Go module takeoffmetric-go: same table, same lookups. The tests compare every record, the search results and the source list to vectors written by the Go module.
55 of the 148 records carry no value: their publishers do not allow republication. Those records keep the quantity, its
unit and the link to the source; withheld is true, the dict has no value and no value_si key, and
withheld_hosts lists the domains concerned. Read the value at the URL of the source.
:- use_module(library(takeoffmetric)).
?- by_id('CON-007', C). % fails when the id is unknown
?- search("bank density", Rows).
?- all(All).
?- sources(Sources).
Each record is a dict with the keys id, category, material_or_item, quantity, value, value_text, unit,
value_si, unit_si, condition, source (a dict: publisher, title, url, type), date_opened (a term
date(Y, M, D)), used_by_tool_url, engine_file, engine_symbol, notes, withheld and withheld_hosts. Text
values are strings; value and value_si are floats.
The pack is a lookup library and computes nothing. To turn dimensions into quantities, use the calculators on the site, for example the concrete calculator. How they use these values: methodology.
Estimating values only: confirm with your plans, your supplier and your local code before ordering or building.
From the pack root:
swipl -g run_tests -t halt test/test_takeoffmetric.pl
`python sync_data.py copies ../TakeoffMetrics-go/data/constants.csv` (or the file given as first argument) into
`data/`, which prolog/takeoffmetric.pl reads when it is compiled and stores as facts. It accepts only the 1.1.x
header (with values_withheld and withheld_hosts). Then regenerate test/vectors.json from the Go module and run
the tests.
source_publisher, source_title, source_url);values_withheld = true): their publishers do not allow republication.