irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
jump.h
Go to the documentation of this file.
1 #ifndef REPRESENTATION_FORMAL_HYBRID_AUTOMATON_TRANSITIONS_JUMP_JUMP_H
2 #define REPRESENTATION_FORMAL_HYBRID_AUTOMATON_TRANSITIONS_JUMP_JUMP_H
3 
6 #include <memory>
7 #include <string>
8 
9 namespace irafhy
10 {
11  template <typename Analyser>
12  class Model;
13 
14  template <typename Analyser>
15  class Jump
16  {
17  private:
21  std::string sourceName_;
25  std::string targetName_;
41  std::vector<UpdateFunction> resetMap_;
42 
43  public:
47  Jump() = default;
56  const Model<Analyser>& target,
58  const std::vector<UpdateFunction>& resetMap);
62  ~Jump() = default;
72  void setSourceName(const std::string& sourceName);
82  void setTargetName(const std::string& targetName);
92  void setResetMap(const std::vector<UpdateFunction>& resetMap);
97  [[nodiscard]] std::string sourceName() const;
102  [[nodiscard]] std::string targetName() const;
107  Model<Analyser>* source() const;
112  Model<Analyser>* target() const;
117  [[nodiscard]] Condition guardCondition() const;
122  [[nodiscard]] std::vector<UpdateFunction> resetMap() const;
130  bool trigger(const Condition& in, Condition& out, const capd::interval& time) const;
131  };
132 
140  template <typename Analyser>
141  std::ostream& operator<<(std::ostream& out, const Jump<Analyser>& rhs);
142 } // namespace irafhy
143 #ifndef USE_AS_STATIC
144 #include "../../../../../../../src/representation/formal/hybridAutomaton/transitions/jump/jump.tpp"
145 #endif
146 #endif //REPRESENTATION_FORMAL_HYBRID_AUTOMATON_TRANSITIONS_JUMP_JUMP_H
Condition guardCondition() const
get the guard condition of the jump
std::string sourceName() const
get the name of the source mode
Condition guardCondition_
guard condition of the jump
Definition: jump.h:37
void setTargetName(const std::string &targetName)
set related name of the target
Definition: model.h:16
Jump()=default
constructor
Definition: condition.h:22
bool trigger(const Condition &in, Condition &out, const capd::interval &time) const
check if the given condition trigger the jump, if TRUE, output the triggered condition or not ...
void setResetMap(const std::vector< UpdateFunction > &resetMap)
set the reset map of the jump
std::vector< UpdateFunction > resetMap() const
get the reset map of the jump
Model< Analyser > * target() const
get the pointer to the target mode
std::string targetName_
id of the target mode
Definition: jump.h:25
std::string sourceName_
id of the source mode
Definition: jump.h:21
void setSource(Model< Analyser > *source)
set the source of the jump with given source
Definition: condition.cpp:3
Model< Analyser > * target_
pointer to the target mode
Definition: jump.h:33
void setSourceName(const std::string &sourceName)
set related name of the source
~Jump()=default
destructor
Model< Analyser > * source() const
get the pointer to the source mode
std::vector< UpdateFunction > resetMap_
reset map of the jump
Definition: jump.h:41
Model< Analyser > * source_
pointer to the source mode
Definition: jump.h:29
void setTarget(Model< Analyser > *target)
set the target of the jump with given target
std::string targetName() const
get the name of the target mode
void setGuardCondition(const Condition &guardCondition)
set the guard condition of the jump