Constraint-based Scheduling for Closed-loop Production Control in RMSs