Skip to main content

Analysis codes

An analysis code is the engine's classification of a facility — its answer to "how do I treat this facility?" Each side of a pair gets its own analysis code: one for the PES, one for the ES. The codes are the output of the facility-side analysis (driven by type code, attributes, barricading, relationship, and segment) and the input to the HD-specific explosive libraries that produce the actual required distances.

Learning objectives

By the end of this lesson you should be able to:

  • Distinguish a facility's analysis code from the per-hazard required distance the engine ultimately returns
  • Recognize the canonical DCMA analysis codes for common facilities
  • Predict the analysis code from a feature's type code, attributes, relationship, and barricade state
  • Explain how the (PES code, ES code) pair drives the HD libraries

What an analysis code is — and is not

An analysis code captures how the engine should treat the facility, not the numerical answer for a given pair:

  • The PES analysis code describes the source of explosives — its construction, segmentation, and barricade state. Examples: AGSU (Above-Ground Storage, Unbarricaded), ECM7FB (7-bar ECM, Front, Barricaded).
  • The ES analysis code describes how the receiving side should be evaluated — typically the Exposure Type and barricade state for that pair. Examples: IBD (treat as inhabited-building distance), ILDU (treat as intraline distance, unbarricaded).

Once both codes are resolved, the engine has a complete picture of the facility-side configuration. The next step — picking the right K-factor, formula, or fixed-distance rule — is then a question for the HD libraries, not for the analysis-code resolution.

Two analysis paths produce two analysis codes

Each pair returns a PES-side and an ES-side analysisPath — see PES/ES analysis paths. Each path resolves to one analysis code:

  • The PES path walks type code → attributes → barricade → segment to produce the PES analysis code
  • The ES path walks type code → relationship → barricade to produce the ES analysis code

Both paths complete before any explosive math runs. The HD libraries only see the resolved codes.

Examples from DCMA

The DCMA criteria define a fixed set of analysis codes per type code. Cycling through a feature's settings reveals the codes available for that type.

AGM (Above-Ground Magazine)

CodeMeaning
AGSUAbove-ground storage, unbarricaded
AGSBAbove-ground storage, barricaded
NQDNo QD required

A barricade swap on an AGM moves the PES analysis code from AGSU to AGSB. A different change — making the facility part of an IDS-essential operation — could produce NQD instead.

ECM7 (7-bar Earth-Covered Magazine)

CodeMeaning
ECM7FU7-bar ECM, front, unbarricaded
ECM7FB7-bar ECM, front, barricaded
ECM7R7-bar ECM, rear
ECM7S7-bar ECM, side
ECMFU / ECMFB / ECMR / ECMSGeneric ECM analogs (used when the bar rating doesn't matter for the path)
NQDNo QD required

ECM analysis codes are segment-aware: the front, rear, and side faces resolve to different codes because the criteria treat them differently. The front also distinguishes barricaded from unbarricaded; the rear and side do not.

IHB / EOL / PTR (representative ES analysis codes)

Type codePossible analysis codes
IHBIBD, ILDB, ILDU, NQD
PTRIBD, PTRD, NQD
EOLAGSU, AGSB, IBD, ILDB, ILDU, NQD (acts as PES or ES)

The relationship code matters here: an IHB on an unrelated pair lands on IBD; the same IHB on a related (or sameline) pair lands on ILDU (or ILDB if a barricade qualifies). The same physical facility produces different ES analysis codes depending on what pair it is participating in.

[TODO: FILL IN — confirm the canonical full analysis-code list per DCMA type code, and any codes specific to less-common facilities (AUX, UTE, UTW, etc.).]

Analysis codes feed the HD libraries

After the PES and ES analysis codes resolve, the engine hands them — together with the explosive weight per hazard division — to the HD-specific libraries. The library's job is to answer "given an AGSU PES carrying X lb of 1.1, sited against an IBD ES, what required distance applies?"

In the QD worked example, the HD 1.1 library opens with:

QD Analysis, NEW: 1000lbs PES:AGSU to ES:IBD

Both codes appear in the first line. Everything that follows — the K-factor, the HFD evaluation, the cross-hazard comparison — is the library reasoning about that specific (AGSU, IBD, 1,000 lb 1.1) input.

Change either analysis code (e.g., barricade the PES so it becomes AGSB, or make the pair sameline so the ES becomes ILDU) and the HD library walks a different criteria flow with potentially different K-factors, formulas, or thresholds.

Predicting an analysis code from inputs

For most type codes, the analysis code is fully determined by:

  1. Type code — sets the family (AGS*, ECM*, IBD/ILD*, etc.)
  2. Segment — for multi-face features, picks the side suffix (F, R, S)
  3. Barricade state — picks the U/B suffix where applicable
  4. Relationship (ES side only) — chooses between IBD-family and ILD-family
  5. Special states (IDS Essential, NQD-eligible facilities) — can short-circuit to NQD

For ECMs, point 2 is the wrinkle that catches new users: the segment under analysis (front vs rear vs side) determines the ES, not just the type code.

Try it

In the calculator with an AGM PES → IHB ES:

  1. Run analysis and note the resolved PES and ES analysis codes (expect AGSU and IBD)
  2. Toggle barricaded on the PES — the PES code should move to AGSB
  3. Change the relationship code to sameline — the ES code should move to ILDU
  4. Add a barricade between PES and ES — the ES code should move to ILDB
  5. Re-run after each change and observe how the per-hazard required distances shift, even though the underlying inputs (NEW, geometry) did not

This is the cleanest demonstration that the (PES code, ES code) pair drives every downstream value.