|
libFAUDES
Sections
Index
|
mtc_obserververification.cppGo to the documentation of this file.00001 /** @file mtc_obserververification.cpp 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 "mtc_obserververification.h" 00033 00034 00035 namespace faudes { 00036 00037 bool IsMtcObs(const mtcGenerator& rLowGen, const EventSet& rHighAlph){ 00038 OP_DF("IsMtcObs(" << rLowGen.Name() << "," << rHighAlph.Name() << ")"); 00039 // Initialization of variables 00040 EventSet newHighAlph = rHighAlph; 00041 EventSet controllableEvents; 00042 std::map<Transition,Idx> mapChangedTrans; 00043 Generator genDyn(rLowGen); 00044 std::map<Transition,Transition> mapChangedTransReverse; 00045 std::vector<Idx> newPartitions; 00046 std::map<Idx,Idx> mapStateToPartition; 00047 std::map<Idx, EventSet> mapRelabeledEvents; 00048 bool observer; 00049 // One step of the observer algorithm: A dynamic system is computed that fulfills the one-step observer condition. 00050 // if the result is equal to the original generator, then the natural projection on the high-level alphabet fulfills the observer property 00051 calculateDynamicSystemObs(rLowGen, newHighAlph, genDyn); 00052 Generator genPart; 00053 // compute coarsest quasi-congruence on the dynamic system 00054 calcBisimulation(genDyn, mapStateToPartition, genPart, newPartitions); 00055 // check if quotient automaton is deterministic and free of unobservable events 00056 // and relabel transitions in rLowGen if necessary. The high-level alphabet is modified accordingly 00057 Generator genObs(rLowGen); 00058 observer=relabel(genObs, controllableEvents, newHighAlph, newPartitions, mapStateToPartition, mapChangedTransReverse, mapChangedTrans, mapRelabeledEvents); 00059 // return the result of the relabeling 00060 return observer; 00061 00062 } 00063 00064 00065 }// namespace faudes |
libFAUDES 2.18b --- 2010-12-17 --- c++ source docu by doxygen 1.6.3