op_ex_mc.cppGo to the documentation of this file.00001 /** @file op_ex_mc.cpp 00002 00003 This tutorial demonstrates methods for verifying the mutual controllability condition of 00004 two given automata. A definition of mutual controllability is given in 00005 S.-H. Lee and K. C. Wong, “Structural decentralised control of concurrent 00006 DES,” European Journal of Control, vol. 35, pp. 1125-1134,2002. 00007 00008 @ingroup Tutorials 00009 00010 @include op_ex_mc.cpp 00011 */ 00012 00013 #include <stdio.h> 00014 #include <iostream> 00015 #include "libfaudes.h" 00016 00017 00018 // make libFAUDES namespace available 00019 using namespace faudes; 00020 00021 00022 int main(int argc, char* argv[]) { 00023 00024 // read two generators from file input 00025 System gen1("./data/ex_mc/ex_mc1.gen"); 00026 System gen2("./data/ex_mc/ex_mc2.gen"); 00027 00028 // Verify mutual controllability of gen1 and gen2. In this case, mutual controllabiity is violated. 00029 bool mc = IsMutuallyControllable(gen1,gen2); 00030 std::cout << "#################################################\n"; 00031 std::cout << "# Mutual controllability verification - result: " << mc << std::endl; 00032 std::cout << "#################################################\n"; 00033 00034 // read one further generator from file input 00035 System gen3("./data/ex_mc/ex_mc3.gen"); 00036 // Verify mutual controllability of gen3 and gen2. In this case, mutual controllability holds. 00037 mc = IsMutuallyControllable(gen3,gen2); 00038 std::cout << "##################################################\n"; 00039 std::cout << "# Mutual controllability verification - result: " << mc << std::endl; 00040 std::cout << "##################################################\n"; 00041 00042 00043 return 0; 00044 } libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |