# libhybrid - A library for discretized Hybrid Dynamical Systems
This library implements an hybrid system in the form:
t'(k) = 1
j'(k) = 0
x'(t, j) = f(t, j, x(t, j), u(t, j) ,p)
for (t, j, x, u) in C
t(k + 1) = t(k)
j(k + 1) = j(k)
x(t, j + 1) = g(t, j, x(t, j), u(t, j), p)
for (t, j, x, u) in D
* f is the flow map;
* g is the jump map;
* h is the output map;
* C is the flow set;
* D is the jump set.
* p are parameters.
* k is an engine time for the integration of t and j.
The flow map is discretized with a Runge Kutta 4 step. For the evolution of the system, both t and j are limited by horizons.
The example (bouncing_ball_example_m) shows how to use the library. The model is in bouncing_ball_example_c.c. The library now has a command (idnlhybrid) that allows to compile and prepare a model directly.
Inspired by: Hybrid Equations Toolbox v2.04