A Petri Net Model for a Building Energy Management System Based on a Demand Response Approach