+double WorkstationL07::getConsumedEnergy()
+{
+ XBT_DEBUG("[ws_get_consumed_energy] Not implemented for workstation_ptask_L07");
+ return 0.0;
+}
+
+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));
+ else
+ p_power.event = NULL;
+
+ setState(state_initial);
+ if (state_trace)
+ p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+}
+
+LinkL07::LinkL07(NetworkL07ModelPtr model, const char* name, xbt_dict_t props,
+ double bw_initial,
+ tmgr_trace_t bw_trace,
+ double lat_initial,
+ tmgr_trace_t lat_trace,
+ e_surf_resource_state_t state_initial,
+ tmgr_trace_t state_trace,
+ e_surf_link_sharing_policy_t policy)
+ : NetworkLink(model, name, props, lmm_constraint_new(ptask_maxmin_system, this, bw_initial), history, state_trace)
+{
+ m_bwCurrent = bw_initial;
+ if (bw_trace)
+ p_bwEvent = tmgr_history_add_trace(history, bw_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+
+ setState(state_initial);
+ m_latCurrent = lat_initial;
+
+ if (lat_trace)
+ p_latEvent = tmgr_history_add_trace(history, lat_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+
+ if (policy == SURF_LINK_FATPIPE)
+ lmm_constraint_shared(getConstraint());