Optimistic Planning Control algorithm implemented in C

The algorithm is described in this paper by Lucian Bușoniu et al.

I have used an inverse pendulum model in order to simulate its results.