irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
model.h
Go to the documentation of this file.
1 #ifndef REPRESENTATION_FORMAL_HYBRID_AUTOMATON_LOCATIONS_MODEL_MODEL_H
2 #define REPRESENTATION_FORMAL_HYBRID_AUTOMATON_LOCATIONS_MODEL_MODEL_H
3 
4 #include <memory>
5 #include <irafhy/settings.h>
9 
10 namespace irafhy
11 {
12  template <typename Analyser>
13  class Jump;
14 
15  template <typename Analyser>
16  class Model : public Analyser, public std::enable_shared_from_this<Model<Analyser>>
17  {
18  private:
22  std::string id_;
34  std::vector<Jump<Analyser>> jumps_;
35 
36  private:
45  capd::C0Rect2Set compute(const Time& duration,
46  const System& system,
47  const capd::C0Rect2Set& initCondition,
48  const Settings& settings) const;
49 
50  public:
54  Model() = default;
61  Model(const std::string& id, const System& flows, const Condition& invariantCondition);
65  ~Model() = default;
70  void setJump(const Jump<Analyser>& jump);
75  std::shared_ptr<Model<Analyser>> getModel();
80  [[nodiscard]] std::string id() const;
85  [[nodiscard]] System flows() const;
90  [[nodiscard]] Condition invariantCondition() const;
95  const std::vector<Jump<Analyser>>& jumps() const;
101  bool operator<(const Model<Analyser>& rhs) const;
111  Condition simulate(const Time& duration,
112  long int& doneJumps,
113  const capd::C0Rect2Set& initCondition,
114  const Settings& settings,
115  State<Analyser>& nextState) const;
116  };
117 
125  template <typename Analyser>
126  std::ostream& operator<<(std::ostream& out, const Model<Analyser>& rhs);
127 } // namespace irafhy
128 #ifndef USE_AS_STATIC
129 #include "../../../../../../../src/representation/formal/hybridAutomaton/locations/model/model.tpp"
130 #endif
131 #endif //REPRESENTATION_FORMAL_HYBRID_AUTOMATON_LOCATIONS_MODEL_MODEL_H
struct used to hold the duration information
Definition: metaStructure.h:14
Condition invariantCondition() const
get the invariant condition of the mode
Definition: model.h:16
Definition: condition.h:22
std::string id() const
get the identifier of the mode
System flows_
ordinary differential equations which specify the continuous dynamics of the state ...
Definition: model.h:26
std::vector< Jump< Analyser > > jumps_
jumps start from the current mode
Definition: model.h:34
Definition: state.h:13
Definition: settings.h:12
capd::C0Rect2Set compute(const Time &duration, const System &system, const capd::C0Rect2Set &initCondition, const Settings &settings) const
get the target state set for the duration
std::shared_ptr< Model< Analyser > > getModel()
get the shared pointer to the mode
Model()=default
constructor
System flows() const
get continuous dynamics of the mode
~Model()=default
destructor
Definition: condition.cpp:3
Definition: model.h:13
const std::vector< Jump< Analyser > > & jumps() const
get the jumps which start from the mode
Condition simulate(const Time &duration, long int &doneJumps, const capd::C0Rect2Set &initCondition, const Settings &settings, State< Analyser > &nextState) const
get the reachable condition of the mode for given duration
Definition: system.h:11
void setJump(const Jump< Analyser > &jump)
add the given jump to the existing jump
std::string id_
identifier of the current mode
Definition: model.h:22
Definition: analyser.h:12
Condition invariantCondition_
invariant condition of the current mode
Definition: model.h:30