6#include <boost/serialization/export.hpp>
7#include <boost/archive/binary_oarchive.hpp>
8#include <boost/archive/binary_iarchive.hpp>
43 bool need_branch =
false;
53 string procedure, step, action, str;
55 double cntrl_val, prob;
56 double total_probability = 0.0;
65 for (i = 0 ; i != num_branches ; i ++)
69 total_probability += prob;
73 if (total_probability > 1.0001 || total_probability < 0.9999)
76 cout <<
"Procedure Control Value Branch Probability: " << procedure <<
' ' << step <<
' ' << action
77 <<
" Probability Sum Does Not Equal 1.0" <<
'\n';
78 ofstream fout(
"err messages.txt", ios::app);
79 fout <<
r5pars_.timesno <<
"Procedure Control Value Branch Probability: " << procedure <<
' ' << step <<
' ' << action
80 <<
" Probability Sum Does Not Equal 1.0" <<
'\n';
87 vector<double >::iterator double_itr;
106 vector<double>::iterator double_itr;
112 for (double_itr = this->
control_values.begin() ; double_itr!= this->control_values.end() ; double_itr++)
114 fout << *double_itr <<
' ';
117 for (double_itr = this->
probabilities.begin() ; double_itr!= this->probabilities.end() ; double_itr++)
119 fout << *double_itr <<
' ';
virtual ~BranchProcedureControlValueUnit()
bool checkIfControlValueBranchNeedsToBeGenerated(std::string, std::string, std::string)
std::vector< double > probabilities
void retrieveBranchProcedureControlValueUnitFromFile(std::ifstream &)
void copyBranchProcedureControlValueUnit(BranchProcedureControlValueUnit)
std::string procedure_name
void setActionName(std::string)
BranchProcedureControlValueUnit()
std::string getProcedureName()
void setProcedureName(std::string)
void setStepName(std::string)
void saveBranchProcedureControlValueUnitToFile(std::ofstream &)
void setNumberOfBranches(int)
std::string getActionName()
void clearBranchProcedureControlValueUnit()
void readInfoFromFile(std::ifstream &)
std::vector< double > control_values
int getNumberOfBranches()
std::string getStepName()