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
51 // ================================================================================================
54 // ================================================================================================
58 * Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-level event).
59 * This function computes the part of the dynamic system that is needed for evaluating the observer
73 void calculateDynamicSystemClosedObs(const Generator& rGen, EventSet& rHighAlph, Generator& rGenDyn);
77 * This function computes the part of the dynamic system that is needed for evaluating the observer
94 * Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property).
95 * This function computes the part of the dynamic system that is needed for evaluating the observer
131 bool recursiveCheckMSAForward(const Generator& rGen, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
155 bool recursiveCheckMSABackward(const Generator& rGen, const TransSetX2EvX1& rRevTransSet, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
158 * Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency property).
159 * This function computes the part of the dynamic system that is needed for evaluating the observer
175 void calculateDynamicSystemLCC(const Generator& rGen, const EventSet& rControllableEvents, const EventSet& rHighAlph, Generator& rGenDyn);
199 void recursiveCheckLCC(const TransSetX2EvX1& rRevTransSet, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
201 // ================================================================================================
203 // ================================================================================================
284 * Lm(G)-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
286 * is an Lm(G)-observer and locally control consistent (lcc) for the marked language of the given generator.
313 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
315 * <tr> <td> Result of calcNaturalObserverLCC(rGenObs, rControllableEvents, rHighAlph); </td> </tr>
316 * <tr> <td> New high-level alphabet (rHighAlph): alpha, beta, gamma, delta, a, e, f, g, h </td> </tr>
322 Int calcNaturalObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
363 * MSA-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
365 * is an MSA-observer and locally control consistent (lcc) for the marked language of the given generator.
393 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
402 Int calcMSAObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
408 * Computation of the dynamic system for Delta_occ (fulfillment of the output control consistency property).
409 * This function computes the part of the dynamic system that is needed for evaluating the observer
425 void calculateDynamicSystemOCC(const Generator& rGen, EventSet& rControllableEvents, EventSet& rHighAlph, Generator& rGenDyn);
431 * This algorithm extends the given high-level alphabet such that nondeterminism and unobservable
432 * transitions in the quotient automaton computed with the current high-level alphabet are removed.
448 void ExtendHighAlphabet(const Generator& rGenObs, EventSet& rHighAlph, std::map<Idx,Idx>& rMapStateToPartition);
451 * Check if the current alphabet splits all local automata with nondeterminims or unobservable transitions.
452 * This algorithm verifies if nondetermisisms or unobservable transitions are resolved if the given events in
468 bool CheckSplit(const Generator& rGenObs, const EventSet& rSplitAlphabet, const std::vector<std::pair<StateSet, Idx> >& rNondeterministicStates, Idx entryState);
471 // ================================================================================================
472 // Functions that modify the alphabet/transitions of the generator to achieve the observer property
473 // ================================================================================================
481 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
498 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
509 * <tr> <td> Result of calcAbstAlphClosed(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
510 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
516 void calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
520 * This function is called by calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
522 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
541 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
543 void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
547 * This function is called by void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
549 * such that the resulting natural projection is an Lm-observer for the prefix-closed language of
555 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
570 void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
593 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
604 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
605 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
611 void calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
615 * This function is called by calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
636 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
638 void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
642 * This function is called by void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
650 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
665 void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
673 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
687 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
698 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
699 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
705 void calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
709 * This function is called by calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
714 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
730 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
732 void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
736 * This function is called by void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
741 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
744 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
759 void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
785 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
796 * <tr> <td> Result of calcAbstAlphObsOCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
797 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_3, bNewHLevent_2,
804 // void calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx*/,std::set<Idx > > & rMapRelabeledEvents);
809 * This function is called by calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
821 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
836 void calcAbstAlphObsOCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
863 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
874 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
875 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
882 void calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
886 * This function is called by calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
898 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
913 void calcAbstAlphObsLCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
940 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
951 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
952 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
959 void calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
963 * This function is called by calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
976 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
991 void calcAbstAlphMSALCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
995 * This function checks the termination criterion of the observer algorithm. If required, transitions of
998 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenRelabel.
1008 * Vector containing the indices of the equivalence classes that partition the state space of rGenRelabel
1010 * Maps each state of rGenRelabel to an equivalence class that must also be contained in rNewPartitions
1018 bool relabel(Generator& rGenRelabel, EventSet& rControllableEvents, EventSet& rHighAlph, std::vector<Idx>& rNewPartitions, 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 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 void insertRelabeledEvents(Generator& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents, EventSet& rNewEvents);
1070 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 void insertRelabeledEvents(Generator& rGenPlant, const EventRelabelMap& rMapRelabeledEvents, EventSet& rNewEvents);
libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen |