op_ex_mc.cpp
Go to the documentation of this file.
1 /** @file op_ex_mc.cpp
2 
3 Tutorial to demonstarte the verification of mutual controllability.
4 
5 @ingroup Tutorials
6 
7 */
8 
9 
10 #include <stdio.h>
11 #include <iostream>
12 #include "libfaudes.h"
13 
14 
15 // make libFAUDES namespace available
16 using namespace faudes;
17 
18 
19 int main(int argc, char* argv[]) {
20 
21  // read two generators from file input
22  System gen1("./data/ex_mc/ex_mc1.gen");
23  System gen2("./data/ex_mc/ex_mc2.gen");
24 
25  // Verify mutual controllability of gen1 and gen2. In this case, mutual controllabiity is violated.
26  bool mc = IsMutuallyControllable(gen1,gen2);
27  std::cout << "#################################################\n";
28  std::cout << "# Mutual controllability verification - result: " << mc << std::endl;
29  std::cout << "#################################################\n";
30 
31  // read one further generator from file input
32  System gen3("./data/ex_mc/ex_mc3.gen");
33  // Verify mutual controllability of gen3 and gen2. In this case, mutual controllability holds.
34  mc = IsMutuallyControllable(gen3,gen2);
35  std::cout << "##################################################\n";
36  std::cout << "# Mutual controllability verification - result: " << mc << std::endl;
37  std::cout << "##################################################\n";
38 
39 
40  return 0;
41 }
Generator with controllability attributes.
bool IsMutuallyControllable(const System &rGen1, const System &rGen2)
Verification of mutual controllability.
Definition: op_mc.cpp:32
Includes all libFAUDES headers, incl plugings
libFAUDES resides within the namespace faudes.
int main(int argc, char *argv[])
Definition: op_ex_mc.cpp:19

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen