9#include "../CalculationAid/Probability.h"
25#include "../Scheduler/CommunicationPlace.h"
26#include "../ControlPanel/StateOfActivation.h"
29#include <boost/archive/text_oarchive.hpp>
30#include <boost/archive/text_iarchive.hpp>
31#include <boost/serialization/access.hpp>
32#include <boost/serialization/vector.hpp>
33#include <boost/serialization/base_object.hpp>
34#include <boost/serialization/export.hpp>
128 template<
class Archive>
129 void serialize(Archive & ar,
const unsigned int version) {
132 ar & boost::serialization::base_object<Probability>(*
this);
133 ar & boost::serialization::base_object<CommunicationPlace>(*
this);
134 ar & boost::serialization::base_object<StateOfActivation>(*
this);
One alternative of a BranchCluster, i.e. one PE node of the DET.
virtual ~BranchProbability()
void calculateProbability()
Sets the conditional probability to the product of the probabilities of every content item this alter...
void setIDOfThisBranch(int)
double unconditional_branch_probability
void copyBranchProbability(BranchProbability &)
Copies the IDs, probabilities, child type, state of activation and content of another alternative....
double getUnconditionalBranchProbability()
int ID_of_the_child_branch_cluster
void saveBranchProbabilityToFile(std::ofstream &)
Writes the IDs, unconditional probability and child type, then the Probability, CommunicationPlace an...
BranchProbability()
Constructs an alternative with all IDs -999, unconditional probability -1.0 and child type sim::None.
void setUnconditionalBranchProbability(double)
void retrieveBranchProbabilityFromFile(std::ifstream &)
Reads the layout written by saveBranchProbabilityToFile.
int getIDOfTheChildBranchCluster()
int ID_of_the_associated_branch_cluster
void setTypeOfChild(int)
Sets the kind of node that follows this alternative: sim::Branch::Branch (a child cluster) or sim::Br...
void calUnconditionalBranchProbability(double)
Sets the unconditional probability to x times the conditional probability.
void serialize(Archive &ar, const unsigned int version)
void setIDOfTheChildBranchCluster(int)
Sets the ID of the node that follows this alternative: the child cluster ID, or the end state ID when...
friend class boost::serialization::access
std::vector< int > child_IDs
void setIDOfTheAssociatedBranchCluster(int)
int getIDOfTheAssociatedBranchCluster()
void sendBranchInfoToCommandCenter(int)
Hands the content of this alternative to the command center (g_sim.Command_handler)....
void saveInfoToFile(std::ostream &)
Writes the content of this alternative in the PE node text form (CommunicationPlace::saveInfoToFileAs...