Skip to content

Commit

Permalink
Add missing Python bindings for hybrid automaton name and expressions…
Browse files Browse the repository at this point in the history
… accessors, resolve #642
  • Loading branch information
lgeretti committed Jul 22, 2021
1 parent 9c1f7a3 commit 3a8ff08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Legenda for the issue kind:
- [#622](https://github.com/ariadne-cps/ariadne/issues/622) (A) Implement GradedTaylorPicardIterator that avoids initial use of Bounder
- [#626](https://github.com/ariadne-cps/ariadne/issues/626) (A) Allow 'none' graphics backend or drawer from CLI, to temporarily switch off graphics when desired
- [#628](https://github.com/ariadne-cps/ariadne/issues/628) (A) Implement some methods for Polynomial, in particular for vectors thereof
- [#636](https://github.com/ariadne-cps/ariadne/issues/636) (A) Add Python bindings for hybrid automaton target method
- [#636](https://github.com/ariadne-cps/ariadne/issues/636) (A) Add Python bindings for hybrid automaton target method
- [#642](https://github.com/ariadne-cps/ariadne/issues/642) (A) Add Python bindings for hybrid automaton name and symbolic expressions in dynamics/guards/invariants/resets
- [#612](https://github.com/ariadne-cps/ariadne/issues/612) (C) Remove unused legend from Gnuplot output
- [#639](https://github.com/ariadne-cps/ariadne/issues/639) (C) Use a finer (3/4) refinement strategy for the step size when computing a flow step based on an accuracy threshold
- [#616](https://github.com/ariadne-cps/ariadne/issues/616) (F) Fix behavior of unary symbolic expression predicates
Expand Down
8 changes: 7 additions & 1 deletion python/source/hybrid_submodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,19 @@ Void export_hybrid_automaton(pybind11::module& module)
pybind11::class_<HybridAutomaton,pybind11::bases<HybridAutomatonInterface>> hybrid_automaton_class(module,"HybridAutomaton");
hybrid_automaton_class.def(pybind11::init<>());
hybrid_automaton_class.def(pybind11::init<Identifier>());
hybrid_automaton_class.def("name", &HybridAutomaton::name);
hybrid_automaton_class.def("locations", &HybridAutomaton::locations);
hybrid_automaton_class.def("events", &HybridAutomaton::events);
hybrid_automaton_class.def("event_kind", &HybridAutomaton::event_kind);
hybrid_automaton_class.def("target", &HybridAutomaton::target);
hybrid_automaton_class.def("dynamic_function", &HybridAutomaton::dynamic_function);
hybrid_automaton_class.def("guard_function", &HybridAutomaton::guard_function);
hybrid_automaton_class.def("reset_function", &HybridAutomaton::reset_function);
hybrid_automaton_class.def("target", &HybridAutomaton::target);
hybrid_automaton_class.def("guard_predicate", &HybridAutomaton::guard_predicate);
hybrid_automaton_class.def("invariant_predicate", &HybridAutomaton::invariant_predicate);
hybrid_automaton_class.def("dynamic_assignments", &HybridAutomaton::dynamic_assignments);
hybrid_automaton_class.def("auxiliary_assignments", &HybridAutomaton::auxiliary_assignments);
hybrid_automaton_class.def("reset_assignments", &HybridAutomaton::reset_assignments);
hybrid_automaton_class.def("new_mode",overload_cast<List<DottedRealAssignment>const&>(&HybridAutomaton::new_mode),reference_internal);
hybrid_automaton_class.def("new_mode",overload_cast<List<RealAssignment>const&>( &HybridAutomaton::new_mode),reference_internal);
hybrid_automaton_class.def("new_mode",overload_cast<List<RealAssignment>const&,List<DottedRealAssignment>const&>(&HybridAutomaton::new_mode),reference_internal);
Expand Down

0 comments on commit 3a8ff08

Please sign in to comment.