Optimal energy system scheduling using a constraint-aware reinforcement learning algorithm