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
50 // ================================================================================================
53 // ================================================================================================
57 * Computation of the dynamic system for Delta_sigma (reachable states after the occurrence of one high-level event).
58 * This function computes the part of the dynamic system that is needed for evaluating the observer
72 void calculateDynamicSystemClosedObs(const Generator& rGen, EventSet& rHighAlph, Generator& rGenDyn);
76 * This function computes the part of the dynamic system that is needed for evaluating the observer
93 * Computation of the dynamic system for Delta_msa (local fulfillment of the msa-observer property).
94 * This function computes the part of the dynamic system that is needed for evaluating the observer
130 bool recursiveCheckMSAForward(const Generator& rGen, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
154 bool recursiveCheckMSABackward(const Generator& rGen, const TransSetX2EvX1& rRevTransSet, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
157 * Computation of the dynamic system for Delta_lcc (fulfillment of the local control consistency property).
158 * This function computes the part of the dynamic system that is needed for evaluating the observer
174 void calculateDynamicSystemLCC(const Generator& rGen, const EventSet& rControllableEvents, const EventSet& rHighAlph, Generator& rGenDyn);
198 void recursiveCheckLCC(const TransSetX2EvX1& rRevTransSet, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx currentState, StateSet& rDoneStates);
200 // ================================================================================================
202 // ================================================================================================
283 * Lm(G)-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
285 * is an Lm(G)-observer and locally control consistent (lcc) for the marked language of the given generator.
312 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
314 * <tr> <td> Result of calcNaturalObserverLCC(rGenObs, rControllableEvents, rHighAlph); </td> </tr>
315 * <tr> <td> New high-level alphabet (rHighAlph): alpha, beta, gamma, delta, a, e, f, g, h </td> </tr>
321 Int calcNaturalObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
362 * MSA-observer computation including local control consistency (LCC) by adding events to the high-level alphabet.
364 * is an MSA-observer and locally control consistent (lcc) for the marked language of the given generator.
392 * <td> Original high-level alphabet (rHighAlph): alpha, gamma; controllable events: a, f, g, h </td> </tr>
401 Int calcMSAObserverLCC(const Generator& rGen, const EventSet& rControllableEvents, EventSet& rHighAlph);
407 * Computation of the dynamic system for Delta_occ (fulfillment of the output control consistency property).
408 * This function computes the part of the dynamic system that is needed for evaluating the observer
424 void calculateDynamicSystemOCC(const Generator& rGen, EventSet& rControllableEvents, EventSet& rHighAlph, Generator& rGenDyn);
430 * This algorithm extends the given high-level alphabet such that nondeterminism and unobservable
431 * transitions in the quotient automaton computed with the current high-level alphabet are removed.
447 void ExtendHighAlphabet(const Generator& rGenObs, EventSet& rHighAlph, std::map<Idx,Idx>& rMapStateToPartition);
450 * Check if the current alphabet splits all local automata with nondeterminims or unobservable transitions.
451 * This algorithm verifies if nondetermisisms or unobservable transitions are resolved if the given events in
467 bool CheckSplit(const Generator& rGenObs, const EventSet& rSplitAlphabet, const std::vector<std::pair<StateSet, Idx> >& rNondeterministicStates, Idx entryState);
470 // ================================================================================================
471 // Functions that modify the alphabet/transitions of the generator to achieve the observer property
472 // ================================================================================================
480 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
497 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
508 * <tr> <td> Result of calcAbstAlphClosed(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
509 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
515 void calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
519 * This function is called by calcAbstAlphClosed(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
521 * such that the resulting natural projection is an L(G)-observer for the prefix-closed language of
540 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
542 void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
546 * This function is called by void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
548 * such that the resulting natural projection is an Lm-observer for the prefix-closed language of
554 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
569 void calcAbstAlphClosed(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
592 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
603 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
604 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
610 void calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
614 * This function is called by calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
635 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
637 void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
641 * This function is called by void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
649 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
664 void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
672 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
686 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
697 * <tr> <td> Result of calcAbstAlphObs(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
698 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, aNewHLevent_1, eNewHLevent_1, hNewHLevent_1 </td> </tr>
704 void calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
708 * This function is called by calcAbstAlphMSA(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
713 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
729 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
731 void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
735 * This function is called by void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents).
740 * K. Schmidt and Th. Moor, "Marked String Accepting Observers for the Hierarchical and Decentralized Control of Discrete Event Systems,"
743 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
758 void calcAbstAlphMSA(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
784 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
795 * <tr> <td> Result of calcAbstAlphObsOCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
796 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_3, bNewHLevent_2,
803 // void calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx*/,std::set<Idx > > & rMapRelabeledEvents);
808 * This function is called by calcAbstAlphObsOCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
820 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
835 void calcAbstAlphObsOCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
862 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
873 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
874 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
881 void calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
885 * This function is called by calcAbstAlphObsLCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
897 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
912 void calcAbstAlphObsLCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
939 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before)
950 * <tr> <td> Result of calcAbstAlphObsLCC(rGenObs, rHighAlph, rNewHighAlph, rMapRelabeledEvents); </td> </tr>
951 * <tr> <td> New high-level alphabet (rNewHighAlph): alpha, beta, gamma, d, f, h, aNewHLevent_2, bNewHLevent_1,
958 void calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Idx,std::set<Idx > > & rMapRelabeledEvents);
962 * This function is called by calcAbstAlphMSALCC(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx,set<Idx > > & rMapRelabeledEvents).
975 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs.
990 void calcAbstAlphMSALCC(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, std::map<Transition,Idx>& rMapChangedTrans);
994 * This function checks the termination criterion of the observer algorithm. If required, transitions of
997 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenRelabel.
1015 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);
1023 * Technical note: This version records newly inserted events incl. their respective controllability attribute
1035 void insertRelabeledEvents(System& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents, Alphabet& rNewEvents);
1042 * Technical note: Recording of new events includes attributes, provided that the third parameter has a
1054 void insertRelabeledEvents(Generator& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents, EventSet& rNewEvents);
1067 void insertRelabeledEvents(System& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
1081 void insertRelabeledEvents(Generator& rGenPlant, const std::map<Idx, std::set<Idx> >& rMapRelabeledEvents);
1128 void insertRelabeledEvents(Generator& rGenPlant, const EventRelabelMap& rMapRelabeledEvents, EventSet& rNewEvents);
libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen |