Optimal control of the sweeping process over polyhedral controlled sets