Dangerous Goods Management System decomposed into six IMDG-driven components
System
Container Ship Cargo Management System — third subsystem decomposition session. Prior sessions decomposed {{entity:Stowage Planning Engine}} (7 components) and {{entity:Stability and Stress Monitoring System}} (6 components). This session decomposes {{entity:Dangerous Goods Management System}} {{hex:40B77B59}}, the safety-critical subsystem responsible for IMDG Code compliance, segregation enforcement, and hazardous cargo documentation. Four of eight subsystems now have internal component structures.
Decomposition
The {{entity:Dangerous Goods Management System}} was decomposed into six components reflecting the actual functional partitioning of DG management on container vessels:
- {{entity:IMDG Code Database}} {{hex:40853958}} — authoritative reference containing >3,500 UN number entries, hazard classes, stowage categories, segregation groups (SGG1–SGG18), and EmS references. Central hub queried by four other components.
- {{entity:DG Declaration Validator}} {{hex:40A53B58}} — processes incoming Dangerous Goods Declarations (IMO FAL Form 7), validates mandatory fields, cross-references against the IMDG database to detect misclassifications. Handles up to 500 declarations per port call.
- {{entity:Segregation Rules Engine}} {{hex:40A73958}} — implements IMDG Code Table 7.2.4 segregation matrix, calculates physical separation distances in three dimensions using vessel geometry. Handles all 18 segregation groups that override class-level rules.
- {{entity:DG Stowage Position Validator}} {{hex:40A73959}} — validates proposed positions against IMDG stowage categories (A–E) and special provisions, checking on-deck/under-deck restrictions, accommodation distance, and heat source proximity.
- {{entity:Emergency Response Information System}} {{hex:40ED7B58}} — maintains EmS fire/spillage schedules and MFAG treatment data. Architecturally independent with backup display for availability during main system degradation — a SOLAS safety requirement.
- {{entity:DG Manifest Generator}} {{hex:40F57B58}} — produces the SOLAS VII/4 dangerous goods manifest and stowage plan. Consumes only validated data from the Declaration Validator and confirmed positions from the Stowage Position Validator.
The key architectural decision ({{sys:ARC-DECISIONS-005}}) separates segregation from stowage validation because they operate on different IMDG Code chapters (7.2 vs 7.1) and use different evaluation geometries: segregation is pairwise in 3D hold space, while stowage validates individual positions against categorical rules.
flowchart TB
IMDG["IMDG Code Database"]
DGV["DG Declaration Validator"]
SRE["Segregation Rules Engine"]
SPV["DG Stowage Position Validator"]
ERIS["Emergency Response Info System"]
MAN["DG Manifest Generator"]
DGV -->|validate against| IMDG
SRE -->|segregation rules| IMDG
SPV -->|stowage categories| IMDG
SPV -->|separation check| SRE
ERIS -->|EmS/MFAG lookup| IMDG
MAN -->|validated DG data| DGV
MAN -->|stowage positions| SPV
Analysis
Cross-domain similarity search on {{entity:Segregation Rules Engine}} found 31 shared traits (96.9% Jaccard) with {{entity:Report Template Engine}} from the transport appraisal domain and 30 shared traits with {{entity:LSC Spectrum Analysis and MDA Calculation Software}} from the radiochemistry domain. All three are rule-governed processing engines that evaluate inputs against structured reference data — the segregation engine against IMDG tables, the spectrum analyser against isotope libraries. This structural similarity suggests the segregation engine could benefit from the same test coverage patterns used for spectrum analysis: exhaustive matrix boundary testing and known-answer validation.
Lint reported 5 findings (1 high, 3 medium, 1 low). The high finding (physical embodiment missing for the top-level system) and the medium finding about {{sub:SUB-SSMS-009}} degraded mode criteria are pre-existing from prior sessions. Two duplicate requirements ({{sub:SUB-REQS-020}} duplicates {{sub:SUB-REQS-021}}, {{sys:ARC-DECISIONS-004}} duplicates {{sys:ARC-DECISIONS-005}}) were introduced by CLI retry errors in this session and are flagged for QC deletion.
Requirements
Eight subsystem requirements created ({{sub:SUB-REQS-021}} through {{sub:SUB-REQS-028}}), covering IMDG database completeness, declaration validation performance (2s per declaration), segregation matrix coverage, spatial separation calculation, stowage position validation, emergency response availability during degradation (5s lookup via independent backup), manifest compliance (SOLAS VII/4, 5-minute regeneration), and IMDG amendment update ingestion (48-hour window with dual-edition support).
Five interface requirements ({{ifc:IFC-DEFS-011}} through {{ifc:IFC-DEFS-015}}) define internal component interfaces with quantified performance: 10ms per IMDG lookup, 50ms batch segregation profile queries, 500ms segregation compliance evaluation, 60-second data freshness for manifest generation, and 2-second constraint set export to the Stowage Planning Engine.
Five verification entries ({{sub:VER-METHODS-017}} through {{sub:VER-METHODS-021}}) provide integration test specifications for each interface requirement. All interface requirements have verifies trace links; all subsystem requirements trace to {{sys:SYS-REQS-003}} or {{stk:STK-NEEDS-003}}.
Next
Four subsystems remain undecomposed: {{entity:Reefer Container Management System}}, {{entity:Lashing and Securing Calculator}}, {{entity:Container Tracking and Inventory System}}, and {{entity:Terminal Interface and EDI Gateway}}. Reefer Management should be next — it has similar safety criticality to DG management (temperature-sensitive cargo, potential spoilage, power monitoring) and interfaces with the Stowage Planning Engine for reefer plug allocation. The two duplicate requirements need cleanup in the next QC pass. The degraded-mode finding on SUB-SSMS-009 from the Stability subsystem also needs quantified thresholds added.