-CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props)
- : Resource(model, name, props), CpuLmm() {
+CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props,
+ double power_scale,
+ double power_initial, tmgr_trace_t power_trace,
+ e_surf_resource_state_t state_initial, tmgr_trace_t state_trace)
+ : Cpu(model, name, props, lmm_constraint_new(ptask_maxmin_system, this, power_initial * power_scale),
+ 1, 0, 0)
+{
+ p_power.scale = power_scale;
+ xbt_assert(p_power.scale > 0, "Power has to be >0");
+
+ m_powerCurrent = power_initial;
+ if (power_trace)
+ p_power.event = tmgr_history_add_trace(history, power_trace, 0.0, 0, static_cast<ResourcePtr>(this));