Regarding electrical systems as complex systems offers new approaches for analysing, modelling and simulating those systems. Using software engineering techniques like Model Driven Engineering, a disaggregated model for household electricity demand is created. The Tafat framework for simulating complex energy systems is presented, including the concepts of the metamodel, models and behaviours. ...