| |
libFAUDES
Sections
Index
|
op_obserververification.hGo to the documentation of this file.00001 /** @file op_obserververification.h 00002 00003 Methods to verify the obsrver condition for natural projections. 00004 The observer condition is, e.g., defined in 00005 K. C. Wong and W. M. Wonham, “Hierarchical control of discrete-event 00006 systems,” Discrete Event Dynamic Systems: Theory and Applications, 1996. 00007 In addition, methods to verify output control consistency (OCC) and 00008 local control consistency (LCC) are provided. See for example 00009 K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory 00010 Control Approaches for Discrete Event Systems," Workshop on Discrete Event Systems, 2008. 00011 */ 00012 00013 /* FAU Discrete Event Systems Library (libfaudes) 00014 00015 Copyright (C) 2006 Bernd Opitz 00016 Exclusive copyright is granted to Klaus Schmidt 00017 00018 This library is free software; you can redistribute it and/or 00019 modify it under the terms of the GNU Lesser General Public 00020 License as published by the Free Software Foundation; either 00021 version 2.1 of the License, or (at your option) any later version. 00022 00023 This library is distributed in the hope that it will be useful, 00024 but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00026 Lesser General Public License for more details. 00027 00028 You should have received a copy of the GNU Lesser General Public 00029 License along with this library; if not, write to the Free Software 00030 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00031 00032 #include "corefaudes.h" 00033 #include "op_debug.h" 00034 #include "op_observercomputation.h" 00035 #include <map> 00036 #include <vector> 00037 #include <stack> 00038 00039 00040 #ifndef FAUDES_OP_OBSERVERVERIFICATION_H 00041 #define FAUDES_OP_OBSERVERVERIFICATION_H 00042 00043 namespace faudes { 00044 00045 00046 /** 00047 * Verification of the observer property. 00048 * For verifying if a natural projection has the observer property, one step in the observer 00049 * algorithm is evaluated. If the resulting generator equals the input generator, then the 00050 * natural projection on the abstraction alphabet is an observer. 00051 * 00052 * @param rLowGen 00053 * Input generator 00054 * @param rHighAlph 00055 * High level alphabet 00056 * 00057 * @return 00058 * true if the observer property holds 00059 * 00060 * @ingroup ObserverPlugin 00061 * 00062 */ 00063 bool IsObs(const Generator& rLowGen, const EventSet& rHighAlph); 00064 00065 00066 /** 00067 * Verification of output control consistency (OCC). 00068 * For verifying if a natural projection fulfills the output control consistency condition, 00069 * a backward reachability is conducted. If starting from a state, where an uncontrollable 00070 * high-level event is feasible, a controllable event can be reached on a local backward path, 00071 * OCC is violated. 00072 * 00073 * @param rLowGen 00074 * Input cGenerator 00075 * @param rHighAlph 00076 * High level alphabet 00077 * 00078 * @return 00079 * true if OCC holds 00080 * 00081 * @ingroup ObserverPlugin 00082 * 00083 */ 00084 bool IsOCC(const cGenerator& rLowGen, const EventSet& rHighAlph); 00085 00086 /** 00087 * Verification of output control consistency (OCC). 00088 * For verifying if a natural projection fulfills the output control consistency condition, 00089 * a backward reachability is conducted. If starting from a state, where an uncontrollable 00090 * high-level event is feasible, a controllable event can be reached on a local backward path, 00091 * OCC is violated. 00092 * 00093 * @param rLowGen 00094 * Input generator 00095 * @param rControllableEvents 00096 * set of controllable events 00097 * @param rHighAlph 00098 * High level alphabet 00099 * 00100 * @return 00101 * true if OCC holds 00102 * 00103 */ 00104 bool IsOCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph); 00105 00106 /** 00107 * Function that supports the verification of output control consistency (OCC). 00108 * This function performs a backward reachability to find if an uncontrollable 00109 * high-level event is preemted by an uncontrollable low-level event. If this is 00110 * the case, OCC is violated. 00111 * 00112 * @param rLowGen 00113 * Input generator 00114 * @param rControllableEvents 00115 * set of controllable events 00116 * @param rHighAlph 00117 * High level alphabet 00118 * @param currentState 00119 * start state for backward reachability 00120 * 00121 * @return 00122 * true if no controllable low-level event has been found 00123 * 00124 */ 00125 bool backwardVerificationOCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx currentState); 00126 00127 /** 00128 * Verification of local control consistency (LCC). 00129 * For verifying if a natural projection fulfills the local control consistency condition, 00130 * a backward reachability is conducted. If starting from a state, where an uncontrollable 00131 * high-level event is feasible, at least one local state cannot be reached by an uncontrollable path, LCC is violated. 00132 * 00133 * @param rLowGen 00134 * Input cGenerator 00135 * @param rHighAlph 00136 * High level alphabet 00137 * 00138 * @return 00139 * true if LCC holds 00140 * 00141 * @ingroup ObserverPlugin 00142 * 00143 */ 00144 bool IsLCC(const cGenerator& rLowGen, const EventSet& rHighAlph); 00145 00146 /** 00147 * Verification of local control consistency (LCC). 00148 * For verifying if a natural projection fulfills the local control consistency condition, 00149 * a backward reachability is conducted. If starting from a state, where an uncontrollable 00150 * high-level event is feasible, at least one local state cannot be reached by an uncontrollable path, LCC is violated. 00151 * 00152 * @param rLowGen 00153 * Input generator 00154 * @param rControllableEvents 00155 * set of controllable events 00156 * @param rHighAlph 00157 * High level alphabet 00158 * 00159 * @return 00160 * true if LCC holds 00161 * 00162 */ 00163 bool IsLCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph); 00164 00165 /** 00166 * Function that supports the verification of local control consistency (LCC). 00167 * This function performs a recursive backward reachability to find if from a state where 00168 * an uncontrollable high-level event is possible, another state is only reachable 00169 * by local strings that contaion at least one controllable event. If this is 00170 * the case, LCC is violated. 00171 * 00172 * @param rTransSetX2EvX1 00173 * reverse transition relation of the input generator 00174 * @param rControllableEvents 00175 * set of controllable events 00176 * @param rHighAlph 00177 * High level alphabet 00178 * @param exitState 00179 * start state for backward reachability 00180 * @param currentState 00181 * current state for backward reachability 00182 * @param controllablePath 00183 * false if at least one uncontrollable path to the currentState exists 00184 * @param rLocalStatesMap 00185 * map for states and their controllability property 00186 * @param rDoneStates 00187 * states that have already been visited 00188 * 00189 */ 00190 void backwardVerificationLCC(const TransSetX2EvX1& rTransSetX2EvX1, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx exitState, Idx currentState, bool controllablePath, std::map<Idx, bool>& rLocalStatesMap, StateSet& rDoneStates); 00191 00192 00193 00194 /** 00195 * Verification of local control consistency (LCC). 00196 * Rti wrapper. 00197 * 00198 * @param rLowGen 00199 * Input cGenerator 00200 * @param rHighAlph 00201 * High level alphabet 00202 * @param rRes 00203 * Return True if LCC holds 00204 * 00205 * 00206 */ 00207 void IsLCC(const cGenerator& rLowGen, const EventSet& rHighAlph, bool rRes); 00208 00209 /** 00210 * Verification of the observer property. 00211 * Rti wrapper. 00212 * 00213 * @param rLowGen 00214 * Input cGenerator 00215 * @param rHighAlph 00216 * High level alphabet 00217 * @param rRes 00218 * Return True if LCC holds 00219 * 00220 * 00221 */ 00222 void IsObs(const cGenerator& rLowGen, const EventSet& rHighAlph, bool rRes); 00223 00224 00225 00226 } // namespace faudes 00227 00228 00229 00230 #endif 00231 |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6