syn_supreduce.h
Go to the documentation of this file.
1 /** @file syn_reduced.h Supervisor Reduction */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2006 Bernd Opitz
6  Copyright (C) 2007 Thomas Moor
7  Exclusive copyright is granted to Klaus Schmidt
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef FAUDES_SUPREDUCE_H
24 #define FAUDES_SUPREDUCE_H
25 
26 #include "corefaudes.h"
27 
28 namespace faudes {
29 
30  /**
31  * Data structure for identifying states in the same coset for supervisor reduction
32  */
39 };
40 
41 /**
42  * Supervisor Reduction algorithm
43  *
44  * Computes a reduced supervisor from a given potentially non-reduced supervisor and the plant.
45  * This algorithm implements the results obtained in
46  *
47  * R. Su and W. M. Wonham. Supervisor Reduction for Discrete-Event Systems.
48  * Discrete Event Dynamic Systems vol. 14, no. 1, January 2004.
49  *
50  * Both, plant and supervisor MUST be deterministic and share the same alphabet!!!
51  *
52  * @param rPlantGen
53  * Plant generator
54  * @param rSupGen
55  * Supervisor generator
56  * @param rReducedSup
57  * Reduced supervisor generator
58  *
59  * @return
60  * True if a reduction was achieved
61  *
62  * @exception Exception
63  * - alphabets of generators don't match (id 100)
64  * - plant nondeterministic (id 201)
65  * - supervisor nondeterministic (id 203)
66  * - plant and supervisor nondeterministic (id 204)
67  *
68  * @ingroup SynthesisPlugIn
69  */
70 bool SupReduce(const System& rPlantGen, const System& rSupGen, System& rReducedSup);
71 
72 
73 /**
74  * Supervisor Reduction mergibility algorithm
75  *
76  * This recursive algorithm determines if two supervisor states can be merged to the same coset.
77  * It is called by the main procedure SupReduce.
78  *
79  * @param stateI
80  * First state to be checked
81  * @param stateJ
82  * second state to be checked
83  * @param rWaitList
84  * list of waiting state pairs
85  * @param cNode
86  * remembers first state to be checked
87  * @param rSupGen
88  * constant reference to supervisor
89  * @param rSupStateInfo
90  * constant reference to state info data structure
91  * @param rState2Class
92  * constant reference to data structure that maps states to their coset
93  * @param rClass2State
94  * constant reference to data structure that maps cosets to their states
95  *
96  * @return
97  * True if the classes of statep and stateq can be merged
98  *
99  */
100 bool CheckMergibility(Idx stateI, Idx stateJ, std::vector<std::set<Idx> >& rWaitList, Idx cNode, const System& rSupGen,
101  const std::map<Idx,ReductionStateInfo>& rSupStateInfo, const std::map<Idx,Idx>& rState2Class, const std::vector<StateSet>& rClass2States);
102 
103 
104 } // namespace faudes
105 
106 #endif

libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen