con_2_simple.cppGo to the documentation of this file.00001 /** @file con_2_simple.cpp 00002 00003 Tutorial, coordination control for prefix-closed languages 00004 00005 @ingroup Tutorials 00006 00007 @include con_2_simple.cpp 00008 00009 */ 00010 00011 #include "libfaudes.h" 00012 00013 // we make the faudes namespace available to our program 00014 using namespace faudes; 00015 00016 ///////////////// 00017 // main program 00018 ///////////////// 00019 00020 int main(void) { 00021 00022 // Local systems g1, g2, g3, and a global specification spec 00023 System g1, g2, g3, spec; 00024 // Set of controllable events and the initial ek event set 00025 EventSet ec, ek; 00026 // Vectors of local systems and resulting supervisors 00027 GeneratorVector gVector, resVector; 00028 // Computer supervised coordinator 00029 System coord; 00030 00031 g1.Read("data/gen1.gen"); 00032 g2.Read("data/gen2.gen"); 00033 g3.Read("data/gen3.gen"); 00034 spec.Read("data/spec.gen"); 00035 ec.Read("data/ec.alph"); 00036 ek.Read("data/ek0.alph"); 00037 00038 gVector.Append(g1); 00039 gVector.Append(g2); 00040 gVector.Append(g3); 00041 00042 bool result = SupConditionalControllable(spec,gVector,ec,ek,resVector,coord); 00043 00044 FAUDES_TEST_DUMP("computed ok?",result); 00045 00046 FAUDES_TEST_DIFF(); 00047 } 00048 libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |