AI Framework for Adaptive Manufacturing Energy Optimization