|
diag_eventdiagnosis.h
Go to the documentation of this file.
2Functions to check a system's diagnosability with respect to failure events (diagnosability and I-diagnosability) and computation of an event-diagnoser.
25Standard diagnosability of a plant is validated with respect to a given failure %partition. According to: "A Polynomial Algorithm for Testing Diagnosability of Discrete Event Systems" by Shengbing Jiang, Zhongdong Huang, Vigyan Chandra, and Ratnesh Kumar.
34extern FAUDES_API bool IsEventDiagnosable(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap, std::string& rReportString);
39Validates I-Diagnosability with respect to a given failure and indicator %partition. The algorithm is a modification of IsDiagnosable().
48extern FAUDES_API bool IsIndicatorEventDiagnosable(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap, std::string& rReportString);
51Check if a generator meets the general assumptions of diagnosability as required by IsDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&) and IsIndicatorDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&).
72extern FAUDES_API bool MeetsDiagnosabilityAssumptions(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap, std::string& rReportString);
84extern FAUDES_API void ConvertParallelCompositionMap( const std::map<std::pair<Idx,Idx>,Idx>& rReverseCompositionMap,
120extern FAUDES_API bool FailuresUnobservable(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap, std::string& rReport);
134Auxiliary function for ExistsCycle(const System&, std::string&). Starting from a state currState, this function makes a depth-first-search through the generator rGen.
148extern FAUDES_API bool ExistsCycleSearch(const System& rGen, StateSet& rTodo, Idx currState, StateSet statesOnPath, std::string& rReport);
160Auxiliary function for CycleStartStates(). Parses through the active event set of the current state and checks whether any of the successor states already occurred on the path to current state (then a cycle is found).
172extern FAUDES_API void CycleStartStatesSearch(const System& rGen, StateSet& rTodo, Idx currState, StateSet statesOnPath, StateSet& rCycleOriginStates);
175Remove states with same failure labels from rGd and from rReverseCompositionMap and perform cycle detection.
189extern FAUDES_API bool ExistsViolatingCyclesInGd(System& rGd, const Diagnoser& rGobs, std::map<std::pair<Idx,Idx>,Idx>& rReverseCompositionMap, const std::string& rFailureType, std::string& rReportString);
194 Input generator, which is a model of the original plant containing the relevant failures events.
202extern FAUDES_API void ComputeGobs(const System& rOrigGen, const std::string& rFailureType, const EventSet& rFailureEvents, Diagnoser& rGobs);
207 Input generator, which is a model of the original plant containing the relevant failures events.
215extern FAUDES_API void ComputeGobs(const System& rOrigGen, const AttributeFailureTypeMap& rAttrFTMap, Diagnoser& rGobs);
218Compute the diagnosability testing generator G_d as a parallel composition of G_o with itself (according to Jiang).
226extern FAUDES_API void ComputeGd(const Diagnoser& rGobs, std::map<std::pair<Idx,Idx>,Idx>& rReverseCompositionMap, System& rGd);
229Extract all traces of a generator G_d that start with an indicator event that follows a failure event of a certain failure type.
241extern FAUDES_API void TrimNonIndicatorTracesOfGd(System& rGd, const Diagnoser& rGobs, const Idx rFailureType,
242 const EventSet& rIndicatorEvents, const std::map<std::pair<Idx,Idx>,Idx>& rReverseCompositionMap);
245Auxiliary function for TrimNonIndicatorTracesOfGd(). Parse through active transition set of the current state and delete transitions if occurring event is not an indicator event or there did not occur a failure before the indicator.
261extern FAUDES_API void TrimNonIndicatorTracesOfGdRecursive(System& rGd, const Diagnoser& rGobs, const Idx rFailureType,
266Compute the reachability from a given generator state through a trace that consists of arbitrarily many unobservable events followed by one observable event.
278 Output variable for the reachability. Maps occurring observable events to the reachable generator states and the corresponding failure types that occurred within the unobservable part of the trace.
280extern FAUDES_API void ComputeReachability(const System& rGen, const EventSet& rUnobsEvents, const EventSet& rFailures, Idx State,
281 const AttributeFailureTypeMap& rAttrFTMap, std::map<Idx,std::multimap<Idx,DiagLabelSet> >& rReachabilityMap);
284Auxiliary function for ComputeReachability(const System&, const EventSet&, const EventSet&, Idx, const AttributeFailureTypeMap&, std::map<Idx,std::multimap<Idx,DiagLabelSet>>&). Is recursively called for every occurring state on the trace (that consists of arbitrarily many unobservable events followed by one observable event).
296 Output variable for the reachability. Maps occurring observable events to the reachable generator states and the coresponing failure types that occurred within the unobservable part of the trace.
300extern FAUDES_API void ComputeReachabilityRecursive(const System& rGen, const EventSet& rUnobsEvents,
302 std::map<Idx,std::multimap<Idx,DiagLabelSet> >& rReachabilityMap, const DiagLabelSet FToccurred);
325extern FAUDES_API void EventDiagnoser(const System& rOrigGen, const std::map<std::string,EventSet>& rFailureTypeMap, Diagnoser& rDiagGen);
342extern FAUDES_API void EventDiagnoser(const System& rOrigGen, const AttributeFailureTypeMap& rAttrFTMap, Diagnoser& rDiagGen);
347Generate a new label. From the last label and the failure types that occurred on the way, the new label is generated.
355extern FAUDES_API void LabelPropagation(const DiagLabelSet& lastLabel, const DiagLabelSet& failureTypes, DiagLabelSet& newLabel);
364extern FAUDES_API void LabelCorrection(const std::multimap<Idx,DiagLabelSet>& mm, AttributeDiagnoserState& attr);
369extern FAUDES_API bool IsEventDiagnosable(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap);
375extern FAUDES_API bool IsIndicatorEventDiagnosable(const System& rGen, const AttributeFailureTypeMap& rFailureTypeMap);
Definition diag_attrlabelset.h:19 Definition cfl_indexset.h:78 Definition cfl_nameset.h:70 Definition cfl_cgenerator.h:76 Definition diag_generator.h:26 Definition cfl_agenerator.h:43 void ConvertParallelCompositionMap(const map< pair< Idx, Idx >, Idx > &rReverseCompositionMap, map< Idx, pair< Idx, Idx > > &rCompositionMap) Definition diag_eventdiagnosis.cpp:210 bool ExistsViolatingCyclesInGd(System &rGd, const Diagnoser &rGobs, map< pair< Idx, Idx >, Idx > &rReverseCompositionMap, const string &rFailureType, string &rReportString) Definition diag_eventdiagnosis.cpp:380 bool FailuresUnobservable(const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, string &rReport) Definition diag_eventdiagnosis.cpp:265 void ComputeGd(const Diagnoser &rGobs, map< pair< Idx, Idx >, Idx > &rReverseCompositionMap, System &rGd) Definition diag_eventdiagnosis.cpp:588 TransSet ActiveBackwardTransSet(const System &rGen, Idx state) Definition diag_eventdiagnosis.cpp:802 bool ExistsCycleSearch(const System &rGen, StateSet &rTodo, Idx currState, StateSet statesOnPath, string &rReport) Definition diag_eventdiagnosis.cpp:306 bool IsIndicatorEventDiagnosable(const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, string &rReportString) Definition diag_eventdiagnosis.cpp:85 bool ExistsCycle(const System &rGen, string &rReport) Definition diag_eventdiagnosis.cpp:283 void CycleStartStatesSearch(const System &rGen, StateSet &rTodo, Idx currState, StateSet statesOnPath, StateSet &rCycleOriginStates) Definition diag_eventdiagnosis.cpp:354 void CycleStartStates(const System &rGen, StateSet &rCycleOrigins) Definition diag_eventdiagnosis.cpp:334 void TrimNonIndicatorTracesOfGd(System &rGd, const Diagnoser &rGobs, const Idx rFailureType, const EventSet &rIndicatorEvents, const map< pair< Idx, Idx >, Idx > &rReverseCompositionMap) Definition diag_eventdiagnosis.cpp:606 bool IsLive(const System &rGen, string &rReport) Definition diag_eventdiagnosis.cpp:225 bool IsEventDiagnosable(const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, string &rReportString) Definition diag_eventdiagnosis.cpp:13 void ComputeReachability(const System &rGen, const EventSet &rUnobsEvents, const EventSet &rFailures, Idx State, const AttributeFailureTypeMap &rAttrFTMap, map< Idx, multimap< Idx, DiagLabelSet > > &rReachabilityMap) Definition diag_eventdiagnosis.cpp:703 void EventDiagnoser(const System &rOrigGen, const map< string, EventSet > &rFailureTypeMap, Diagnoser &rDiagGen) Definition diag_eventdiagnosis.cpp:816 void LabelPropagation(const DiagLabelSet &lastLabel, const DiagLabelSet &failureTypes, DiagLabelSet &newLabel) Definition diag_eventdiagnosis.cpp:1020 void ComputeReachabilityRecursive(const System &rGen, const EventSet &rUnobsEvents, const EventSet &rFailures, Idx State, const AttributeFailureTypeMap &rAttrFTMap, map< Idx, multimap< Idx, DiagLabelSet > > &rReachabilityMap, const DiagLabelSet FToccurred) Definition diag_eventdiagnosis.cpp:729 bool CycleOfUnobsEvents(const System &rGen, string &rReport) Definition diag_eventdiagnosis.cpp:241 bool MeetsDiagnosabilityAssumptions(const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, string &rReportString) Definition diag_eventdiagnosis.cpp:160 void TrimNonIndicatorTracesOfGdRecursive(System &rGd, const Diagnoser &rGobs, const Idx rFailureType, const EventSet &rIndicatorEvents, map< Idx, pair< Idx, Idx > > &rCompositionMap, Idx state, StateSet &rStatesDone) Definition diag_eventdiagnosis.cpp:618 void LabelCorrection(const multimap< Idx, DiagLabelSet > &mm, AttributeDiagnoserState &attr) Definition diag_eventdiagnosis.cpp:1047 void ComputeGobs(const System &rOrigGen, const string &rFailureType, const EventSet &rFailureEvents, Diagnoser &rGobs) Definition diag_eventdiagnosis.cpp:423 libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen |