A mixed-integer model for solving ordering problems with side constraints