About
User Reference
C++ API
luafaudes
Developer
Links
libFAUDES online
libFAUDES

Sections

Index

syn_wsupcon.h

Go to the documentation of this file.
00001 /** @file syn_wsupcon.h Supremal controllable sublanguage for infinite time behaviours */
00002 
00003 /* FAU Discrete Event Systems Library (libfaudes)
00004 
00005    Copyright (C) 2010  Thomas Moor
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with this library; if not, write to the Free Software
00019    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00020 
00021  
00022 #ifndef FAUDES_WSUPCON_H
00023 #define FAUDES_WSUPCON_H
00024 
00025 #include "corefaudes.h"
00026 #include <stack>
00027 
00028 namespace faudes {
00029     
00030 
00031 
00032 
00033 /**
00034  * Test omega controllability
00035  *
00036  * Tests whether the candidate supervisor H is omega controllable w.r.t.
00037  * the plant G. This implementation invokes IsControllable and IsRelativelyOmegaClosed.
00038  * A future implementation may be more efficient.
00039  * 
00040  * Parameter restrictions: both generators must be deterministic, omega-trim and 
00041  * have the same alphabet.
00042  *
00043  *
00044  * @param rPlantGen
00045  *   Plant G
00046  * @param rCAlph
00047  *   Controllable events
00048  * @param rSupCandGen
00049  *   Supervisor candidate H
00050  *
00051  * @exception Exception
00052  *   - Alphabets of generators don't match (id 100)
00053  *   - Arguments are not omega trim (id 201, only if FAUDES_CHECKED is set)
00054  *   - Arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00055  *
00056  * @return 
00057  *   true / false
00058  *
00059  * @ingroup SynthesisPlugIn
00060  */
00061 bool IsOmegaControllable(
00062   const Generator& rPlantGen, 
00063   const EventSet&  rCAlph, 
00064   const Generator& rSupCandGen);
00065 
00066 
00067 /**
00068  * Test omega-controllability. 
00069  *
00070  * Tests whether the candidate supervisor h is omega controllable w.r.t.
00071  * the plant g; this is a System wrapper for IsOmegaControllable.
00072  *
00073  * @param rPlantGen
00074  *   Plant g generator
00075  * @param rSupCandGen
00076  *   Supervisor candidate h generator 
00077  *
00078  * @exception Exception
00079  *   - Alphabets of generators don't match (id 100)
00080  *   - Arguments are not omega trim (id 201, only if FAUDES_CHECKED is set)
00081  *   - Arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00082  *
00083  * @return 
00084  *   true / false
00085  *
00086  * @ingroup SynthesisPlugIn
00087  */
00088 bool IsOmegaControllable(
00089   const System& rPlantGen, 
00090   const Generator& rSupCandGen);
00091 
00092 
00093 /**
00094  * Supremal controllable and complete sublanguage
00095  *
00096  *
00097  * Given a plant and a specification, this function computes a realisation of 
00098  * the supremal controllable and complete sublange. This version consideres the
00099  * generated languages (ignores the marking). In particular, this implies that
00100  * the result is prefix closed. It is returned as generated language.
00101  * 
00102  * Starting with a product composition of plant and specification, the implementation
00103  * iteratively remove states that either contradict controllability or completeness.
00104  * Removal of states is continued until no contradicting states are left. 
00105  * Thus, the result is indeed controllable and complete. The algorithm was
00106  * proposed in 
00107  *
00108  * R. Kumar, V. Garg, and S.I. Marcus. On supervisory control of
00109  * sequential behaviors. IEEE Transactions on Automatic Control,
00110  * Vol. 37: pp.1978-1985, 1992.
00111  *
00112  * The paper proves supremality of the result. Provided that the corresponding 
00113  * omega language of the specification is closed, the result of the above algorithm 
00114  * also realises the least restrictive closed loop behaviour of the corresponding 
00115  * omega language control problem.
00116  *
00117  * Parameter restrictions: both generators must be deterministic and 
00118  * have the same alphabet. The result will be accessible and deterministic.
00119  *
00120  *
00121  * @param rPlantGen
00122  *   Plant G
00123  * @param rCAlph
00124  *   Controllable events
00125  * @param rSpecGen
00126  *   Specification Generator E
00127  * @param rResGen
00128  *   Reference to resulting Generator
00129  *
00130  * @exception Exception
00131  *   - alphabets of generators don't match (id 100)
00132  *   - plant nondeterministic (id 201)
00133  *   - spec nondeterministic (id 203)
00134  *   - plant and spec nondeterministic (id 204)
00135  *
00136  * @ingroup SynthesisPlugIn
00137  *
00138  */
00139 void SupConComplete(
00140   const Generator& rPlantGen, 
00141   const EventSet&  rCAlph,
00142   const Generator& rSpecGen, 
00143   Generator& rResGen);
00144 
00145 
00146 
00147 /**
00148  * Supremal controllable and complete sublanguage.
00149  *
00150  * This is the RTI wrapper for   
00151  * SupConComplete(const Generator&, const EventSet&, const Generator&, Generator&).
00152  * Controllability attributes are taken from the plant argument.
00153  * If the result is specified as a System, attributes will be copied
00154  * from the plant argument.
00155  *
00156  *
00157  * @param rPlantGen
00158  *   Plant System
00159  * @param rSpecGen
00160  *   Specification Generator
00161  * @param rResGen
00162  *   Reference to resulting Generator
00163  *
00164  * @exception Exception
00165  *   Alphabets of generators don't match (id 100)
00166  *   plant nondeterministic (id 201)
00167  *   spec nondeterministic (id 203)
00168  *   plant and spec nondeterministic (id 204)
00169  *
00170  * @ingroup SynthesisPlugIn
00171  */
00172 void SupConComplete(
00173   const System& rPlantGen, 
00174   const Generator& rSpecGen, 
00175   Generator& rResGen);
00176 
00177 
00178 /**
00179  * Supremal controllable and complete sublanguage
00180  *
00181  *
00182  * Given a plant and a specigfication, this function computes a realisation of 
00183  * the supremal controllable and complete sublange. This version consideres the
00184  * marked languages. 
00185  *
00186  * Starting with a product composition of plant and specification, the implementation
00187  * iteratively remove states that contradict controllability  or completeness or that
00188  * are not coaccessible. Removal of states is continued until no contradicting states are left. 
00189  * Thus, the result is indeed controllable, complete and coaccessible. 
00190  *
00191  * Considering the marked languages implies that only strings that simultanuosly 
00192  * reach a marking can survive the above procedure. From an omega-languages perspective, 
00193  * this is of limited use. However, in the special situation that the specification
00194  * is relatively closed w.r.t. the plant, we can replace the specification by its
00195  * prefix closure befor invoking SupConComlpleteNB. In this situation we claim that
00196  * the procedure returns a realisation of the the least restrictive closed loop behaviour 
00197  * of the corresponding omega language control problem. 
00198  *
00199  *
00200  * @param rPlantGen
00201  *   Plant G
00202  * @param rCAlph
00203  *   Controllable events
00204  * @param rSpecGen
00205  *   Specification Generator E
00206  * @param rResGen
00207  *   Reference to resulting Generator
00208  *
00209  * @exception Exception
00210  *   - alphabets of generators don't match (id 100)
00211  *   - plant nondeterministic (id 201)
00212  *   - spec nondeterministic (id 203)
00213  *   - plant and spec nondeterministic (id 204)
00214  *
00215  * @ingroup SynthesisPlugIn
00216  *
00217  */
00218 void SupConCompleteNB(
00219   const Generator& rPlantGen, 
00220   const EventSet&  rCAlph,
00221   const Generator& rSpecGen, 
00222   Generator& rResGen);
00223 
00224 
00225 
00226 /**
00227  * Supremal controllable and complete sublanguage.
00228  *
00229  * This is the RTI wrapper for   
00230  * SupConCompleteNB(const Generator&, const EventSet&, const Generator&, Generator&).
00231  * Controllability attributes are taken from the plant argument.
00232  * If the result is specified as a System, attributes will be copied
00233  * from the plant argument.
00234  *
00235  *
00236  * @param rPlantGen
00237  *   Plant System
00238  * @param rSpecGen
00239  *   Specification Generator
00240  * @param rResGen
00241  *   Reference to resulting Generator
00242  *
00243  * @exception Exception
00244  *   Alphabets of generators don't match (id 100)
00245  *   plant nondeterministic (id 201)
00246  *   spec nondeterministic (id 203)
00247  *   plant and spec nondeterministic (id 204)
00248  *
00249  * @ingroup SynthesisPlugIn
00250  */
00251 void SupConCompleteNB(
00252   const System& rPlantGen, 
00253   const Generator& rSpecGen, 
00254   Generator& rResGen);
00255 
00256 
00257 
00258 
00259 /**
00260  * Omega-synthesis (experimental)
00261  *
00262  * This function is experimental and perhaps not functional.
00263  * In the long term it may synthesise supervisors for omega-languages.
00264  *
00265  * Parameter restrictions: both generators must be deterministic and 
00266  * have the same alphabet.
00267  *
00268  *
00269  * @param rPlantGen
00270  *   Plant G
00271  * @param rCAlph
00272  *   Controllable events
00273  * @param rSpecGen
00274  *   Specification Generator E
00275  * @param rResGen
00276  *   Reference to resulting Generator, the
00277  *   minimal restrictive nonblocking supervisor
00278  *
00279  * @exception Exception
00280  *   - alphabets of generators don't match (id 100)
00281  *   - plant nondeterministic (id 201)
00282  *   - spec nondeterministic (id 203)
00283  *   - plant and spec nondeterministic (id 204)
00284  *
00285  * @ingroup SynthesisPlugIn
00286  *
00287  */
00288 void OmegaSupConNB(
00289   const Generator& rPlantGen, 
00290   const EventSet&  rCAlph,
00291   const Generator& rSpecGen, 
00292   Generator& rResGen);
00293 
00294 
00295 
00296 /**
00297  * Omega-synthesis (experimental)
00298  *
00299  * This function is experimental and perhaps not functional.
00300  * In the long term it may synthesise supervisors for omega-languages.
00301  *
00302  * This is the RTI wrapper for   
00303  * OmegaSupConNB(const Generator&, const EventSet&, const Generator&, Generator&).
00304  * Controllability attributes are taken from the plant argument.
00305  * If the result is specified as a System, attributes will be copied
00306  * from the plant argument.
00307  *
00308  *
00309  * @param rPlantGen
00310  *   Plant System
00311  * @param rSpecGen
00312  *   Specification Generator
00313  * @param rResGen
00314  *   Reference to resulting Generator, the
00315  *   minimal restrictive nonblocking supervisor
00316  *
00317  * @exception Exception
00318  *   Alphabets of generators don't match (id 100)
00319  *   plant nondeterministic (id 201)
00320  *   spec nondeterministic (id 203)
00321  *   plant and spec nondeterministic (id 204)
00322  *
00323  * @ingroup SynthesisPlugIn
00324  */
00325 void OmegaSupConNB(
00326   const System& rPlantGen, 
00327   const Generator& rSpecGen, 
00328   Generator& rResGen);
00329 
00330 
00331 
00332 
00333 
00334 } // namespace faudes
00335 
00336 #endif 
00337 
00338 

libFAUDES 2.20s --- 2011.10.12 --- c++ source docu by doxygen