Smart Factories: Energy-aware, agile manufacturing and customisation