← Documentation
ADS-IDAC Engine 5.0.0
BranchActionObjective.cpp
Go to the documentation of this file.
1// BranchActionObjective.cpp: implementation of the BranchActionObjective class.
2//
4
6#include "../Global/ConvertToString.h"
7#include <boost/serialization/export.hpp>
8#include "../Global/SimulationContext.h"
9#include <boost/archive/binary_oarchive.hpp>
10#include <boost/archive/binary_iarchive.hpp>
11BOOST_CLASS_EXPORT_IMPLEMENT(BranchActionObjective)
12using namespace std;
13
14
16// Construction/Destruction
18
20{
21
22}
23
25{
26
27}
32}
34 fout << ' ' << this->getSender() << ' ' << sim::Action::Objective << ' ' << sim::None << ' ' << this->getActionObjectiveName() << ' ' << this->getProbability() << ' '
35 << this->getTimeOfCommunication() << ' ' << this->getRemainingTime() << " 0.0 0 "
36 << '"' << "Intended_Receiver:" << this->getIntendedReceiver() << '"' << '\n';
37}
38
39
41 string str;
42 str = "ActionObjective: Sender: ";
43 str += g_sim.Translator.getString(this->getSender());
44 str += "; Receiver: ";
46 str += "; AO: ";
47 str += g_sim.Translator.getString(this->getDecision());
48 return str;
49}
53 this->saveCommunicationToFile(fout);
54}
59}
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
void saveInfoToFile(std::ostream &)
void copyBranchActionObjective(BranchActionObjective &)
void retrieveBranchActionObjectiveFromFile(std::ifstream &)
void saveBranchActionObjectiveToFile(std::ofstream &)
double getTimeOfCommunication()
void saveCommunicationToFile(std::ofstream &)
int getIntendedReceiver()
void retrieveCommunicationFromFile(std::ifstream &)
void copyCommunication(Communication &)
std::string getString(int) const
void copyDecisionActionObjective(DecisionActionObjective &)
void retrieveDecisionActionObjectiveFromFile(std::ifstream &)
void saveDecisionActionObjectiveToFile(std::ofstream &)
int getDecision()
Definition: Decision.cpp:27
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 Objective
Definition: SimConstants.h:197
constexpr int None
Definition: SimConstants.h:75
ConvertToString Translator
Parameter name/value conversion.