Nonlinear modeling of flexible multibody systems dynamics subjected to variable constraints