syn_wsupcon.hGo 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 * Given a plant and a specification, this function computes a realisation of 00097 * the supremal controllable and complete sublange. This version consideres the 00098 * generated languages (ignores the marking). In particular, this implies that 00099 * the result is prefix closed. It is returned as generated language. 00100 * 00101 * Starting with a product composition of plant and specification, the implementation 00102 * iteratively remove states that either contradict controllability or completeness. 00103 * Removal of states is continued until no contradicting states are left. 00104 * Thus, the result is indeed controllable and complete. The algorithm was 00105 * proposed in 00106 * 00107 * R. Kumar, V. Garg, and S.I. Marcus. On supervisory control of 00108 * sequential behaviors. IEEE Transactions on Automatic Control, 00109 * Vol. 37: pp.1978-1985, 1992. 00110 * 00111 * The paper proves supremality of the result. Provided that the corresponding 00112 * omega language of the specification is closed, the result of the above algorithm 00113 * also realises the least restrictive closed loop behaviour of the corresponding 00114 * omega language control problem. 00115 * 00116 * Parameter restrictions: both generators must be deterministic and 00117 * have the same alphabet. The result will be accessible and deterministic. 00118 * 00119 * 00120 * @param rPlantGen 00121 * Plant G 00122 * @param rCAlph 00123 * Controllable events 00124 * @param rSpecGen 00125 * Specification Generator E 00126 * @param rResGen 00127 * Reference to resulting Generator 00128 * 00129 * @exception Exception 00130 * - alphabets of generators don't match (id 100) 00131 * - plant nondeterministic (id 201) 00132 * - spec nondeterministic (id 203) 00133 * - plant and spec nondeterministic (id 204) 00134 * 00135 * @ingroup SynthesisPlugIn 00136 * 00137 */ 00138 void SupConCmplClosed( 00139 const Generator& rPlantGen, 00140 const EventSet& rCAlph, 00141 const Generator& rSpecGen, 00142 Generator& rResGen); 00143 00144 00145 00146 /** 00147 * Supremal controllable and complete sublanguage. 00148 * 00149 * This is the RTI wrapper for 00150 * SupConCmplClosed(const Generator&, const EventSet&, const Generator&, Generator&). 00151 * Controllability attributes are taken from the plant argument. 00152 * If the result is specified as a System, attributes will be copied 00153 * from the plant argument. 00154 * 00155 * 00156 * @param rPlantGen 00157 * Plant System 00158 * @param rSpecGen 00159 * Specification Generator 00160 * @param rResGen 00161 * Reference to resulting Generator 00162 * 00163 * @exception Exception 00164 * Alphabets of generators don't match (id 100) 00165 * plant nondeterministic (id 201) 00166 * spec nondeterministic (id 203) 00167 * plant and spec nondeterministic (id 204) 00168 * 00169 * @ingroup SynthesisPlugIn 00170 */ 00171 void SupConCmplClosed( 00172 const System& rPlantGen, 00173 const Generator& rSpecGen, 00174 Generator& rResGen); 00175 00176 00177 /** 00178 * Supremal controllable and complete sublanguage 00179 * 00180 * 00181 * Given a plant and a specification, this function computes a realisation of 00182 * the supremal controllable and complete sublange. This version consideres the 00183 * marked languages. 00184 * 00185 * Starting with a product composition of plant and specification, the implementation 00186 * iteratively remove states that contradict controllability or completeness or that 00187 * are not coaccessible. Removal of states is continued until no contradicting states are left. 00188 * Thus, the result is indeed controllable, complete and coaccessible. 00189 * 00190 * Considering the marked languages implies that only strings that simultanuosly 00191 * reach a marking can survive the above procedure. From an omega-languages perspective, 00192 * this is of limited use. However, in the special situation that the specification 00193 * is relatively closed w.r.t. the plant, we can replace the specification by its 00194 * prefix closure befor invoking SupConComplNB. In this situation we claim that 00195 * the procedure returns a realisation of the the least restrictive closed loop behaviour 00196 * of the corresponding omega language control problem. 00197 * 00198 * 00199 * @param rPlantGen 00200 * Plant G 00201 * @param rCAlph 00202 * Controllable events 00203 * @param rSpecGen 00204 * Specification Generator E 00205 * @param rResGen 00206 * Reference to resulting Generator 00207 * 00208 * @exception Exception 00209 * - alphabets of generators don't match (id 100) 00210 * - plant nondeterministic (id 201) 00211 * - spec nondeterministic (id 203) 00212 * - plant and spec nondeterministic (id 204) 00213 * 00214 * @ingroup SynthesisPlugIn 00215 * 00216 */ 00217 void SupConCmplNB( 00218 const Generator& rPlantGen, 00219 const EventSet& rCAlph, 00220 const Generator& rSpecGen, 00221 Generator& rResGen); 00222 00223 00224 00225 /** 00226 * Supremal controllable and complete sublanguage. 00227 * 00228 * This is the RTI wrapper for 00229 * SupConCmplNB(const Generator&, const EventSet&, const Generator&, Generator&). 00230 * Controllability attributes are taken from the plant argument. 00231 * If the result is specified as a System, attributes will be copied 00232 * from the plant argument. 00233 * 00234 * 00235 * @param rPlantGen 00236 * Plant System 00237 * @param rSpecGen 00238 * Specification Generator 00239 * @param rResGen 00240 * Reference to resulting Generator 00241 * 00242 * @exception Exception 00243 * Alphabets of generators don't match (id 100) 00244 * plant nondeterministic (id 201) 00245 * spec nondeterministic (id 203) 00246 * plant and spec nondeterministic (id 204) 00247 * 00248 * @ingroup SynthesisPlugIn 00249 */ 00250 void SupConCmplNB( 00251 const System& rPlantGen, 00252 const Generator& rSpecGen, 00253 Generator& rResGen); 00254 00255 00256 /** 00257 * Supremal controllable, normal and complete sublanguage. 00258 * 00259 * 00260 * SupConNormCmplNB computes the supremal sublanguage 00261 * of language K (marked by rSpecGen) that 00262 * - is controllable w.r.t. the language L (marked by rPlantGen); 00263 * - has a prefix closure that is normal w.r.t. the closure of L 00264 * - is complete 00265 * 00266 * The implementation is based on an iteration by Yoo, Lafortune and Lin 00267 * "A uniform approach for computing supremal sublanguages arising 00268 * in supervisory control theory", 2002, further developped in 00269 * Moor, Baier, Yoo, Lin, and Lafortune "On the computation of supremal 00270 * sublanguages relevant to supervisory control, WODES 2012. The relationship 00271 * to the supervision of omega languages under partial observation is discussed 00272 * as an example in the WODES 2012 paper. 00273 * 00274 * Parameters have to be deterministic, result is deterministic. 00275 * 00276 * 00277 * @param rPlantGen 00278 * Plant L 00279 * @param rCAlph 00280 * Controllable events 00281 * @param rCAlph 00282 * Observable events 00283 * @param rSpecGen 00284 * Specification Generator E 00285 * @param rResGen 00286 * Reference to resulting Generator 00287 * 00288 * @exception Exception 00289 * - alphabets of generators don't match (id 100) 00290 * - plant nondeterministic (id 201) 00291 * - spec nondeterministic (id 203) 00292 * - plant and spec nondeterministic (id 204) 00293 * 00294 * @ingroup SynthesisPlugIn 00295 * 00296 */ 00297 void SupConNormCmplNB( 00298 const Generator& rPlantGen, 00299 const EventSet& rCAlph, 00300 const EventSet& rOAlph, 00301 const Generator& rSpecGen, 00302 Generator& rResGen); 00303 00304 00305 /** 00306 * Supremal controllable, normal and complete sublanguage. 00307 * 00308 * This is the RTI wrapper for 00309 * SupConNormCmplNB(const Generator&, const EventSet&, const EventSet&, const Generator&, Generator&). 00310 * Event attributes are taken from the plant argument. 00311 * If the result is specified as a System, attributes will be copied 00312 * from the plant argument. 00313 * 00314 * @param rPlantGen 00315 * Plant System 00316 * @param rSpecGen 00317 * Specification Generator 00318 * @param rResGen 00319 * Reference to resulting Generator 00320 * 00321 * @exception Exception 00322 * Alphabets of generators don't match (id 100) 00323 * plant nondeterministic (id 201) 00324 * spec nondeterministic (id 203) 00325 * plant and spec nondeterministic (id 204) 00326 * 00327 * @ingroup SynthesisPlugIn 00328 */ 00329 void SupConNormCmplNB( 00330 const System& rPlantGen, 00331 const Generator& rSpecGen, 00332 Generator& rResGen); 00333 00334 00335 00336 00337 /** 00338 * Omega-synthesis 00339 * 00340 * Computation of the supremal oemga-controllable sublanguage as proposed by 00341 * Thistle/Wonham in "Control of w-Automata, Church's Problem, and the Emptiness 00342 * Problem for Tree w-Automata", 1992, and, here, applied to the specific case 00343 * of deterministic Buechi automata. In the given setting, the result matches the 00344 * limit of the controllable prefix intersected with the plant and specification 00345 * omega-languages. 00346 * 00347 * Parameter restrictions: both generators must be deterministic and 00348 * refer to the same alphabet. 00349 * 00350 * 00351 * @param rPlantGen 00352 * Plant G 00353 * @param rCAlph 00354 * Controllable events 00355 * @param rSpecGen 00356 * Specification Generator E 00357 * @param rResGen 00358 * Reference to resulting Generator to realize 00359 * the supremal closed-loop behaviour. 00360 * 00361 * @exception Exception 00362 * - alphabets of generators don't match (id 100) 00363 * - plant nondeterministic (id 201) 00364 * - spec nondeterministic (id 203) 00365 * - plant and spec nondeterministic (id 204) 00366 * 00367 * @ingroup SynthesisPlugIn 00368 * 00369 */ 00370 void OmegaSupConNB( 00371 const Generator& rPlantGen, 00372 const EventSet& rCAlph, 00373 const Generator& rSpecGen, 00374 Generator& rResGen); 00375 00376 00377 00378 /** 00379 * Omega-synthesis 00380 * 00381 * This is the RTI wrapper for 00382 * OmegaSupConNB(const Generator&, const EventSet&, const Generator&, Generator&). 00383 * Controllability attributes are taken from the plant argument. 00384 * If the result is specified as a System, attributes will be copied 00385 * from the plant argument. 00386 * 00387 * 00388 * @param rPlantGen 00389 * Plant System 00390 * @param rSpecGen 00391 * Specification Generator 00392 * @param rResGen 00393 * Reference to resulting Generator to realize 00394 * the supremal closed-loop behaviour. 00395 * 00396 * @exception Exception 00397 * Alphabets of generators don't match (id 100) 00398 * plant nondeterministic (id 201) 00399 * spec nondeterministic (id 203) 00400 * plant and spec nondeterministic (id 204) 00401 * 00402 * @ingroup SynthesisPlugIn 00403 */ 00404 void OmegaSupConNB( 00405 const System& rPlantGen, 00406 const Generator& rSpecGen, 00407 Generator& rResGen); 00408 00409 00410 /** 00411 * Omega-synthesis 00412 * 00413 * This procedure first computes the supremal omega-controllable sublanguage as proposed by 00414 * J. Thistle, 1992, applied to the specific case of deterministoc Buechi automata. 00415 * It then applies a control pattern to obtain a relatively topologically-closed result, 00416 * i.e., the topological closure of the result can be used as a supervisor. 00417 * 00418 * Parameter restrictions: both generators must be deterministic and 00419 * have the same alphabet. 00420 * 00421 * 00422 * @param rPlantGen 00423 * Plant G 00424 * @param rCAlph 00425 * Controllable events 00426 * @param rSpecGen 00427 * Specification Generator E 00428 * @param rResGen 00429 * Reference to resulting Generator to realize 00430 * the closed-loop behaviour. 00431 * 00432 * @exception Exception 00433 * - alphabets of generators don't match (id 100) 00434 * - plant nondeterministic (id 201) 00435 * - spec nondeterministic (id 203) 00436 * - plant and spec nondeterministic (id 204) 00437 * 00438 * @ingroup SynthesisPlugIn 00439 * 00440 */ 00441 void OmegaConNB( 00442 const Generator& rPlantGen, 00443 const EventSet& rCAlph, 00444 const Generator& rSpecGen, 00445 Generator& rResGen); 00446 00447 00448 00449 /** 00450 * Omega-synthesis 00451 * 00452 * This is the RTI wrapper for 00453 * OmegaConNB(const Generator&, const EventSet&, const Generator&, Generator&). 00454 * Controllability attributes are taken from the plant argument. 00455 * If the result is specified as a System, attributes will be copied 00456 * from the plant argument. 00457 * 00458 * 00459 * @param rPlantGen 00460 * Plant System 00461 * @param rSpecGen 00462 * Specification Generator 00463 * @param rResGen 00464 * Reference to resulting Generator to realize 00465 * the closed-loop behaviour. 00466 * 00467 * @exception Exception 00468 * Alphabets of generators don't match (id 100) 00469 * plant nondeterministic (id 201) 00470 * spec nondeterministic (id 203) 00471 * plant and spec nondeterministic (id 204) 00472 * 00473 * @ingroup SynthesisPlugIn 00474 */ 00475 void OmegaConNB( 00476 const System& rPlantGen, 00477 const Generator& rSpecGen, 00478 Generator& rResGen); 00479 00480 00481 /** 00482 * Omega-synthesis for partial observation (experimental!) 00483 * 00484 * Variation of supremal omega-controllable sublanguage to address 00485 * normality requirements in the context of partial observation. The test 00486 * used in this implementation is sufficient but not known to be necessary. 00487 * Thus, the function may return only a subset of the relevant controllable 00488 * prefix. 00489 * 00490 * Parameter restrictions: both generators must be deterministic and 00491 * have the same alphabet. 00492 * 00493 * 00494 * @param rPlantGen 00495 * Plant G 00496 * @param rCAlph 00497 * Controllable events 00498 * @param rOAlph 00499 * Observable events 00500 * @param rSpecGen 00501 * Specification Generator E 00502 * @param rResGen 00503 * Reference to resulting Generator to realize 00504 * the supremal closed-loop behaviour. 00505 * 00506 * @exception Exception 00507 * - alphabets of generators don't match (id 100) 00508 * - plant nondeterministic (id 201) 00509 * - spec nondeterministic (id 203) 00510 * - plant and spec nondeterministic (id 204) 00511 * 00512 * @ingroup SynthesisPlugIn 00513 * 00514 */ 00515 void OmegaSupConNormNB( 00516 const Generator& rPlantGen, 00517 const EventSet& rOAlph, 00518 const EventSet& rCAlph, 00519 const Generator& rSpecGen, 00520 Generator& rResGen); 00521 00522 00523 00524 /** 00525 * Omega-synthesis for partial observation 00526 * 00527 * 00528 * This is the RTI wrapper for 00529 * OmegaSupConNormNB(const Generator&, const EventSet&, const Generator&, Generator&). 00530 * Controllability attributes and observability attributes are taken from the plant argument. 00531 * If the result is specified as a System, attributes will be copied 00532 * from the plant argument. 00533 * 00534 * 00535 * @param rPlantGen 00536 * Plant System 00537 * @param rSpecGen 00538 * Specification Generator 00539 * @param rResGen 00540 * Reference to resulting Generator to realize 00541 * the supremal closed-loop behaviour. 00542 * 00543 * @exception Exception 00544 * Alphabets of generators don't match (id 100) 00545 * plant nondeterministic (id 201) 00546 * spec nondeterministic (id 203) 00547 * plant and spec nondeterministic (id 204) 00548 * 00549 * @ingroup SynthesisPlugIn 00550 */ 00551 void OmegaSupConNormNB( 00552 const System& rPlantGen, 00553 const Generator& rSpecGen, 00554 Generator& rResGen); 00555 00556 00557 00558 /** 00559 * Omega-synthesis for partial observation (experimental!) 00560 * 00561 * Variation of supremal controllable prefix under partial observation. 00562 * This variation applies a control pattern to obtain a relatively closed and 00563 * omega-normal result. The latter properties are validated and an exception 00564 * is thrown on an error. Thus, this function should not produce "false-positives". 00565 * However, since it is derived from OmegaSupConNormNB(), is may return the 00566 * empty languages even if a non-empty controller exists. 00567 * 00568 * Parameter restrictions: both generators must be deterministic and 00569 * have the same alphabet. 00570 * 00571 * 00572 * @param rPlantGen 00573 * Plant G 00574 * @param rCAlph 00575 * Controllable events 00576 * @param rOAlph 00577 * Observable events 00578 * @param rSpecGen 00579 * Specification Generator E 00580 * @param rResGen 00581 * Reference to resulting Generator to realize 00582 * the supremal closed-loop behaviour. 00583 * 00584 * @exception Exception 00585 * - alphabets of generators don't match (id 100) 00586 * - plant nondeterministic (id 201) 00587 * - spec nondeterministic (id 203) 00588 * - plant and spec nondeterministic (id 204) 00589 * 00590 * @ingroup SynthesisPlugIn 00591 * 00592 */ 00593 void OmegaConNormNB( 00594 const Generator& rPlantGen, 00595 const EventSet& rOAlph, 00596 const EventSet& rCAlph, 00597 const Generator& rSpecGen, 00598 Generator& rResGen); 00599 00600 00601 00602 /** 00603 * Omega-synthesis for partial observation (experimental!) 00604 * 00605 * This is the RTI wrapper for 00606 * OmegaConNormNB(const Generator&, const EventSet&, const Generator&, Generator&). 00607 * Controllability attributes are taken from the plant argument. 00608 * If the result is specified as a System, attributes will be copied 00609 * from the plant argument. 00610 * 00611 * 00612 * @param rPlantGen 00613 * Plant System 00614 * @param rSpecGen 00615 * Specification Generator 00616 * @param rResGen 00617 * Reference to resulting Generator to realize 00618 * the closed-loop behaviour. 00619 * 00620 * @exception Exception 00621 * Alphabets of generators don't match (id 100) 00622 * plant nondeterministic (id 201) 00623 * spec nondeterministic (id 203) 00624 * plant and spec nondeterministic (id 204) 00625 * 00626 * @ingroup SynthesisPlugIn 00627 */ 00628 void OmegaConNormNB( 00629 const System& rPlantGen, 00630 const Generator& rSpecGen, 00631 Generator& rResGen); 00632 00633 00634 00635 00636 } // namespace faudes 00637 00638 #endif 00639 00640 libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |