← Documentation
ADS-IDAC Engine 5.0.0
KBExpectedParameterDifferenceUnit.cpp
Go to the documentation of this file.
1// KBExpectedParameterDifferenceUnit.cpp: implementation of the KBExpectedParameterDifferenceUnit class.
2//
4
6#include <boost/serialization/export.hpp>
7#include <boost/archive/binary_oarchive.hpp>
8#include <boost/archive/binary_iarchive.hpp>
9BOOST_CLASS_EXPORT_IMPLEMENT(KBExpectedParameterDifferenceUnit)
10using namespace std;
11
13// Construction/Destruction
15
17{
19}
20
22{
23
24}
28{
32}
33int KBExpectedParameterDifferenceUnit::checkForMatch(string _first_name, double _first_value, string _second_name, double _second_value)
34{
35 string first_parameter = this->first_indicator.getInfoName();
36 string second_parameter = this->second_indicator.getInfoName();
37 int n_return = 0;
38 if(_first_name.compare(first_parameter) == 0 && _second_name.compare(second_parameter)== 0){
39 if ((_first_value - _second_value) > threshold_value_that_activates_expectation){
41 }
42 else{
44 }
45 }
46 else{
47 n_return = 0;
48 }
49 return n_return;
50}
52{
56 this->copyExpectationElement(_kbpdu);
57}
59{
64}
65
66
68{
73}
void saveExpectationElementToFile(std::ofstream &)
void retrieveExpectationElementFromFile(std::ifstream &)
void copyExpectationElement(ExpectationElement &)
void readInfoFromFile(std::ifstream &)
Definition: KBElement.cpp:27
void retrieveKBElementFromFile(std::ifstream &)
Definition: KBElement.cpp:36
void saveKBElementToFile(std::ofstream &)
Definition: KBElement.cpp:33
void copyKBElement(KBElement &)
Definition: KBElement.cpp:30
std::string getInfoName()
Definition: KBElement.cpp:26
void copyKBExpectedParameterDifferenceUnit(KBExpectedParameterDifferenceUnit &)
void retrieveKBExpectedParameterDifferenceUnitFromFile(std::ifstream &)
int checkForMatch(std::string, double, std::string, double)
constexpr int Failed
Definition: SimConstants.h:103
constexpr int Succeed
Definition: SimConstants.h:104