← Documentation
ADS-IDAC Engine 5.0.0
BranchExpectedParameterDifference.cpp
Go to the documentation of this file.
1// BranchExpectedParameterDifference.cpp: implementation of the BranchExpectedParameterDifference class.
2//
4
5#include <sstream>
7#include "../Global/SimulationContext.h"
8#include <boost/serialization/export.hpp>
9#include <boost/archive/binary_oarchive.hpp>
10#include <boost/archive/binary_iarchive.hpp>
11BOOST_CLASS_EXPORT_IMPLEMENT(BranchExpectedParameterDifference)
12using namespace std;
13
15// Construction/Destruction
17
19
20}
21
23
24}
27 this->copyTimerAndProbability(_bepd);
28 this->copyCommunication(_bepd);
29}
31 //module not coded - may not be needed for current ADS version...
32}
33
35 string str;
36 double value;
37 std::ostringstream streamObj;
38 str = "Parameter Difference: Sender: ";
39 str += g_sim.Translator.getString(this->getSender());
40 str += "; Receiver: ";
42 str += "; Parameter1: ";
44 str += " - Parameter2: ";
46 str += " > Threshold: ";
48 str += streamObj.str();
49 str += "; Status: ";
51 str += "; Observed value: ";
54 streamObj << value;
55 str += streamObj.str();
56 str += "; New Probability: ";
57 streamObj << this->getProbability();
58 str += streamObj.str();
59 return str;
60}
64 this->saveCommunicationToFile(fout);
65}
70}
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
void retrieveBranchExpectedParameterDifferenceFromFile(std::ifstream &)
void copyBranchExpectedParameterDifference(BranchExpectedParameterDifference &)
void saveCommunicationToFile(std::ofstream &)
int getIntendedReceiver()
void retrieveCommunicationFromFile(std::ifstream &)
void copyCommunication(Communication &)
std::string getString(int) const
void copyDecisionExpectedParameterDifference(DecisionExpectedParameterDifference &)
std::string getDisplayName()
double getProbability()
Definition: Probability.cpp:27
void saveTimerAndProbabilityToFile(std::ofstream &)
void copyTimerAndProbability(TimerAndProbability &)
void retrieveTimerAndProbabilityFromFile(std::ifstream &)
ConvertToString Translator
Parameter name/value conversion.