49#include "../Global/TermConversions.h"
50#include "../Scheduler/AnalysisInfoContainer.h"
51#include <boost/serialization/export.hpp>
54#include <boost/archive/text_oarchive.hpp>
55#include <boost/archive/text_iarchive.hpp>
56#include <boost/serialization/access.hpp>
57#include <boost/serialization/vector.hpp>
58#include <boost/serialization/unique_ptr.hpp>
299 template<
class Archive>
300 void serialize(Archive & ar,
const unsigned int version) {
A branching point in the DET, holding its branch alternatives.
std::vector< std::unique_ptr< BranchSystemAction > > VHWReliabilityUnit
std::vector< std::unique_ptr< BranchSupportSystemAction > > VSSReliabilityUnit
std::vector< std::unique_ptr< VSSReliabilityUnit > > MSSReliabilityUnit
std::vector< std::unique_ptr< VHWReliabilityUnit > > MHWReliabilityUnit
A single branch alternative — holds all crew/system state deltas for one branch.
The end state (ES node) that terminates one sequence of the DET.
Table of procedure actions that branch on the control value they set.
void copyBranchRecord(BranchRecord &)
Deep-copies another record into this one. Clusters, end states and pending forks are appended,...
std::string getTempESMessage()
void addInfoGatherMode(int, BranchInfoGatherMode *)
void setIDOfRecentGeneratedES(int)
void setTempTypeOfConsequence(Consequence)
Stores the consequence of the end state the running sequence will get.
std::vector< std::unique_ptr< BranchSystemAlarmState > > system_branch
Pending system alarm states, copied onto every alternative of the next cluster.
void addSSContentToExpandedBranch(MSSReliabilityUnit &, BranchCluster &, int, int)
Support system counterpart of addHWContentToExpandedBranch().
void addAnEndState(BranchEndState *)
Closes the running sequence with an end state and takes ownership of it.
MSSReliabilityUnit SS_reliability_branch
Pending support system reliability forks (one inner vector per fork).
BranchRecord()
Constructs an empty record: no pending forks, recent branch, cluster and end state IDs -1,...
void retrieveRecentBranchClusterFromFile(std::ifstream &)
Reads the layout written by saveRecentBranchClusterToFile and appends the cluster it reads.
void addCrewContentToExpandedBranch(BranchUnit &, BranchCluster &, int, int, int)
Copies the alternatives of one crew fork into the expanded cluster.
void addAction(int, BranchAction *)
int ID_of_recent_generated_ES
Consequence getTempTypeOfConsequence()
void addProcedureStep(int, BranchProcedureStep *)
std::string temp_es_message
void saveBranchRecordToFile(std::ofstream &)
Writes the whole record (scalars, clusters, end states, pending forks and the three branch definition...
void addComponentState(int, BranchExpectedComponentState *)
void generateRestartFileForRELAP5()
Declared only; there is no definition.
Consequence temp_type_of_consequence
void clearBranchRecordForRestart()
Clears the pending forks only (same as clearBranches()).
double getRecentUnconditionalBranchProbability()
void addInstinctiveResponseProcedure(int, BranchProcedureStep *)
int getTotalNumberOfBranches()
void saveAESNodeToFile(BranchEndState *)
Declared only; there is no definition. ES nodes are written by BranchEndState::saveInfoToFile().
void addParameterTrend(int, BranchExpectedParameterTrend *)
void clearBranches()
Drops every pending fork and system alarm and resets the pending branch types and counts....
int getIDOfMotherBranch()
BranchProcedureAtionTime source_of_procedure_time_branches
int getIDOfRecentGeneratedES()
void clearBranchRecordAll()
Resets the whole record: clusters, end states, pending forks, the three branch definition tables and ...
void addHWContentToExpandedBranch(MHWReliabilityUnit &, BranchCluster &, int, int)
Copies the alternatives of the first pending hardware fork into the expanded cluster (used when exact...
BranchUnit ODM_branch
Pending crew forks of the decision maker, action taker and consultant.
void saveNumOfBranchInRecentBranchClusterToFile(std::ofstream &)
Writes the alternative count of the most recent cluster (0 with no cluster).
int num_of_SSReliability_branch
void applyBranchProbabilityFloor(double floor)
Applies the minimum branch probability to every pending fork.
int checkAndAddBranchCluster()
Expands the pending forks into a new BranchCluster.
int getIDOfRecentGeneratedBranchCluster()
void addSubGoal(int, BranchSubGoal *)
void addActionPack(int, BranchActionPack *)
void setIDOfMotherBranch(int)
void setIDOfRecentGeneratedBranchCluster(int)
void addParameterValue(int, BranchExpectedParameterValue *)
void setIDOfRecentGeneratedBranch(int)
void sendSpecifiedBranchCommandToCommandCenter(int)
Sends the content of alternative n_th_branch (0-based) of the most recent cluster to the command cent...
void addSystemAlarms(BranchSystemAlarmState *)
Registers a system alarm state. It is not a fork: a copy is attached to every alternative of the next...
void addActionObjective(int, BranchActionObjective *)
void addScannedParameter(int, BranchScannedParameter *)
Crew fork registration for a scanned parameter; same contract as addGoal().
void addParameterDifference(int, BranchExpectedParameterDifference *)
void endSimulation()
Writes ES_summary.txt in the ES directory from the end_state vector: a header line ES# Probability En...
void addSSReliabilityBranch(BranchSupportSystemAction *, BranchSupportSystemAction *)
Registers a support system reliability fork with two alternatives (index 0 first)....
int ID_of_recent_generated_branch_cluster
void setSizeOfSubFolder(int)
double recent_unconditional_branch_probability
void calculateTotalNumberOfBranch()
Sets the total branch count to the product of the nonzero pending counts (ODM, OAT,...
int ID_of_recent_generated_branch
void appendEndStateSummary()
Appends the most recent end state to ES_summary.txt, writing the header first when the file does not ...
std::vector< std::unique_ptr< BranchEndState > > end_state
End states of the finished sequences held by this record.
void serialize(Archive &ar, const unsigned int version)
int getNumOfHWReliabilityBranch()
void addHWReliabilityBranch(BranchSystemAction *, BranchSystemAction *)
Registers a hardware reliability fork with two alternatives (index 0 first). The record takes ownersh...
MHWReliabilityUnit HW_reliability_branch
Pending hardware reliability forks (one inner vector per fork).
int getIDOfRecentGeneratedBranch()
void addDiagnosis(int, BranchDiagnosis *)
void setRecentUnconditionalBranchProbability(double)
BranchMentalProcedureActivationTime mental_procedure_activation_branches
void addSupportSystemState(int, BranchExpectedSupportSystemState *)
BranchCluster * findBrnachCluster(int)
Finds a cluster by ID, searching from the most recent cluster.
void initiationForSimulation()
Loads the three branch definition tables: procedure action time branches, mental procedure activation...
void savePENodeOfABranchClusterToFile(BranchCluster *)
Declared only; there is no definition. PE nodes are written by BranchCluster::savePENodeToFile().
void retrieveBranchRecordFromFile(std::ifstream &)
Reads the layout written by saveBranchRecordToFile and appends what it reads. A stream that does not ...
void addStrategy(int, BranchStrategy *)
void addMentalBelief(int, BranchExpectedMentalBelief *)
Crew fork registration for a mental belief; same contract as addGoal().
int num_of_HWReliability_branch
std::vector< std::unique_ptr< BranchCluster > > branch_cluster
All branching points generated so far, in creation order.
int total_number_of_branches
BranchProcedureControlValue control_value_branches
void sendCurrentBranchCommandToCommandCenter()
Sends the content of the running sequence's alternative of the most recent cluster to the command cen...
void setTempESMessage(std::string)
Stores the description of the end state the running sequence will get if it is terminated (set by mod...
void addAlarmState(int, BranchExpectedAlarmState *)
void saveRecentBranchClusterToFile(std::ofstream &)
Writes the record scalars and the most recent cluster only (BranchRecord 1), or BranchRecord 0 when t...
void addGoal(int, BranchGoal *)
int getIDOfMotherCluster()
void setIDOfMotherCluster(int)