Max-plus-algebraic hybrid automata