Embedded learning and optimization for the next generation of smart industrial control systems