6#include "../Global/SimulationContext.h"
7#include <boost/serialization/export.hpp>
8#include <boost/archive/binary_oarchive.hpp>
9#include <boost/archive/binary_iarchive.hpp>
30 bool found_bpcvu =
false;
34 found_bpcvu = (*bp_cvu_itr)->checkIfControlValueBranchNeedsToBeGenerated(_procedure, _step, _action);
36 bpcvu_pt = bp_cvu_itr->get();
54 auto p = make_unique<BranchProcedureControlValueUnit>();
55 p->copyBranchProcedureControlValueUnit(*src);
62 string file_name, str;
65 file_name +=
"ProcedureControlValueBranches.txt";
66 ifstream fin(file_name.c_str(), ios::in);
68 fin >> str >> num_obj;
69 for (i = 0 ; i < num_obj; i++){
70 auto p = make_unique<BranchProcedureControlValueUnit>();
71 p->readInfoFromFile(fin);
78 cout <<
"File: " << file_name <<
" cound not be found" << endl;
79 ofstream fout(
"err messages.txt", ios::app);
80 fout <<
r5pars_.timesno <<
" File: " << file_name <<
" cound not be found\n";
87 fout <<
"BranchProcedureControlValue" <<
' '
91 p->saveBranchProcedureControlValueUnitToFile(fout);
99 fin >> str >> num_obj;
100 for (i = 0; i != num_obj; i ++ )
102 auto p = make_unique<BranchProcedureControlValueUnit>();
103 p->retrieveBranchProcedureControlValueUnitFromFile(fin);
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
Table of procedure actions that branch on the control value they set.
std::vector< std::unique_ptr< BranchProcedureControlValueUnit > > control_value_branches
The entries, in file order.
BranchProcedureControlValue()
void copyBranchProcedureControlValue(BranchProcedureControlValue &)
Appends deep copies of the entries of another table. Existing entries are kept, so call it on an empt...
virtual ~BranchProcedureControlValue()
void saveBranchProcedureControlValueToFile(std::ofstream &)
Writes the label BranchProcedureControlValue, the entry count and every entry to a text restart strea...
void readInfoFromFile()
Loads ProcedureControlValueBranches.txt from the EOP directory (Scheduler::getEOPDirectory()) and app...
BranchProcedureControlValueUnit * checkToGenerateControlValueBranches(std::string, std::string, std::string)
Looks up the control value branch definition of a procedure action.
void retreiveBranchProcedureControlValueFromFile(std::ifstream &)
Reads the layout written by saveBranchProcedureControlValueToFile and appends the entries it reads.
void clearBranchProcedureControlValue()
Removes every entry.
std::string getEOPDirectory()
Scheduler SScheduler
Simulation scheduling, parses CLI options.