hyb_reachability.h
Go to the documentation of this file.
1 /** @file hyp_reachability.h LHA reachabilty */
2 
3 /*
4  Hybrid systems plug-in for FAU Discrete Event Systems Library (libfaudes)
5 
6  Copyright (C) 2017 Thomas Moor
7 
8 */
9 
10 
11 
12 #ifndef FAUDES_HYB_REACHABILITY_H
13 #define FAUDES_HYB_REACHABILITY_H
14 
15 
16 #include "corefaudes.h"
17 #include "hyb_hgenerator.h"
18 
19 //#undef FD_DG
20 //#define FD_DG(message) FAUDES_WRITE_CONSOLE("FAUDES_GENERATOR: " << message)
21 
22 
23 namespace faudes {
24 
25 
26 
27 /**
28  * Set of states in an hybrid automata
29  *
30  * Records a list of polyhedra per location.
31  */
32 
34 
35  public:
36 
37  /** constructors */
38 
39  HybridStateSet(void);
40  ~HybridStateSet(void);
41  HybridStateSet(const HybridStateSet& rOther);
42  void Assign(const HybridStateSet& rOther);
43 
44  /** access to locations */
45  const IndexSet& Locations(void);
46  IndexSet::Iterator LocationsBegin(void) const;
47  IndexSet::Iterator LocationsEnd(void) const;
48 
49  /** access to polyhedra of states */
50  typedef std::list< Polyhedron* >::const_iterator Iterator;
51  Iterator StatesBegin(Idx q) const;
52  Iterator StatesEnd(Idx q) const;
53 
54  /** insert / erase (we take owvership of polyhedra) */
55  void Insert(Idx q);
56  void Insert(Idx q, Polyhedron* states);
57  void Erase(Idx q);
58  void Clear(void);
59 
60  /** test emptyness */
61  bool IsEmpty(void) const;
62 
63  /** inspect */
64  void DWrite(const LinearHybridAutomaton& lha);
65 
66 protected:
67 
68  /** payload */
70  std::map< Idx , std::list< Polyhedron* > > mStates;
71 
72 };
73 
74 
75 /** compute sets of reachable state per successor event */
76 void FAUDES_API LhaReach(
77  const LinearHybridAutomaton& lha,
78  const HybridStateSet& states,
79  std::map< Idx, HybridStateSet* >& ostates,
80  int* pCnt=NULL);
81 
82 
83 } // namespace faudes
84 
85 
86 #endif
87 
#define FAUDES_API
Interface export/import symbols: windows.
Definition: cfl_platform.h:81
Set of states in an hybrid automata.
std::list< Polyhedron * >::const_iterator Iterator
access to polyhedra of states
std::map< Idx, std::list< Polyhedron * > > mStates
StateSet mLocations
payload
Set of indices.
Definition: cfl_indexset.h:78
Polyhedron in R^n.
Generator with linear hybrid automata extensions.
Includes all libFAUDES headers, no plugins.
Linear hybrid automata class TlhaGenerator.
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)
void LhaReach(const LinearHybridAutomaton &lha, const HybridStateSet &states, std::map< Idx, HybridStateSet * > &ostates, int *pCnt)
compute sets of reachable state per successor event

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