libFAUDES
Sections
Index
|
mtc_observercomputation.hGo to the documentation of this file.00001 /** @file op_observercomputation.h 00002 00003 Methods to compute natural projections that exhibit the obsrver property. 00004 The observer algorithm is elaborated in 00005 K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event 00006 Systems," Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004. 00007 and the natural observer algorithm is presented in 00008 Feng, Lei and Wonham, W., "On the Computation of Natural Observers in Discrete-Event Systems", Discrete Event Dynamic Systems, 2009. 00009 In addition, methods to compute natural projections that exhibit 00010 output control consistency (OCC) and local control consistency (LCC) are provided. See for example 00011 K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory 00012 Control Approaches for Discrete Event Systems," Workshop on Discrete Event Systems, 2008. 00013 */ 00014 00015 /* FAU Discrete Event Systems Library (libfaudes) 00016 00017 Copyright (C) 2006 Bernd Opitz 00018 Exclusive copyright is granted to Klaus Schmidt 00019 00020 This library is free software; you can redistribute it and/or 00021 modify it under the terms of the GNU Lesser General Public 00022 License as published by the Free Software Foundation; either 00023 version 2.1 of the License, or (at your option) any later version. 00024 00025 This library is distributed in the hope that it will be useful, 00026 but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00028 Lesser General Public License for more details. 00029 00030 You should have received a copy of the GNU Lesser General Public 00031 License along with this library; if not, write to the Free Software 00032 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00033 00034 #ifndef FAUDES_MTCOBSERVERVERCOMPUTATION_H 00035 #define FAUDES_MTCOBSERVERVERCOMPUTATION_H 00036 00037 #include "corefaudes.h" 00038 #include "op_include.h" 00039 #include "mtc_generator.h" 00040 //#include "mtc_debug.h" 00041 #include <map> 00042 #include <vector> 00043 #include <stack> 00044 00045 00046 00047 using namespace faudes; 00048 using namespace std; 00049 00050 namespace faudes { 00051 /** 00052 * Calculate a colored natural observer by extending a given high-level alphabet. 00053 * This function extends a given high-level alphabet such that the corresponding natural 00054 * projection becomes a colored observer for a given colored marking generator. 00055 * The function calls the function ExtendHighAlphabet in the Observer plugin. 00056 * 00057 * @param rGen 00058 * input colored marking generator 00059 * @param rHighAlph 00060 * high-level alphabet that is extended towards a colored observer 00061 * @return 00062 * number of states of the high-level colored marking generator 00063 * 00064 * <h4>Example: Computation of an Lm-observer</h4> 00065 * <table border=0> <tr> <td> <table> 00066 * <tr> <td> Original generator </td> </tr> 00067 * <tr> 00068 * <td> @image html tmp_mtc_cb4mh1d1_1_sup.png </td> 00069 * </tr> 00070 * <tr> 00071 * <td> Original high-level alphabet (rHighAlph): cb4-cb12, cb12-cb4, cb11-cb4, cb4-cb11 </td> </tr> 00072 * </table> </td> </tr> <tr> <td> <table width=100%> 00073 * <tr> <td> Result of calcNaturalObserver(rGenObs, rHighAlph); </td> </tr> 00074 * <tr> <td> New high-level alphabet (rNewHighAlph): cb4-cb12, cb12-cb4, cb11-cb4, cb4-cb11, mh1end </td> </tr> 00075 * <tr> <td> @image html tmp_mtc_cb4mh1d1_2.png </td> </tr> 00076 * </table> </td> </tr> </table> 00077 * 00078 * @ingroup MultitaskingPlugin 00079 */ 00080 Idx calcNaturalObserver(const MtcSystem& rGen, EventSet& rHighAlph); 00081 00082 /** 00083 * Lm-observer computation. 00084 * This function modifies a given generator and an associated natural projection 00085 * such that the resulting natural projection is an Lm-observer for the language marked by 00086 * the resulting generator. 00087 * This function evaluates the observer algorithm as described in 00088 * K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," 00089 * Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004. 00090 * 00091 * The alphabet rHighAlph has to be a subset of the alphabet of rGenObs. 00092 * rGenObs must be a deterministic generator. 00093 * There are no further restrictions on parameters. 00094 * 00095 * @param rGenObs 00096 * Low-level generator. It is modified by the algorithm by relabeling transitions and events 00097 * @param rHighAlph 00098 * Initial abstraction alphabet 00099 * @param rNewHighAlph 00100 * Modified abstraction alphabet such that the abstraction is an Lm-observer 00101 * @param rMapRelabeledEvents 00102 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before) 00103 * 00104 * @ingroup ObserverPlugin 00105 */ 00106 void calcAbstAlphObs(MtcSystem& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents); 00107 00108 /** 00109 * Lm-observer computation. 00110 * This function is called by calcAbstAlphObs(System& rGenObs, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). 00111 * It modifies a given generator and an associated natural projection 00112 * such that the resulting natural projection is an Lm-observer for the language marked by 00113 * the resulting generator. 00114 * This function evaluates the observer algorithm as described in 00115 * K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," 00116 * Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004. 00117 * 00118 * the alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs 00119 * rGenObs must be a deterministic generator 00120 * no further restrictions on parameters. 00121 * 00122 * @param rGenObs 00123 * Low-level generator. It is modified by the algorithm by relabeling transitions and events 00124 * @param rControllableEvents 00125 * Set of controllable events 00126 * @param rHighAlph 00127 * Initial abstraction alphabet 00128 * @param rNewHighAlph 00129 * Modified abstraction alphabet such that the abstraction is an Lm-observer 00130 * @param rMapRelabeledEvents 00131 * Maps the original events to sets of newly introduced events (accumulatoive, call clear before) 00132 */ 00133 void calcAbstAlphObs(MtcSystem& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents); 00134 00135 /** 00136 * Lm-observer computation. 00137 * This function is called by void calcAbstAlphObs(Generator& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Idx, set<Idx> >& rMapRelabeledEvents). 00138 * It modifies a given generator and an associated natural projection 00139 * such that the resulting natural projection is an Lm-observer for the language marked by 00140 * the resulting generator. 00141 * This function evaluates the observer algorithm as described in 00142 * K. C. Wong and W. M. Wonham, "On the Computation of Observers in Discrete Event Systems," 00143 * Discrete Event Dynamic Systems, vol. 14, no. 1, pp. 55-107, 2004. 00144 * 00145 * The alphabets rHighAlph and rControllableEvents have to be subsets of the alphabet of rGenObs. 00146 * rGenObs must be a deterministic generator. 00147 * There are no further restrictions on parameters. 00148 * 00149 * @param rGenObs 00150 * Low-level generator. It is modified by the algorithm by relabeling transitions and events 00151 * @param rControllableEvents 00152 * Set of controllable events 00153 * @param rHighAlph 00154 * Initial abstraction alphabet 00155 * @param rNewHighAlph 00156 * Modified abstraction alphabet such that the abstraction is an Lm-observer 00157 * @param rMapChangedTrans 00158 * Maps the original relabeled transitions to the new events 00159 */ 00160 void calcAbstAlphObs(MtcSystem& rGenObs, EventSet& rControllableEvents, EventSet& rHighAlph, EventSet& rNewHighAlph, map<Transition,Idx>& rMapChangedTrans); 00161 00162 /** 00163 * Computation of the dynamic system for an Lm-observer. 00164 * This function computes the dynamic system that is needed for evaluating the observer 00165 * algorithm. 00166 * 00167 * The alphabet rHighAlph has to be a subset of the alphabet of rGen. 00168 * rGen must be a deterministic generator. 00169 * There are no further restrictions on parameters. 00170 * 00171 * @param rGen 00172 * Generator for which the dynamic system is computed 00173 * @param rHighAlph 00174 * Abstraction alphabet 00175 * @param rGenDyn 00176 * Generator representing the dynamic system 00177 */ 00178 void calculateDynamicSystemObs(const MtcSystem& rGen, EventSet& rHighAlph, Generator& rGenDyn); 00179 00180 00181 } 00182 00183 00184 #endif 00185 |
libFAUDES 2.22s --- 2013.10.07 --- c++ source docu by doxygen