Complementarity modelling of hybrid systems