A flexible high level modelling methodology for power and energy consumption