|
Go to the documentation of this file.
10 using namespace faudes;
27 std::cout << "################################\n";
28 std::cout << "# decentralized language-diagnosability (system 1)\n";
29 std::cout << "# a) read data \n";
32 plant = System( "data/diag_system_4_decentralized1.gen");
33 spec = System( "data/diag_specification_4_decentralized1.gen");
36 plant. Write( "tmp_diag_system_4_decentralized1.gen");
37 spec. Write( "tmp_diag_specification_4_decentralized1.gen");
40 plant. GraphWrite( "tmp_demo_system_4_decentralized1.png");
41 spec. GraphWrite( "tmp_demo_specification_4_decentralized1.png");
45 alph1 = new EventSet( "data/diag_obsAlph_4_decentralized1_1.alph");
46 alph2 = new EventSet( "data/diag_obsAlph_4_decentralized1_2.alph");
52 std::cout << "# b) run decentralized diagnosability test (expect result FAIL)\n";
57 cout << "The overall system G is co-diagnosable with respect to overall specification K." << endl;
59 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
65 diagVector. At(0).Write( "tmp_diag_diagnoser_4_decentralized1_1.gen");
66 diagVector. At(1).Write( "tmp_diag_diagnoser_4_decentralized1_2.gen");
68 diagVector. At(0).GraphWrite( "tmp_demo_diagnoser_4_decentralized1_1.png");
69 diagVector. At(1).GraphWrite( "tmp_demo_diagnoser_4_decentralized1_2.png");
79 std::cout << "################################\n";
80 std::cout << "# decentralized language-diagnosability (system 2)\n";
81 std::cout << "# a) read data \n";
84 plant = System( "data/diag_system_4_decentralized2.gen");
85 spec = System( "data/diag_specification_4_decentralized2.gen");
88 plant. Write( "tmp_diag_system_4_decentralized2.gen");
89 spec. Write( "tmp_diag_specification_4_decentralized2.gen");
92 plant. GraphWrite( "tmp_demo_system_4_decentralized2.png");
93 spec. GraphWrite( "tmp_demo_specification_4_decentralized2.png");
97 alph1 = new EventSet( "data/diag_obsAlph_4_decentralized2_1.alph");
98 alph2 = new EventSet( "data/diag_obsAlph_4_decentralized2_2.alph");
100 alphVector. Append(alph2 );
103 std::cout << "# b) run decentralized diagnosability test (expect result FAIL)\n";
108 cout << "The overall system G is co-diagnosable with respect to overall specification K." << endl;
109 cout << report << endl;
111 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
112 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
113 cout << report << endl;
119 diagVector. At(0).Write( "tmp_diag_diagnoser_4_decentralized2_1.gen");
120 diagVector. At(1).Write( "tmp_diag_diagnoser_4_decentralized2_2.gen");
122 diagVector. At(0).GraphWrite( "tmp_demo_diagnoser_4_decentralized2_1.png");
123 diagVector. At(1).GraphWrite( "tmp_demo_diagnoser_4_decentralized2_2.png");
132 std::cout << "################################\n";
133 std::cout << "# decentralized language-diagnosability (system 3)\n";
134 std::cout << "# a) read data \n";
137 plant = System( "data/diag_system_2_language.gen");
138 spec = System( "data/diag_specification_2_language.gen");
141 plant. GraphWrite( "tmp_demo_system_2_language.png");
142 spec. GraphWrite( "tmp_demo_specification_2_language.png");
151 alphVector. Append(alph1 );
152 alphVector. Append(alph2 );
155 std::cout << "# b) run decentralized diagnosability test (expect result FAIL)\n";
160 cout << "The overall system G is co-diagnosable with respect to overall specification K." << endl;
161 cout << report << endl;
163 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
164 cout << report << endl;
176 std::cout << "################################\n";
177 std::cout << "# decentralized language-diagnosability (system sf/c1)\n";
178 std::cout << "# a) read data \n";
182 sf = System( "data/diag_system_4_decentralized_sf.gen");
183 c1 = System( "data/diag_system_4_decentralized_c1.gen");
186 sf. Write( "tmp_diag_system_4_decentralized_sf.gen");
187 c1. Write( "tmp_diag_system_4_decentralized_c1.gen");
189 sf. GraphWrite( "tmp_demo_system_4_decentralized_sf.png");
190 c1. GraphWrite( "tmp_demo_system_4_decentralized_c1.png");
191 sfc1Spec = Generator( "data/diag_specification_4_decentralized_sfc1.gen");
196 plant. GraphWrite( "tmp_demo_system_4_decentralized_sfc1.png");
197 spec. GraphWrite( "tmp_demo_specification_4_decentralized_sfc1.png");
205 alphVector. Append(alph1 );
206 alphVector. Append(alph2 );
209 std::cout << "# b) run decentralized diagnosability test (expect result PASS)\n";
214 cout << "The overall system G is co-diagnosable with respect to overall specification K." << endl;
215 cout << report << endl;
217 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
218 cout << report << endl;
227 diagVector. At(0).Write( "tmp_diag_diagnoser_4_decentralized_sf.gen");
228 diagVector. At(1).Write( "tmp_diag_diagnoser_4_decentralized_c1.gen");
230 diagVector. At(0).GraphWrite( "tmp_demo_diagnoser_4_decentralized_sf.png");
231 diagVector. At(1).GraphWrite( "tmp_demo_diagnoser_4_decentralized_c1.png");
241 std::cout << "################################\n";
242 std::cout << "# Abstraction-based decentralized language-diagnosability (system sf/c1)\n";
243 std::cout << "# a) read data \n";
248 abstAlph. Read( "data/diag_abstAlph_4_decentralized_sf.alph", "Alphabet");
250 std::cout << "The abstraction for SF is a loop-preserving observer" << std::endl;
252 std::cout << "The abstraction for SF is not a loop-preserving observer" << std::endl;
254 sfAbst. Write( "tmp_diag_system_4_decentralized_sf_abstracted.gen");
255 sfAbst. GraphWrite( "tmp_demo_system_4_decentralized_sf_abstracted.png");
256 abstAlph. Read( "data/diag_abstAlph_4_decentralized_c1.alph", "Alphabet");
258 std::cout << "The abstraction for C1 is a loop-preserving observer" << std::endl;
260 std::cout << "The abstraction for C1 is not a loop-preserving observer" << std::endl;
263 c1Abst. Write( "tmp_diag_system_4_decentralized_c1_abstracted.gen");
264 c1Abst. GraphWrite( "tmp_demo_system_4_decentralized_c1_abstracted.png");
265 sfc1Spec = Generator( "data/diag_specification_4_decentralized_sfc1.gen");
270 plant. GraphWrite( "tmp_demo_system_4_decentralized_sfc1_abstracted.png");
271 spec. GraphWrite( "tmp_demo_specification_4_decentralized_sfc1_abstract.png");
281 std::cout << "# b) run decentralized diagnosability test (expect result PASS)\n";
286 cout << "The overall system G is co-diagnosable with respect to overall specification K." << endl;
287 cout << report << endl;
289 cout << "The overall system G is not co-diagnosable with respect to overall specification K." << endl;
290 cout << report << endl;
libFAUDES 2.24g
--- 2014.09.15
--- c++ api documentaion by doxygen
|