A Survey of Reinforcement Learning for Optimization in Automation