Identifying efficiency and flexibility measures for energy-oriented factory management