obs_1_simple.cpp
Go to the documentation of this file.
1/** @file syn_1_simple.cpp
2
3Tutorial, std monolitic synthesis.
4
5
6This tutorial uses a very simple example to illustrate the
7std monolithic controller synthesis
8as originally proposed by Ramadge and Wonham.
9
10
11@ingroup Tutorials
12
13@include syn_1_simple.cpp
14
15*/
16
17#include "libfaudes.h"
18
19
20// we make the faudes namespace available to our program
21using namespace faudes;
22
23
24
25
26/////////////////
27// main program
28/////////////////
29
30int main() {
31
32 System plant, spec;
33 EventSet highAlph, obsAlph;
34 // The first plant/spec violates the condition
35 plant.Read("data/generator1.gen");
36 plant.GraphWrite("data/generator1.png");
37 spec.Read("data/generator1.gen");
38 highAlph.Read("data/highAlph1.alph");
39 obsAlph.Read("data/obs1.alph");
40 bool result = LocalObservationConsistency(plant,spec,highAlph,obsAlph);
41 std::cout << "result for generator1 is: " << result << std::endl;
42 // The second plant/spec fulfills the condition
43 plant.Read("data/generator2.gen");
44 plant.GraphWrite("data/generator2.png");
45 spec.Read("data/generator2.gen");
46 result = LocalObservationConsistency(plant,spec,highAlph,obsAlph);
47 std::cout << "result for generator2 is: " << result << std::endl;
48
49 return 0;
50}
51
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
void GraphWrite(const std::string &rFileName, const std::string &rOutFormat="", const std::string &rDotExec="dot") const
bool LocalObservationConsistency(const System &rPlantGen, const System &rSpecGen, const EventSet &rHighAlph, const EventSet &rObsAlph)
int main()

libFAUDES 2.34d --- 2026.03.11 --- c++ api documentaion by doxygen