con_2_simple.cpp
Go to the documentation of this file.
1/** @file con_2_simple.cpp
2
3Tutorial, coordination control for prefix-closed languages
4
5@ingroup Tutorials
6
7@include con_2_simple.cpp
8
9*/
10
11#include "libfaudes.h"
12
13// we make the faudes namespace available to our program
14using namespace faudes;
15
16/////////////////
17// main program
18/////////////////
19
20int main(void) {
21
22 // Local systems g1, g2, g3, and a global specification spec
23 System g1, g2, g3, spec;
24 // Set of controllable events and the initial ek event set
25 EventSet ec, ek;
26 // Vectors of local systems and resulting supervisors
27 GeneratorVector gVector, resVector;
28 // Computer supervised coordinator
29 System coord;
30
31 g1.Read("data/gen1.gen");
32 g2.Read("data/gen2.gen");
33 g3.Read("data/gen3.gen");
34 spec.Read("data/spec.gen");
35 ec.Read("data/ec.alph");
36 ek.Read("data/ek0.alph");
37
38 gVector.Append(g1);
39 gVector.Append(g2);
40 gVector.Append(g3);
41
42 bool result = SupConditionalControllable(spec,gVector,ec,ek,resVector,coord);
43
44 FAUDES_TEST_DUMP("computed ok?",result);
45
47}
48
#define FAUDES_TEST_DIFF()
Definition cfl_utils.h:515
#define FAUDES_TEST_DUMP(mes, dat)
Definition cfl_utils.h:505
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
virtual void Append(const Type &rElem)
int main(void)
bool SupConditionalControllable(const Generator &gen, const GeneratorVector &genVector, const EventSet &ACntrl, const EventSet &InitEk, GeneratorVector &supVector, Generator &Coord)
Definition con_supcc.cpp:18

libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen