Modelling the dynamics of a micro-cavity switch