- e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
- xbt_dict_t properties)
-: Cpu(model, name, properties,
- lmm_constraint_new(model->getMaxminSystem(), this, core * speedScale * xbt_dynar_get_as(speedPeak, pstate, double)),
- core, xbt_dynar_get_as(speedPeak, pstate, double), speedScale,
- stateInitial) {
- p_speedEvent = NULL;
-
- // Copy the power peak array:
- p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
- unsigned long n = xbt_dynar_length(speedPeak);
- for (unsigned long i = 0; i != n; ++i) {
- double value = xbt_dynar_get_as(speedPeak, i, double);
- xbt_dynar_push(p_speedPeakList, &value);
- }
-
- m_pstate = pstate;
+ int initiallyOn, tmgr_trace_t stateTrace)
+: Cpu(model, host,
+ lmm_constraint_new(model->getMaxminSystem(), this, core * speedScale * xbt_dynar_get_as(speedPeak, pstate, double)),
+ speedPeak, pstate,
+ core, xbt_dynar_get_as(speedPeak, pstate, double), speedScale,
+ initiallyOn) {