Reinforcement Learning to Grouped Scheduling Optimisation Problem
It is often possible, by describing certain parts of a problem as state, others as actions, and some measurement you want to optimise as a reward, to frame a problem as a reinforcement learning task. However, this is not always helpful. 

I suspect your problem is in the "RL is not that helpful" category. You could give it a try, and maybe expect to find working solutions but take an unreasonable amount of time to find optimal solutions.

What you appear to have here is a problem in combinatorial optimisation. There are many applicable algorithms, a good selection are described in the free book Clever Algorithms: Nature-Inspired Programming Recipes - which is best will be determined by the specific details of your constraints and the size of the problem.

If many constraints are soft and can be assigned a cost, you may be able to use genetic algorithms (with genome being group assignments in order) or simulated annealing for example.