|
|
||||||
|
op_observercomputation.h
Go to the documentation of this file.
8 output control consistency (OCC) and local control consistency (LCC) are provided. See for example
52 // ================================================================================================
55 // ================================================================================================
59 * Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-level event).
60 * This function computes the part of the dynamic system that is needed for evaluating the observer
74 extern FAUDES_API void calculateDynamicSystemClosedObs(const Generator& rGen, EventSet& rHighAlph, Generator& rGenDyn);
78 * This function computes the part of the dynamic system that is needed for evaluating the observer
95 * Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property).
96 * This function computes the part of the dynamic system that is needed for evaluating the observer
110 extern FAUDES_API void calculateDynamicSystemMSA(const Generator& rGen, EventSet& rHighAlph, Generator& rGenDyn);
132 bool recursiveCheckMSAForward(const Generator& rGen, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
156 extern FAUDES_API bool recursiveCheckMSABackward(const Generator& rGen, const TransSetX2EvX1& rRevTransSet, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
159 * Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency property).
160 * This function computes the part of the dynamic system that is needed for evaluating the observer
176 void calculateDynamicSystemLCC(const Generator& rGen, const EventSet& rControllableEvents, const EventSet& rHighAlph, Generator& rGenDyn);
200 extern FAUDES_API void recursiveCheckLCC(const TransSetX2EvX1& rRevTransSet, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
202 // ================================================================================================
204 // ================================================================================================
285 * Lm(G)-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
287 * is an Lm(G)-observer and locally control consistent (lcc) for the marked language of the given generator.
314 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
316 * <tr> <td> Result of calcNaturalObserverLCC(rGenObs, rControllableEvents, rHighAlph); </td> </tr>
317 * <tr> <td> New high-level alphabet (rHighAlph): alpha, beta, gamma, delta, a, e, f, g, h </td> </tr>
323 extern FAUDES_API Int calcNaturalObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
364 * MSA-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
366 * is an MSA-observer and locally control consistent (lcc) for the marked language of the given generator.
394 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
403 extern FAUDES_API Int calcMSAObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
409 * Computation of the dynamic system for Delta_occ (fulfillment of the output control consistency property).
410 * This function computes the part of the dynamic system that is needed for evaluating the observer
426 void calculateDynamicSystemOCC(const Generator& rGen, EventSet& rControllableEvents, EventSet& rHighAlph, Generator& rGenDyn);
432 * This algorithm extends the given high-level alphabet such that nondeterminism and unobservable
433 * transitions in the quotient automaton computed with the current high-level alphabet are removed.
449 extern FAUDES_API void ExtendHighAlphabet(const Generator& rGenObs, EventSet& rHighAlph, std::map<Idx,Idx>& rMapStateToPartition);
453 * Check if the current alphabet splits all local automata with nondeterminims or unobservable transitions.
454 * This algorithm verifies if nondetermisisms or unobservable transitions are resolved if the given events in
470 extern FAUDES_API bool CheckSplit(const Generator& rGenObs, const EventSet& rSplitAlphabet, const std::vector<std::pair<StateSet, Idx> >& rNondeterministicStates, Idx entryState);
473 // ================================================================================================
474 // Functions that modify the alphabet/transitions of the generator to achieve the observer property
475 // ================================================================================================
483 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
500 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
511 * <tr> <td> Result of calcAbstAlphClosed(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
512 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
518 extern FAUDES_API void calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
522 * This function is called by calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
524 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
543 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
545 extern FAUDES_API void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
549 * This function is called by void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
551 * such that the resulting natural projection is an Lm-observer for the prefix-closed language of
557 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
572 extern FAUDES_API void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
595 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
606 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
607 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
613 extern FAUDES_API void calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
617 * This function is called by calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
638 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
640 extern FAUDES_API void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
644 * This function is called by void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
652 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
667 extern FAUDES_API void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
675 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
689 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
700 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
701 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
707 extern FAUDES_API void calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
711 * This function is called by calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
716 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
732 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
734 void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
738 * This function is called by void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
743 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
746 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
761 extern FAUDES_API void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
773 // * K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory
787 // * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
798 // * <tr> <td> Result of calcAbstAlphObsOCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
799 // * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_3, bNewHLevent_2,
806 // void calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx*/,std::set<Idx > > & rMapRelabeledEvents);
811 * This function is called by calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
823 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
838 void calcAbstAlphObsOCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
865 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
876 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
877 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
884 extern FAUDES_API void calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
888 * This function is called by calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
900 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
915 extern FAUDES_API void calcAbstAlphObsLCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
942 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
953 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
954 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
961 extern FAUDES_API void calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
965 * This function is called by calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
978 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
993 extern FAUDES_API void calcAbstAlphMSALCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
997 * This function checks the termination criterion of the observer algorithm. If required, transitions of
1000 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenRelabel.
1018 bool relabel(Generator& rGenRelabel, EventSet& rControllableEvents, EventSet& rHighAlph, std::map<Idx,Idx>& rMapStateToPartition, std::map<Transition,Transition>& rMapChangedTransReverse, std::map<Transition,Idx>& rMapChangedTrans, std::map<Idx, EventSet>& rMapRelabeledEvents);
1026 * Technical note: This version records newly inserted events incl. their respective controllability attribute
1038 extern FAUDES_API void insertRelabeledEvents(System& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents, Alphabet& rNewEvents);
1045 * Technical note: Recording of new events includes attributes, provided that the third parameter has a
1057 extern FAUDES_API void insertRelabeledEvents(Generator& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents, EventSet& rNewEvents);
1070 extern FAUDES_API void insertRelabeledEvents(System& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
1084 void insertRelabeledEvents(Generator& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
1131 extern FAUDES_API void insertRelabeledEvents(Generator& rGenPlant, const EventRelabelMap& rMapRelabeledEvents, EventSet& rNewEvents);
1136 extern FAUDES_API void insertRelabeledEvents(Generator& rGenPlant, const EventRelabelMap& rMapRelabeledEvents);
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase) faudes type declaration macro Definition: cfl_types.h:867 Rti convenience wrapper for relabeling maps. Definition: op_observercomputation.h:1097 std::map< Idx, std::set< Idx > > mMap Definition: op_observercomputation.h:1114 Base class of all libFAUDES objects that participate in the run-time interface. Definition: cfl_types.h:239 Includes all libFAUDES headers, no plugins. TTransSet< TransSort::X2EvX1 > TransSetX2EvX1 Type definition for x2, ev, x1 sorted TTransSet. Definition: cfl_transset.h:966 vGenerator Generator Plain generator, api typedef for generator with no attributes. Definition: cfl_generator.h:3240 void calcAbstAlphObsLCC(System &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents) Lm-observer computation including local control consistency (LCC). Definition: op_observercomputation.cpp:1171 void calcAbstAlphObs(System &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents) Lm-observer computation. Definition: op_observercomputation.cpp:746 void calcAbstAlphMSA(System &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents) MSA-observer computation. Definition: op_observercomputation.cpp:825 Int calcMSAObserverLCC(const Generator &rGen, const EventSet &rControllableEvents, EventSet &rHighAlph) MSA-observer computation including local control consistency (LCC) by adding events to the high-level... Definition: op_observercomputation.cpp:497 void calcAbstAlphClosed(System &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents) L(G)-observer computation. Definition: op_observercomputation.cpp:667 Idx calcClosedObserver(const Generator &rGen, EventSet &rHighAlph) L(G)-observer computation by adding events to the high-level alphabet. Definition: op_observercomputation.cpp:413 void calcAbstAlphMSALCC(System &rGenObs, EventSet &rHighAlph, EventSet &rNewHighAlph, map< Idx, set< Idx > > &rMapRelabeledEvents) MSA-observer computation including local control consistency (LCC). Definition: op_observercomputation.cpp:1245 Int calcNaturalObserverLCC(const Generator &rGen, const EventSet &rControllableEvents, EventSet &rHighAlph) Lm(G)-observer computation including local control consistency (LCC) by adding events to the high-lev... Definition: op_observercomputation.cpp:454 void ExtendHighAlphabet(const Generator &rGen, EventSet &rHighAlph, map< Idx, Idx > &rMapStateToPartition) Extension of the high-level alphabet to achieve the Lm-observer property. Definition: op_observercomputation.cpp:520 Int calcNaturalObserver(const Generator &rGen, EventSet &rHighAlph) Lm(G)-observer computation by adding events to the high-level alphabet. Definition: op_observercomputation.cpp:433 Int calcMSAObserver(const Generator &rGen, EventSet &rHighAlph) MSA-observer computation by adding events to the high-level alphabet. Definition: op_observercomputation.cpp:476 bool recursiveCheckMSABackward(const Generator &rGen, const TransSetX2EvX1 &rRevTransSet, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates) Check if the msa-observer conditions is fulfilled for a given state. Definition: op_observercomputation.cpp:278 void recursiveCheckLCC(const TransSetX2EvX1 &rRevTransSet, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates) Find states that fulfill the lcc condition. Definition: op_observercomputation.cpp:387 void calculateDynamicSystemMSA(const Generator &rGen, EventSet &rHighAlph, Generator &rGenDyn) Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property). Definition: op_observercomputation.cpp:195 void calculateDynamicSystemClosedObs(const Generator &rGen, EventSet &rHighAlph, Generator &rGenDyn) Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-... Definition: op_observercomputation.cpp:46 void calculateDynamicSystemLCC(const Generator &rGen, const EventSet &rControllableEvents, const EventSet &rHighAlph, Generator &rGenDyn) Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency propert... Definition: op_observercomputation.cpp:303 void insertRelabeledEvents(System &rGenPlant, const map< Idx, set< Idx > > &rMapRelabeledEvents, Alphabet &rNewEvents) Convenience function for relabeling events in a given generator. Definition: op_observercomputation.cpp:1848 bool CheckSplit(const Generator &rGen, const EventSet &rSplitAlphabet, const vector< pair< StateSet, Idx > > &rNondeterministicStates, Idx entryState) Definition: op_observercomputation.cpp:634 bool recursiveCheckMSAForward(const Generator &rGen, const EventSet &rHighAlph, Idx currentState, StateSet &rDoneStates) Check if the msa-observer conditions is fulfilled for a given state. Definition: op_observercomputation.cpp:252 bool relabel(Generator &rGenRelabel, EventSet &rControllableEvents, EventSet &rHighAlph, map< Idx, Idx > &rMapStateToPartition, map< Transition, Transition > &rMapChangedTransReverse, map< Transition, Idx > &rMapChangedTrans, map< Idx, EventSet > &rMapRelabeledEvents) Relabeling algorithm for the computation of an Lm-observer. Definition: op_observercomputation.cpp:1463 long int Int Type definition for integer type (let target system decide, minimum 32bit) Definition: cfl_definitions.h:47 void calculateDynamicSystemObs(const Generator &rGen, EventSet &rHighAlph, Generator &rGenDyn) Computation of the dynamic system for Delta_obs (local reachability of a marked state). Definition: op_observercomputation.cpp:159 libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |