op_ex_mc.cpp
Go to the documentation of this file.
1 /** @file op_ex_mc.cpp
2 
3 This tutorial demonstrates methods for verifying the mutual controllability condition of
4 two given automata. A definition of mutual controllability is given in
5 S.-H. Lee and K. C. Wong, “Structural decentralised control of concurrent
6 DES,” European Journal of Control, vol. 35, pp. 1125-1134,2002.
7 
8 @ingroup Tutorials
9 
10 @include op_ex_mc.cpp
11 */
12 
13 #include <stdio.h>
14 #include <iostream>
15 #include "libfaudes.h"
16 
17 
18 // make libFAUDES namespace available
19 using namespace faudes;
20 
21 
22 int main(int argc, char* argv[]) {
23 
24  // read two generators from file input
25  System gen1("./data/ex_mc/ex_mc1.gen");
26  System gen2("./data/ex_mc/ex_mc2.gen");
27 
28  // Verify mutual controllability of gen1 and gen2. In this case, mutual controllabiity is violated.
29  bool mc = IsMutuallyControllable(gen1,gen2);
30  std::cout << "#################################################\n";
31  std::cout << "# Mutual controllability verification - result: " << mc << std::endl;
32  std::cout << "#################################################\n";
33 
34  // read one further generator from file input
35  System gen3("./data/ex_mc/ex_mc3.gen");
36  // Verify mutual controllability of gen3 and gen2. In this case, mutual controllability holds.
37  mc = IsMutuallyControllable(gen3,gen2);
38  std::cout << "##################################################\n";
39  std::cout << "# Mutual controllability verification - result: " << mc << std::endl;
40  std::cout << "##################################################\n";
41 
42 
43  return 0;
44 }

libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen