Energy Management System for an Energy District with demand response availability