← Documentation
ADS-IDAC Engine 5.0.0
SimulationContext.h
Go to the documentation of this file.
1
7
8#pragma once
9
10#include "SimConfig.h"
11#include "../System/SystemModule.h"
12#include "../ControlPanel/ControlPanel.h"
13#include "../Scheduler/Scheduler.h"
14#include "../Scheduler/InitiatingEventController.h"
15#include "../Procedure/Procedures.h"
16#include "../Branch/BranchRecord.h"
17#include "RestartNodeInfo.h"
18#include "../HWReliability/HWReliabilityModule.h"
19#include "../SupportSystemsReliability/SupportSystemReliabilityModule.h"
20#include "KeyParameterHistory.h"
21#include "ConvertToString.h"
22#include "../CalculationAid/CalculationAid.h"
23#ifdef ENABLE_HCL
24#include "../HCL/HCLEngine.h"
25#endif
26
27#include <deque>
28#include <map>
29#include <memory>
30#include <vector>
31
38
39 // ---- Core simulation objects ----
56#ifdef ENABLE_HCL
57 HCLEngine engine;
58#endif
59
60 // ---- FIFO branch tracking / restart state ----
61 std::deque<std::shared_ptr<RestartNodeInfo>> restart_info;
62 std::map<int, std::vector<char>> restart_buffers;
63 std::map<int, int> cid_to_source_sequence;
65 bool fresh_restart = false;
66 bool expected_abort = false;
67 int id_epoch_base = 0;
68 std::map<int, std::pair<size_t, size_t>> pe_file_state;
69 uint64_t config_fingerprint = 0;
70
71 // ---- SEQ-FP diagnostics ----
72 std::vector<std::pair<double,int>> current_seq_events;
75};
76
Checkpoint/restart state snapshot — captures entire C++ simulation state at a branching point.
CLI configuration, populated by Scheduler::parseOptions().
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
int seq_restart_branch_num
Branch index within that cluster.
SupportSystemReliabilityModule Support_system_reliability
Support system reliability.
Scheduler SScheduler
Simulation scheduling, parses CLI options.
Procedures All_procedure
Emergency operating procedures.
OperatorAT Action_Taker
Crew action execution model.
std::map< int, std::pair< size_t, size_t > > pe_file_state
PE id -> (size, hash) last written by this process; an unchanged node is not rewritten.
KeyParameterHistory KPS
Time-series parameter recording.
int seq_restart_cid
CID of restart-origin cluster.
std::vector< std::pair< double, int > > current_seq_events
(branching_time, num_branches) pairs
ControlPanel Indicator
Control room panel state.
HWReliabilityModule System_reliability
Hardware fault trees.
OperatorDM Decision_Maker
Crew decision-making model.
SystemModule Plant
Maps RELAP5 card numbers to C++ objects.
std::map< int, std::vector< char > > restart_buffers
seq_id -> RELAP5 restart buffer
uint64_t config_fingerprint
FNV-1a of immutable config inputs (see ConfigFingerprint.h); 0 = not computed.
CommandControlCenter Command_handler
Command/control dispatch.
InitiatingEventController IE
Initiating event definition.
int id_epoch_base
Branch-ID epoch for resumed MPI runs; 0 = fresh run.
bool fresh_restart
One-shot flag for restart init.
bool branches_generated_this_sequence
True if branches generated this seq.
std::map< int, int > cid_to_source_sequence
Maps cluster ID to source sequence.
CommunicationPlace Communication_place
Inter-module communication.
AnalysisInfoContainer Aux_info
Analysis records.
BranchRecord Branch_center
Dynamic event tree state.
ConvertToString Translator
Parameter name/value conversion.
std::deque< std::shared_ptr< RestartNodeInfo > > restart_info
Restart checkpoints for FIFO.
bool expected_abort
Sequence ended abnormally.
CalculationAid All_polynomial
Polynomial calculations.