Optimizing production schedules and energy consumption with an evolutionary algorithm