Input File Formats
Reference for the input files adsmd parses. Each section maps to one parser module in tools/adsmd/crates/adsmd-parsers/src/ and names the engine code that reads the same file. The page is prescriptive: it describes what adsmd accepts, which is what the engine reads when a plant project is well-formed. Where adsmd is stricter or looser than the engine, the section says so.
TIP
The interior of procedure step files is described in the engine reference Developer, Internals, File Formats. The per-file pages under Input Files describe each input from the modeller's point of view.
Conventions
- Files are UTF-8. CR/LF line endings are normalized to LF before parsing. An input file that is not valid UTF-8 is not parsed:
adsmdprintscould not read <path>on stderr and raises no diagnostic for it. The RELAP5 deck is the exception (see below). - Tokens are whitespace-separated. The engine's
ifstream >> tokenreads cross line boundaries;adsmddoes the same via a sharedlex.rs. - Counted sections use a
<header> <N>line followed byNrows of fixed column count. Where the engine reads a section positionally without verifying labels,adsmdusually verifies them; the exceptions are noted per file. - Rows beyond a declared count are not read. When nothing else has to follow them,
adsmdskips such rows without a diagnostic (in BV4: the rows afterNumber_of_biased_parameters 0and the second and third curve ofCalculation_Aid.txt). - Anything a parser cannot accept is reported as R0 for that file, and the file is then absent from the manifest.
ZiniADS.txt (project root)
Two-line key=value file pointing at the project root and the input deck.
| Engine source | Scheduler::parseOptions in src/ADSIDAC/Scheduler/Scheduler.cpp (boost::program_options::parse_config_file) |
|---|---|
| Parser | adsmd-parsers::ziniads |
| Rules consuming | R1, R2; R33 fires when the file is absent |
project-dir=/absolute/path/to/plant
input-deck=/absolute/path/to/plant/BV4.iBlank lines, # comment lines and unknown keys are accepted. A line that is none of blank, comment or key=value is a parse error, and so is a missing project-dir or input-deck.
The file is optional for adsmd: a directory with Input/Scheduler/ and Input/System/ is also recognised as a plant project. Without ZiniADS.txt the deck path is unknown, so the RELAP5 deck is not scanned. tests/*/ZiniADS.txt is git-ignored in this repository; the CMake configure step writes one into each build/tests/<name>/ copy.
Input/Scheduler/ZCtrlPar.txt
Header + two labeled scalar values.
| Engine source | Scheduler::parseOptions and Scheduler::readInfoFromFile in src/ADSIDAC/Scheduler/Scheduler.cpp |
|---|---|
| Parser | adsmd-parsers::ctrl_par |
| Rules consuming | R3, R45 |
CtrlPar
Truncation_probability 5E-5
Truncation_time 15.5The engine reads the values positionally and does not verify the label tokens, so a file with the Truncation_time and Truncation_probability lines swapped loads 15.5 as the truncation probability. adsmd verifies the labels and reports the swap as R0. Out-of-range values are checked by R3, and R45 compares Truncation_time with the initiating-event times.
Input/System/Initiating_Event.txt
Header Initiating_Event N + N rows of 8 columns.
| Engine source | InitiatingEventController::readInfoFromFile in src/ADSIDAC/Scheduler/InitiatingEventController.cpp |
|---|---|
| Parser | adsmd-parsers::initiating_event |
| Rules consuming | R31, R45; lookup target of R10 and R22 |
Initiating_Event 2
SG_B_SGTR 1.0 850 X_SGTR_SG_B 999999.0 1.0 1.0 999999.0
Reactor_Trip 1.0 850 X_SCRAM 50.0 50.0 6.0 4.0Columns per row: name, magnitude, time, action_symbol, then four timing/limit parameters whose detailed semantics are owned by the engine. time may be negative (BV4 has rows with -60, -180, -500, …).
adsmd stops after the N rows and does not check what follows. The engine reads two more tokens after the rows, a label and the count of support-system initiating events, and BV4 ends with two obligatory_text lines for that reason. The trailer is described in Initiating_Event.txt.
Input/System/RELAP5_channels.txt
Seven named sections in any order. Each section: <SectionName> N + N rows.
| Engine source | SystemModule::readInfoFromFile in src/ADSIDAC/System/SystemModule.cpp |
|---|---|
| Parser | adsmd-parsers::channels |
| Rules consuming | R5, R6, R29; lookup target of R7 |
| Section header | Symbol prefix | Card width | Row format |
|---|---|---|---|
Control_volume | HV_* | 9 digits | <symbol> <card> |
Control_junction | HJ_* | 9 digits | <symbol> <card> |
Variable_trips | VT_* | 3 to 4 digits | <symbol> <card> |
Logical_trips | LT_* | 3 to 4 digits | <symbol> <card> |
Interactive_controls | IC_* | 3 digits | <symbol> <card> |
Heat_structure | HS_* | varies | <symbol> <card> (BV4 has 0 rows) |
Control_variables | CV_* | 3 digits | <symbol> <card> <units> |
Control_volume 2
HV_204 204040000
HV_216 216010000
Control_junction 1
HJ_527 527000000
Variable_trips 1
VT_0465 465
Logical_trips 1
LT_1151 1151
Interactive_controls 1
IC_801 801
Heat_structure 0
Control_variables 1
CV_002 2 SecondsSections may appear in any order (engine reads section-by-section). Missing sections, duplicate sections, or unknown section names are parse errors.
Input/Indicators/ControlPanel.txt
Nine subsections, in the fixed order shown below.
| Engine source | ControlPanel::readInfoFromFile in src/ADSIDAC/ControlPanel/ControlPanel.cpp |
|---|---|
| Parser | adsmd-parsers::control_panel |
| Rules consuming | R7, R8, R34, R35, R36; lookup target of R9, R11, R22, R23, R25, R28 |
Order in the file: Control_Panel_Parameter, Indicator_Heat_Structure_value, Control_Panel_Component_State, Control_Panel_Support_System_State, Controls_Panel_Fine_Adjust, Control_Panel_Controller, Alarm_for_Parameter_State, Alarm_for_Component_State, Alarm_for_Difference_Between_two_Values.
Subsections with rows
Control_Panel_Parameter: header + preamble + 5-col rows.
Control_Panel_Parameter 141
Number_of_Data_Points_for_Rate_Calculation 10
Time CV_002 Value 20.0 0.0
Loop_A_Tcold HV_216 Liquid_Temperature 20.0 0.0
…Columns: display_name, channel_symbol, display_kind, update_frequency, tolerance. The Number_of_Data_Points_for_Rate_Calculation line is a preamble between the section header and the parameter rows.
Control_Panel_Component_State: 7-col rows.
Control_Panel_Component_State 77
Reactor_Trip LT_1698 Trip_Time 20.0 OFF GREATER_THEN_ON 1.0E-5
…Columns: display_name, channel_symbol, display_kind, update_frequency, trigger_state (ON/OFF), comparison_op, threshold. The display kind is typically Trip_Time for trip-derived component states.
Controls_Panel_Fine_Adjust: 7-col rows.
Controls_Panel_Fine_Adjust 29
X_PZR_Spray_Valve IC_804 1.0 1.0 0.0 -1.0 0.0
X_PZR_PORV IC_805 1.0 0.33 0.0 -1.0 0.075
…Columns: x_symbol, ic_symbol, then five tunable parameters (engine-defined; typically initial value, nominal, lower bound, upper bound, rate limit).
Control_Panel_Controller: 7-col rows, last token is ON/OFF.
Control_Panel_Controller 67
X_MFP_Trip IC_801 1.0 1.0 -1.0 -1.0 ON
X_SCRAM IC_802 1.0 1.0 0.0 -1.0 OFF
…Columns: x_symbol, ic_symbol, four tunable parameters, then the initial_state (ON or OFF).
Alarm_for_Parameter_State: 6-col rows.
Alarm_for_Parameter_State 38
A_SG_A_Lo_Level SG_A_NR_Level 0.5 20.0 LT 0.25
…Columns: alarm_name (A_*), parameter_name (cross-references a Control_Panel_Parameter display name), priority, update_frequency, comparison_op (e.g., LT, GT, LE, GE), threshold.
Alarm_for_Component_State: 5-col rows.
Alarm_for_Component_State 37
A_Reactor_Trip Reactor_Trip 0.5 1.0 ON
…Columns: alarm_name, component_state_name (cross-references a Control_Panel_Component_State display name), priority, update_frequency, expected_state (ON or OFF).
Alarm_for_Difference_Between_two_Values: 6-col rows.
Alarm_for_Difference_Between_two_Values 18
A_SG_A_MF_Flow_Lo SG_A_MS_Flow 0.5 20.0 SG_A_FW_Flow 350.0
…Columns: alarm_name, parameter_a (first ControlPanel parameter), priority, update_frequency, parameter_b (second ControlPanel parameter), threshold (the difference must exceed this).
Control_Panel_Support_System_State: 2-col rows.
Control_Panel_Support_System_State 2
FTANode6 OFF
FTANode0 OFFColumns: display_name, initial_state. BV4 declares a count of 0; the example rows are from tests/BV3.
Subsection that must be empty
Indicator_Heat_Structure_value has to be present at its position with a count of 0. Its row format is not parsed, so a positive count is a parse error.
Indicator_Heat_Structure_value 0A file may end after any complete subsection; the subsections that would follow are then empty in the manifest.
Input/Indicators/SPDS_input.txt
Header (with embedded Time_Lapse keyword) + 7-col rows.
| Engine source | SPDS::readInfoFromFile in src/ADSIDAC/Crew/SPDS.cpp |
|---|---|
| Parser | adsmd-parsers::spds |
| Rules consuming | R9; lookup target of R24 |
SPDS_INPUT 6 Time_Lapse 1.0
SPDS_Min_Sub_Cooling Min_Sub_Cooling 5.0 25.0 75.0 100.0 0.5
SPDS_PZR_Level PZR_Level 0.10 0.40 0.70 0.95 0.5
…Columns per row: spds_name, parameter_name, four thresholds (typically low-low / low / high / high-high), frequency. parameter_name references a display_name in the ControlPanel parameter subsection.
Input/HardwareReliability/SystemReliability.txt
Three subsections, parsed in sequence. Each subsection is <header_str> <count> followed by count rows. The engine does not check the header strings, and neither does adsmd: any token is accepted as a header and only the counts drive the parse. All three headers must be present.
| Engine source | HWReliabilityModule::readInfoFromFile in src/ADSIDAC/HWReliability/HWReliabilityModule.cpp |
|---|---|
| Parser | adsmd-parsers::hw_reliability |
| Rules consuming | R10, R11, R31, R42; lookup target of R22 |
Subsection 1: readSystemReliabilityInfoFromFile
<header_str> N
<display_name> <x_symbol> <fail_α> <fail_β> <rec_α> <rec_β> (×N rows)Columns: display_name, x_symbol, and four Beta-distribution parameters for failure / recovery probabilities.
Subsection 2: readSystemOperationReliabilityInfoFromFile
<header_str> N
<display_name> <x_symbol> <fail_rate> <Δt> <n_intervals> <rec_α> <rec_β> (×N rows)Columns: display_name, x_symbol, Poisson-style failure rate over an interval (Δt, n_intervals), then recovery Beta-distribution parameters.
Subsection 3: readSystemReliabilityFTInfoFromFile
<header_str> N
<display_name> <x_symbol> <top_node_name> (×N rows)Columns: display_name, x_symbol, and a fault-tree top-node name.
WARNING
BV4's file declares System_Reliability 0 for subsection 1 and then lists 14 rows. Both readers take Main_Steam_Isolation as the header of subsection 2 and fail on X_SGTR_SG_A as its count. The engine prints a WARNING: SystemReliability.txt: malformed or unexpected content line and loads no failure models from the file; adsmd reports R0: "could not parse X_SGTR_SG_A as a number". In a project of your own, make the count of subsection 1 match its rows and keep the headers of subsections 2 and 3. The engine-side behaviour is described in SystemReliability.txt.
Input/Crew/{DecisionMaker,ActionTaker,Consultant}/<Role>.txt
Three crew role configuration files share a format. Each declares a role header keyword and a count, then count labeled numeric entries.
| Engine source | Operator::initiationForSimulation in src/ADSIDAC/Crew/Operator.cpp |
|---|---|
| Parser | adsmd-parsers::role_config |
| Rules consuming | none (the values are available in the manifest) |
<RoleHeader> N
<key_1> <value(s)>
…
<key_N> <value(s)>Most keys take a single floating-point value. Three keys take three values:
alarm_update_timecomponent_update_timeparameter_update_time
Key matching for the triple-value list is case-insensitive. Key spelling varies between the role files: Consultant.txt in BV4 uses Confidence_level_for_acting_HWKB (capital C) while DecisionMaker.txt uses the all-lowercase form.
Decision_Maker 16
action_time_multiplier 1.0
confidence_level_for_acting_HWKB 0.80
alarm_update_time 3600.0 100.0 1.0
…Input/Crew/Calculation_Aid.txt
Header + N curve blocks.
| Engine source | CalculationAid::readInfoFromFile in src/ADSIDAC/CalculationAid/CalculationAid.cpp, which reads each curve through Polynomial.cpp |
|---|---|
| Parser | adsmd-parsers::calculation_aid |
| Rules consuming | R28, R43 |
Number_of_Curves 1
NO. 1
Curve_Name Test_H2_Severe_Challenge
Input_Name Containment_Pressure
Input_Range 15 45
-6.959 5.6963 -0.4438 0.017 -0.0003 0.000002Each curve block is six labeled segments: sequence number, curve name, input parameter name (cross-references ControlPanel), [lo, hi] input range, and six polynomial coefficients (c0 + c1*x + … + c5*x^5).
WARNING
BV4's file declares Number_of_Curves 1 and lists 3 curves. adsmd reads the declared number of curves, so only the first one is in the manifest and no diagnostic is raised for the other two.
Input/SupportSystemsReliability/*.fta
SMILE/GeNIe fault tree XML files. The validator walks the directory, parses each .fta file, and extracts a coarse summary of the tree (diagram name, mission time, per-node failure probabilities).
| Engine source | none (the engine does not read .fta files) |
|---|---|
| Parser | adsmd-parsers::fault_tree (uses quick-xml) |
| Rules consuming | R26 |
<ftaDiagram id="…" missionTime="0">
<ftaNode id="N0" type="0" failureProbability="0" failureRate="0">
<node name="Top Node" description="" x="…" y="…" />
<ftaNode id="N1" type="2" failureProbability="0.3" failureRate="0">
<node name="Train A" description="" x="…" y="…" />
<parent ref="N0" />
</ftaNode>
</ftaNode>
<diagram name="…" description="" author="" />
</ftaDiagram>For each <ftaNode> we record id, type, optional display_name (from the inner <node name="…">), and optional failureProbability. R26 warns on any failure probability outside [0, 1].
TIP
The engine does not read .fta files. The parser gives authors a well-formedness and bounds check, and it puts the tree data into the manifest for other tools.
Input/Crew/{DecisionMaker,ActionTaker}/KB_O{D,A}M_*.txt
Per-side knowledge bases (KB_ODM_* in DecisionMaker/, KB_OAT_* in ActionTaker/). Nine files per crew side are parsed; a file that is absent is left out of the manifest without a diagnostic.
| Rules consuming | R22, R23, R24, R25, R31, R37, R38, R39, R41 |
|---|
KB_O*M_Bias_Factors.txt:Number_of_biased_parameters N, thenNrows of<param_name> <bias> <kind> <threshold>.KB_O*M_Maneuver_Actions.txt:Number_of_operator_Maneuver_action N. The row format is not parsed, soNmust be 0 (as in BV4); a positive count is a parse error.KB_O*M_Safety_Parameters.txt: same layout asSPDS_input.txt.KB_O*M_Scanned_Parameters.txt: see below.KB_O*M_Time_Constrained_Input.txt: a header line with a count andTime_Lapse_For_Update, four labeled thresholds and time constants, thenNrows of<tcl_name> <param_name> <th1> <th2> <th3>.KB_O*M_Event_Matrix.txt:Number_of_Symptoms NwithNnames, thenNumber_of_Events MwithMrows of<event_name> <event_kind> <p_1> … <p_N>.KB_O*M_System_Decomposition.txt: an optional description in double quotes,Number_of_Functional_Items N, thenNrows of<name> <code>.KB_O*M_Diagnosis_Actions.txt: per diagnosis the name, priority, reset-delay time and action count, plus theaction_nameandaction_typeof each action block. The rest of each action block is skipped.KB_O*M_HardWired_Diagnosis.txt: per diagnosis the index, name,activation_probability,branch_probabilityandMental_procedure_priority. The expectation, control, belief and activity blocks are skipped.
The two hierarchical files are parsed by anchor: the parser reads the header fields of a diagnosis and then scans forward to the next anchor (action_name, the next diagnosis_name, or the next diagnosis index) without parsing the rows in between.
KB_O*M_Scanned_Parameters.txt
| Engine source | KBScannedParameters::readInfoFromFile |
|---|---|
| Parser | adsmd-parsers::kb_scanned_parameters |
| Rules consuming | R25 |
Six labeled scalars, then counted lists of <name> <priority> rows. Two layouts are accepted. The four-section layout is the one the engine reads:
Scan_Period_(seconds) 30.0
Info_Load_Sensitivity 0.05
System_Criticality_Sensitivty 0.05
Priority_Decay_Time_(seconds) 60.0
Priority_Limit 5
Relevance_Limit 0.5
Number_of_Scanned_Parameters 1
Time 1
Number_of_Scanned_Components 0
Number_of_Scanned_Support_Systems 0
Number_of_Scanned_Alarms 2
A_Safety_Injection 3
A_Main_Steam_Isolation 3The three-section layout omits the Number_of_Scanned_Support_Systems section, so Number_of_Scanned_Alarms follows the component list directly. adsmd decides by the label: when the token after the component list is Number_of_Scanned_Support_Systems, that section is read; otherwise the support-system list is empty and the alarm section is read next. The BV4 files use the three-section layout; the decks under studies/ use four sections.
Unlike the engine, adsmd verifies every label, including the spelling System_Criticality_Sensitivty. Priority_Limit and the priorities are unsigned integers; the other scalars are floating-point numbers.
R25 checks the parameter, component and alarm lists against ControlPanel.txt. The support-system list is parsed into the manifest and not checked by any rule.
Three sections with a nonzero alarm count
The engine always reads four lists in order, by position. In a three-section file it takes the Number_of_Scanned_Alarms count as the support-system count, so alarm rows end up in the support-system scan list. The three-section layout is therefore safe only with an alarm count of 0. adsmd reads the same rows as alarms and raises no diagnostic for this case. Use the four-section layout in any file that scans alarms. See KB_OAT_Scanned_Parameters.txt.
Input/Crew/{DecisionMaker,ActionTaker}/RM/*.txt
ReasonMachine knowledge files: eleven for the decision maker and two for the action taker in BV4. Each file has its own hand-edited grammar, and the ODM and OAT versions of the same file (Concept_Base, Mental_Representation) spell their keywords differently. adsmd runs one tolerant summary parser (rm_summary.rs) over each file:
- declared_counts: every line whose first token matches
Number_of_*,No_of_*, orNo.\s*of\s*<…>followed by an integer. - head_settings:
<Key>:\s*<Value>lines that appear before the first declared count (the style, fatigue and expertise settings ofRM_Profile.txtand the leadingTime_Cost_*block ofRoutine_Monitor_List.txt).
Everything else in these files is ignored. The manifest carries presence and top-level counts for each file, and no rule reads them.
Input/Crew/Procedures/
| Parser | adsmd-parsers::procedures |
|---|---|
| Rules consuming | R12, R13, R14, R20, R21, R31, R40 |
Three kinds of file live here:
Procedures.txt: the central index. A variable-length head of named<key> <value>multipliers (13 in BV4:Step_Transfer_Time,Procedure_Transfer_Timeand eleven*_multiplierentries), followed byCoded_Steps NandNrows of<EOP> <Step>(302 in BV4).ProcedureActionTimeBranches.txt,ProcedureControlValueBranches.txtandMentalProcedureActivationTimeBranches.txt: the branch tables. Each starts with a header keyword and a leading integer (0in all three BV4 files).adsmdrecords the header, the leading value and the number of non-empty lines that follow; the rows themselves are not parsed.ZProcedure_<EOP>_<Step>.txt: one file per step (453 in BV4). The parser reads the header,<EOP> <Step> "<title>"(the quoted title may span several lines), and the two codes that follow it (proc_kindandstep_kind). It also records every pure-integer token with a value in1to9or3000to3200as a type-code token for R20. The rest of the body is not interpreted. Files whose name contains.bak,.origor.preare skipped, which leaves 452 parsed step files in BV4.
RELAP5 input deck (card numbers only)
| Parser | adsmd-deck |
|---|---|
| Rules consuming | R29 |
The deck path comes from input-deck in ZiniADS.txt; when that path does not exist, <dir-of-ZiniADS>/<basename> is tried. Without ZiniADS.txt no deck is scanned.
adsmd-deck extracts the integer at the start of each non-comment line (comment lines start with * or $*). Decks may contain bytes that are not valid UTF-8, such as Latin-1 degree signs, so the scanner reads bytes and converts lossily; the leading token is always ASCII. The manifest holds the total and the unique card counts (7710 and 7421 for BV4.i) and the sorted list of unique card numbers. R29 uses the first three digits of each card number as the set of component prefixes that exist in the deck.
No other RELAP5 grammar is parsed. A RELAP5 run is the test of deck validity.
Files that are not parsed
Input/Crew/StaticPIF.txt: R30 reports its presence, because no engine code reads it. Its content is not parsed.- The bodies of
ZProcedure_*.txtfiles, the rows of the three branch tables, the action blocks ofKB_O*M_Diagnosis_Actions.txtbeyondaction_nameandaction_type, the inner blocks ofKB_O*M_HardWired_Diagnosis.txt, and the inner structure of theRM/files.