54 const ResultMap& current_timestamp_results,
55 const std::vector<DataPoint>& ts_data,
56 const std::unordered_map<std::string, std::vector<std::string>>& rule_to_sensors);
Defines the structure of the evaluation pipeline and the function to build it based on the provided r...
Abstract class for the strategy pattern, defining the interface for different rule strategies.
std::unordered_map< std::string, bool > ResultMap
Alias for a map containing the boolean evaluation results of rules, keyed by rule ID.
Definition Strategy.hpp:18
Definition of the data structures and utility functions used across the Engine folder.
Responsible for applying rule strategies to data points and generating evaluation results.
Definition Evaluate.hpp:29
EvaluationResult evaluateRule(const DataPoint ¤t_data, const std::shared_ptr< RuleStrategy > &rule)
Evaluates primary rules (Simple, Step, Stateful) against a specific data point.
Definition Evaluate.cpp:6
EvaluationResult evaluateCorrelation(const std::shared_ptr< RuleStrategy > &rule, const ResultMap ¤t_timestamp_results, const std::vector< DataPoint > &ts_data, const std::unordered_map< std::string, std::vector< std::string > > &rule_to_sensors)
Evaluates correlation rules by analyzing the outcomes of all evaluated rules for the current timestam...
Definition Evaluate.cpp:34
Evaluate()=default
Default constructor.
DataPoint contains the information of a single data point, which is a line of the input file.
Definition Types.hpp:19
Holds the outcome of a single rule evaluation.
Definition Evaluate.hpp:20
std::string alarm_message
the alarm message generated upon faliure (empty if is_nominal is true)
Definition Evaluate.hpp:22
bool is_nominal
true if the rule is not triggered, false if it is triggered
Definition Evaluate.hpp:21