con_2_simple.cpp File Reference

Tutorial, coordination control for prefix-closed languages. More...

#include "libfaudes.h"

Go to the source code of this file.

Functions

int main (void)
 

Detailed Description

Tutorial, coordination control for prefix-closed languages.

/** @file con_2_simple.cpp
Tutorial, coordination control for prefix-closed languages
@ingroup Tutorials
@include con_2_simple.cpp
*/
#include "libfaudes.h"
// we make the faudes namespace available to our program
using namespace faudes;
/////////////////
// main program
/////////////////
int main(void) {
// Local systems g1, g2, g3, and a global specification spec
System g1, g2, g3, spec;
// Set of controllable events and the initial ek event set
EventSet ec, ek;
// Vectors of local systems and resulting supervisors
GeneratorVector gVector, resVector;
// Computer supervised coordinator
System coord;
g1.Read("data/gen1.gen");
g2.Read("data/gen2.gen");
g3.Read("data/gen3.gen");
spec.Read("data/spec.gen");
ec.Read("data/ec.alph");
ek.Read("data/ek0.alph");
gVector.Append(g1);
gVector.Append(g2);
gVector.Append(g3);
bool result = SupConditionalControllable(spec,gVector,ec,ek,resVector,coord);
FAUDES_TEST_DUMP("computed ok?",result);
}
#define FAUDES_TEST_DIFF()
Test protocol diff macro.
Definition: cfl_helper.h:493
#define FAUDES_TEST_DUMP(mes, dat)
Test protocol record macro ("mangle" filename for platform independance)
Definition: cfl_helper.h:483
int main(int argc, char *argv[])
NameSet EventSet
Convenience typedef for plain event sets.
Definition: cfl_nameset.h:531
bool SupConditionalControllable(const Generator &gen, const GeneratorVector &genVector, const EventSet &ACntrl, const EventSet &InitEk, GeneratorVector &supVector, Generator &Coord)
Conditionalcontrollability Checking Algorithm.
Definition: con_supcc.cpp:18
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
Convenience typedef for std System.
TBaseVector< Generator > GeneratorVector
Convenience typedef for vectors og generators.
Includes all libFAUDES headers, incl plugings
libFAUDES resides within the namespace faudes.

Definition in file con_2_simple.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 20 of file con_2_simple.cpp.

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