← Documentation
ADS-IDAC Engine 5.0.0
BranchExpectedSupportSystemState.cpp
Go to the documentation of this file.
1#include <sstream>
3#include "../Global/ConvertToString.h"
4#include <boost/serialization/export.hpp>
5#include "../Global/SimulationContext.h"
6#include <boost/archive/binary_oarchive.hpp>
7#include <boost/archive/binary_iarchive.hpp>
8BOOST_CLASS_EXPORT_IMPLEMENT(BranchExpectedSupportSystemState)
9using namespace std;
10
11
13{
14
15}
16
18{
19
20}
25}
27 string str;
28 str = "Support System: Sender: ";
29 str += g_sim.Translator.getString(this->getSender());
30 str += "; Receiver: ";
32 str += "; Support System: ";
33 str += this->getDisplayName();
34 str += "; Status: ";
36 str += "; Exp State: ";
38 str += "; Observed State: ";
41 str += ";Use of Memorized Info";
42 }
43 str += "; New Probability: ";
44 std::ostringstream streamObj;
45 streamObj << this->getProbability();
46 str += streamObj.str();
47 return str;
48}
50 string str;
51 str = "Status:";
53 str += ";_Exp_State:";
55 str += ";_Observed_State:";
58 str += ";_Use_of_Memorized_Info";
59 }
60 fout << ' ' << this->getSender() << ' ' << sim::Action::SendInfo << ' ' << this->getObservedSupportSystemState() << ' ' << this->getInfoName() << ' ' << this->getProbability() << ' '
61 << this->getTimeOfCommunication() << ' ' << this->getRemainingTime() << " 0.0 " << this->getStateOfExpectation() << ' '
62 << '"' << "Intended_Receiver:" << g_sim.Translator.getString(this->getIntendedReceiver()) << ';' << str << '"' << '\n';
63}
67 this->saveCommunicationToFile(fout);
68}
73}
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
void copyBranchExpectedSupportSystemState(BranchExpectedSupportSystemState &)
void retrieveBranchExpectedSupportSystemStateFromFile(std::ifstream &)
double getTimeOfCommunication()
void saveCommunicationToFile(std::ofstream &)
int getIntendedReceiver()
void retrieveCommunicationFromFile(std::ifstream &)
void copyCommunication(Communication &)
std::string getString(int) const
void copyDecisionExpectedSupportSystemState(DecisionExpectedSupportSystemState &)
std::string getDisplayName()
std::string getInfoName()
Definition: KBElement.cpp:26
double getProbability()
Definition: Probability.cpp:27
void saveTimerAndProbabilityToFile(std::ofstream &)
void copyTimerAndProbability(TimerAndProbability &)
void retrieveTimerAndProbabilityFromFile(std::ifstream &)
double getRemainingTime()
Definition: Timer.cpp:31
constexpr int SendInfo
Definition: SimConstants.h:204
constexpr int OldInfo
Definition: SimConstants.h:126
ConvertToString Translator
Parameter name/value conversion.