lmm_constraint_new(model->getMaxminSystem(), this, core * powerScale * xbt_dynar_get_as(powerPeak, pstate, double)),
core, xbt_dynar_get_as(powerPeak, pstate, double), powerScale,
stateInitial) {
- p_powerEvent = NULL;
+ p_speedEvent = NULL;
// Copy the power peak array:
- p_powerPeakList = xbt_dynar_new(sizeof(double), nullptr);
+ p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
unsigned long n = xbt_dynar_length(powerPeak);
for (unsigned long i = 0; i != n; ++i) {
double value = xbt_dynar_get_as(powerPeak, i, double);
- xbt_dynar_push(p_powerPeakList, &value);
+ xbt_dynar_push(p_speedPeakList, &value);
}
m_pstate = pstate;
m_core = core;
if (powerTrace)
- p_powerEvent = tmgr_history_add_trace(history, powerTrace, 0.0, 0, this);
+ p_speedEvent = tmgr_history_add_trace(history, powerTrace, 0.0, 0, this);
if (stateTrace)
p_stateEvent = tmgr_history_add_trace(history, stateTrace, 0.0, 0, this);
CpuCas01::~CpuCas01(){
if (getModel() == surf_cpu_model_pm)
- xbt_dynar_free(&p_powerPeakList);
+ xbt_dynar_free(&p_speedPeakList);
}
void CpuCas01::setStateEvent(tmgr_trace_event_t stateEvent)
void CpuCas01::setPowerEvent(tmgr_trace_event_t powerEvent)
{
- p_powerEvent = powerEvent;
+ p_speedEvent = powerEvent;
}
xbt_dynar_t CpuCas01::getPowerPeakList(){
- return p_powerPeakList;
+ return p_speedPeakList;
}
int CpuCas01::getPState()
lmm_variable_t var = NULL;
lmm_element_t elem = NULL;
- if (event_type == p_powerEvent) {
+ if (event_type == p_speedEvent) {
/* TODO (Hypervisor): do the same thing for constraint_core[i] */
xbt_assert(m_core == 1, "FIXME: add power scaling code also for constraint_core[i]");
m_speedScale * m_speedPeak);
}
if (tmgr_trace_event_free(event_type))
- p_powerEvent = NULL;
+ p_speedEvent = NULL;
} else if (event_type == p_stateEvent) {
/* TODO (Hypervisor): do the same thing for constraint_core[i] */
xbt_assert(m_core == 1, "FIXME: add state change code also for constraint_core[i]");
double CpuCas01::getPowerPeakAt(int pstate_index)
{
- xbt_dynar_t plist = p_powerPeakList;
+ xbt_dynar_t plist = p_speedPeakList;
xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
return xbt_dynar_get_as(plist, pstate_index, double);
int CpuCas01::getNbPstates()
{
- return xbt_dynar_length(p_powerPeakList);
+ return xbt_dynar_length(p_speedPeakList);
}
void CpuCas01::setPstate(int pstate_index)
{
- xbt_dynar_t plist = p_powerPeakList;
+ xbt_dynar_t plist = p_speedPeakList;
xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
double new_pstate = xbt_dynar_get_as(plist, pstate_index, double);
double (CpuCas01Model::*shareResources)(double now);
void (CpuCas01Model::*updateActionsState)(double now, double delta);
- Cpu *createCpu(const char *name, xbt_dynar_t power_peak, int pstate,
- double power_scale,
- tmgr_trace_t power_trace, int core,
+ Cpu *createCpu(const char *name, xbt_dynar_t speedPeak, int pstate,
+ double speedScale,
+ tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
private:
tmgr_trace_event_t p_stateEvent;
- tmgr_trace_event_t p_powerEvent;
- xbt_dynar_t p_powerPeakList; /*< List of supported CPU capacities */
- int m_pstate; /*< Current pstate (index in the power_peak_list)*/
+ tmgr_trace_event_t p_speedEvent;
+ xbt_dynar_t p_speedPeakList; /*< List of supported CPU capacities (pstate related) */
+ int m_pstate; /*< Current pstate (index in the speedPeakList)*/
};
/**********
}
Cpu::Cpu(Model *model, const char *name, xbt_dict_t props,
- lmm_constraint_t constraint, int core, double powerPeak,
- double powerScale, e_surf_resource_state_t stateInitial)
+ lmm_constraint_t constraint, int core, double speedPeak,
+ double speedScale, e_surf_resource_state_t stateInitial)
: Resource(model, name, props, constraint, stateInitial)
, m_core(core)
- , m_speedPeak(powerPeak)
- , m_speedScale(powerScale)
+ , m_speedPeak(speedPeak)
+ , m_speedScale(speedScale)
{
/* At now, we assume that a VM does not have a multicore CPU. */
if (core > 1)
}
Cpu::Cpu(Model *model, const char *name, xbt_dict_t props,
- lmm_constraint_t constraint, int core, double powerPeak, double powerScale)
-: Cpu(model, name, props, constraint, core, powerPeak, powerScale, SURF_RESOURCE_ON)
+ lmm_constraint_t constraint, int core, double speedPeak, double speedScale)
+: Cpu(model, name, props, constraint, core, speedPeak, speedScale, SURF_RESOURCE_ON)
{}
Cpu::Cpu(Model *model, const char *name, xbt_dict_t props,
- int core, double powerPeak, double powerScale)
-: Cpu(model, name, props, core, powerPeak, powerScale, SURF_RESOURCE_ON)
+ int core, double speedPeak, double speedScale)
+: Cpu(model, name, props, core, speedPeak, speedScale, SURF_RESOURCE_ON)
{}
Cpu::~Cpu(){
* @brief Create a Cpu
*
* @param name The name of the Cpu
- * @param power_peak The power peak of this Cpu
+ * @param speedPeak The peak spead (max speed in Flops)
* @param pstate [TODO]
- * @param power_scale The power scale of this Cpu
- * @param power_trace [TODO]
+ * @param speedScale The speed scale (in [O;1] available speed from peak)
+ * @param speedTrace Trace variations
* @param core The number of core of this Cpu
* @param state_initial [TODO]
* @param state_trace [TODO]
* @param cpu_properties Dictionary of properties associated to this Cpu
*/
- virtual Cpu *createCpu(const char *name, xbt_dynar_t power_peak,
- int pstate, double power_scale,
- tmgr_trace_t power_trace, int core,
+ virtual Cpu *createCpu(const char *name, xbt_dynar_t speedPeak,
+ int pstate, double speedScale,
+ tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties)=0;
* @param props Dictionary of properties associated to this Cpu
* @param constraint The lmm constraint associated to this Cpu if it is part of a LMM component
* @param core The number of core of this Cpu
- * @param powerPeak The power peak of this Cpu
- * @param powerScale The power scale of this Cpu
+ * @param speedPeak The speed peak of this Cpu
+ * @param speedScale The speed scale of this Cpu
*/
Cpu(Model *model, const char *name, xbt_dict_t props,
- lmm_constraint_t constraint, int core, double powerPeak, double powerScale,
+ lmm_constraint_t constraint, int core, double speedPeak, double speedScale,
e_surf_resource_state_t stateInitial);
/**
* @param name The name of the Cpu
* @param props Dictionary of properties associated to this Cpu
* @param core The number of core of this Cpu
- * @param powerPeak The power peak of this Cpu in [TODO]
- * @param powerScale The power scale of this Cpu in [TODO]
+ * @param speedPeak The speed peak of this Cpu in flops (max speed)
+ * @param speedScale The speed scale of this Cpu in [0;1] (available amount)
*/
Cpu(Model *model, const char *name, xbt_dict_t props,
- int core, double powerPeak, double powerScale,
+ int core, double speedPeak, double speedScale,
e_surf_resource_state_t stateInitial);
Cpu(Model *model, const char *name, xbt_dict_t props,
- lmm_constraint_t constraint, int core, double powerPeak, double powerScale);
+ lmm_constraint_t constraint, int core, double speedPeak, double speedScale);
Cpu(Model *model, const char *name, xbt_dict_t props,
- int core, double powerPeak, double powerScale);
+ int core, double speedPeak, double speedScale);
~Cpu();
*/
virtual Action *sleep(double duration)=0;
- /** @brief Get the number of cores of the current Cpu */
+ /** @brief Get the amount of cores */
virtual int getCore();
- /** @brief Get the speed of the current Cpu */
+ /** @brief Get the speed, accounting for the trace load and provided process load instead of the real current one */
virtual double getSpeed(double load);
/** @brief Get the available speed of the current Cpu */
* Trace *
*********/
-CpuTiTrace::CpuTiTrace(tmgr_trace_t power_trace)
+CpuTiTrace::CpuTiTrace(tmgr_trace_t speedTrace)
{
s_tmgr_event_t val;
unsigned int cpt;
double time = 0;
int i = 0;
p_timePoints = (double*) xbt_malloc0(sizeof(double) *
- (xbt_dynar_length(power_trace->s_list.event_list) + 1));
+ (xbt_dynar_length(speedTrace->s_list.event_list) + 1));
p_integral = (double*) xbt_malloc0(sizeof(double) *
- (xbt_dynar_length(power_trace->s_list.event_list) + 1));
- m_nbPoints = xbt_dynar_length(power_trace->s_list.event_list) + 1;
- xbt_dynar_foreach(power_trace->s_list.event_list, cpt, val) {
+ (xbt_dynar_length(speedTrace->s_list.event_list) + 1));
+ m_nbPoints = xbt_dynar_length(speedTrace->s_list.event_list) + 1;
+ xbt_dynar_foreach(speedTrace->s_list.event_list, cpt, val) {
p_timePoints[i] = time;
p_integral[i] = integral;
integral += val.delta * val.value;
}
/**
-* \brief Auxiliary function to update the CPU power scale.
+* \brief Auxiliary function to update the CPU speed scale.
*
-* This function uses the trace structure to return the power scale at the determined time a.
-* \param trace Trace structure to search the updated power scale
+* This function uses the trace structure to return the speed scale at the determined time a.
+* \param trace Trace structure to search the updated speed scale
* \param a Time
-* \return CPU power scale
+* \return CPU speed scale
*/
double CpuTiTgmr::getPowerScale(double a)
{
reduced_a = a - floor(a / m_lastTime) * m_lastTime;
point = p_trace->binarySearch(p_trace->p_timePoints, reduced_a, 0,
p_trace->m_nbPoints - 1);
- xbt_dynar_get_cpy(p_powerTrace->s_list.event_list, point, &val);
+ xbt_dynar_get_cpy(p_speedTrace->s_list.event_list, point, &val);
return val.value;
}
/**
* \brief Creates a new integration trace from a tmgr_trace_t
*
-* \param power_trace CPU availability trace
-* \param value Percentage of CPU power available (useful to fixed tracing)
+* \param speedTrace CPU availability trace
+* \param value Percentage of CPU speed available (useful to fixed tracing)
* \param spacing Initial spacing
* \return Integration trace structure
*/
-CpuTiTgmr::CpuTiTgmr(tmgr_trace_t power_trace, double value)
+CpuTiTgmr::CpuTiTgmr(tmgr_trace_t speedTrace, double value)
{
double total_time = 0.0;
s_tmgr_event_t val;
p_trace = 0;
/* no availability file, fixed trace */
- if (!power_trace) {
+ if (!speedTrace) {
m_type = TRACE_FIXED;
m_value = value;
XBT_DEBUG("No availability trace. Constant value = %f", value);
}
/* only one point available, fixed trace */
- if (xbt_dynar_length(power_trace->s_list.event_list) == 1) {
- xbt_dynar_get_cpy(power_trace->s_list.event_list, 0, &val);
+ if (xbt_dynar_length(speedTrace->s_list.event_list) == 1) {
+ xbt_dynar_get_cpy(speedTrace->s_list.event_list, 0, &val);
m_type = TRACE_FIXED;
m_value = val.value;
return;
}
m_type = TRACE_DYNAMIC;
- p_powerTrace = power_trace;
+ p_speedTrace = speedTrace;
/* count the total time of trace file */
- xbt_dynar_foreach(power_trace->s_list.event_list, cpt, val) {
+ xbt_dynar_foreach(speedTrace->s_list.event_list, cpt, val) {
total_time += val.delta;
}
- p_trace = new CpuTiTrace(power_trace);
+ p_trace = new CpuTiTrace(speedTrace);
m_lastTime = total_time;
m_total = p_trace->integrateSimple(0, total_time);
}
Cpu *CpuTiModel::createCpu(const char *name,
- xbt_dynar_t powerPeak,
+ xbt_dynar_t speedPeak,
int pstate,
- double powerScale,
- tmgr_trace_t powerTrace,
+ double speedScale,
+ tmgr_trace_t speedTrace,
int core,
e_surf_resource_state_t stateInitial,
tmgr_trace_t stateTrace,
{
xbt_assert(core==1,"Multi-core not handled with this model yet");
sg_host_t host = sg_host_by_name(name);
- xbt_assert(xbt_dynar_getfirst_as(powerPeak, double) > 0.0,
- "Power has to be >0.0. Did you forget to specify the mandatory power attribute?");
- CpuTi *cpu = new CpuTi(this, name, powerPeak, pstate, powerScale, powerTrace,
+ xbt_assert(xbt_dynar_getfirst_as(speedPeak, double) > 0.0,
+ "Speed has to be >0.0. Did you forget to specify the mandatory speed attribute?");
+ CpuTi *cpu = new CpuTi(this, name, speedPeak, pstate, speedScale, speedTrace,
core, stateInitial, stateTrace, cpuProperties);
sg_host_surfcpu_register(host, cpu);
return cpu;
xbt_assert(cpu, "Host %s undefined", elm);
xbt_assert(trace, "Trace %s undefined", trace_name);
- XBT_DEBUG("Add power trace: %s to CPU(%s)", trace_name, elm);
+ XBT_DEBUG("Add speed trace: %s to CPU(%s)", trace_name, elm);
if (cpu->p_availTrace)
delete cpu->p_availTrace;
if (val.delta == 0) {
tmgr_trace_t empty_trace;
empty_trace = tmgr_empty_trace_new();
- cpu->p_powerEvent =
+ cpu->p_speedEvent =
tmgr_history_add_trace(history, empty_trace,
cpu->p_availTrace->m_lastTime, 0, cpu);
}
/************
* Resource *
************/
-CpuTi::CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t powerPeak,
- int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
+CpuTi::CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t speedPeak,
+ int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
xbt_dict_t properties)
- : Cpu(model, name, properties, core, 0, powerScale, stateInitial)
+ : Cpu(model, name, properties, core, 0, speedScale, stateInitial)
{
- p_powerEvent = NULL;
- m_speedScale = powerScale;
+ p_speedEvent = NULL;
+ m_speedScale = speedScale;
m_core = core;
tmgr_trace_t empty_trace;
s_tmgr_event_t val;
xbt_assert(core==1,"Multi-core not handled with this model yet");
- XBT_DEBUG("power scale %f", powerScale);
- p_availTrace = new CpuTiTgmr(powerTrace, powerScale);
+ XBT_DEBUG("speed scale %f", speedScale);
+ p_availTrace = new CpuTiTgmr(speedTrace, speedScale);
p_actionSet = new ActionTiList();
m_lastUpdate = 0;
- xbt_dynar_get_cpy(powerPeak, 0, &m_speedPeak);
+ xbt_dynar_get_cpy(speedPeak, 0, &m_speedPeak);
XBT_DEBUG("CPU create: peak=%f", m_speedPeak);
if (stateTrace)
p_stateEvent = tmgr_history_add_trace(history, stateTrace, 0.0, 0, this);
- if (powerTrace && xbt_dynar_length(powerTrace->s_list.event_list) > 1) {
+ if (speedTrace && xbt_dynar_length(speedTrace->s_list.event_list) > 1) {
// add a fake trace event if periodicity == 0
- xbt_dynar_get_cpy(powerTrace->s_list.event_list,
- xbt_dynar_length(powerTrace->s_list.event_list) - 1, &val);
+ xbt_dynar_get_cpy(speedTrace->s_list.event_list,
+ xbt_dynar_length(speedTrace->s_list.event_list) - 1, &val);
if (val.delta == 0) {
empty_trace = tmgr_empty_trace_new();
- p_powerEvent =
+ p_speedEvent =
tmgr_history_add_trace(history, empty_trace,
p_availTrace->m_lastTime, 0, this);
}
{
CpuTiAction *action;
- if (event_type == p_powerEvent) {
- tmgr_trace_t power_trace;
+ if (event_type == p_speedEvent) {
+ tmgr_trace_t speedTrace;
CpuTiTgmr *trace;
s_tmgr_event_t val;
modified(true);
- power_trace = p_availTrace->p_powerTrace;
- xbt_dynar_get_cpy(power_trace->s_list.event_list,
- xbt_dynar_length(power_trace->s_list.event_list) - 1, &val);
+ speedTrace = p_availTrace->p_speedTrace;
+ xbt_dynar_get_cpy(speedTrace->s_list.event_list,
+ xbt_dynar_length(speedTrace->s_list.event_list) - 1, &val);
/* free old trace */
delete p_availTrace;
m_speedScale = val.value;
p_availTrace = trace;
if (tmgr_trace_event_free(event_type))
- p_powerEvent = NULL;
+ p_speedEvent = NULL;
} else if (event_type == p_stateEvent) {
if (value > 0) {
double m_total; /*< Integral total between 0 and last_pointn */
CpuTiTrace *p_trace;
- tmgr_trace_t p_powerTrace;
+ tmgr_trace_t p_speedTrace;
};
/**********
class CpuTi : public Cpu {
public:
CpuTi() {};
- CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t powerPeak,
- int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
+ CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t speedPeak,
+ int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
xbt_dict_t properties) ;
~CpuTi();
CpuTiTgmr *p_availTrace; /*< Structure with data needed to integrate trace file */
tmgr_trace_event_t p_stateEvent; /*< trace file with states events (ON or OFF) */
- tmgr_trace_event_t p_powerEvent; /*< trace file with availability events */
+ tmgr_trace_event_t p_speedEvent; /*< trace file with availability events */
ActionTiList *p_actionSet; /*< set with all actions running on cpu */
double m_sumPriority; /*< the sum of actions' priority that are running on cpu */
double m_lastUpdate; /*< last update of actions' remaining amount done */
public:
CpuTiModel();
~CpuTiModel();
- Cpu *createCpu(const char *name, xbt_dynar_t powerPeak,
- int pstate, double power_scale,
- tmgr_trace_t power_trace, int core,
+ Cpu *createCpu(const char *name, xbt_dynar_t speedPeak,
+ int pstate, double speedScale,
+ tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
xbt_assert(host, "Host %s undefined", elm);
xbt_assert(trace, "Trace %s undefined", trace_name);
- host->p_powerEvent = tmgr_history_add_trace(history, trace, 0.0, 0, host);
+ host->p_speedEvent = tmgr_history_add_trace(history, trace, 0.0, 0, host);
}
/* Connect traces relative to network */
}
CpuL07::CpuL07(CpuL07Model *model, const char* name, xbt_dict_t props,
- double power_initial, double power_scale, tmgr_trace_t power_trace,
+ double speedInitial, double speedScale, tmgr_trace_t speedTrace,
int core, 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),
- core, power_initial, power_scale, state_initial)
+ : Cpu(model, name, props, lmm_constraint_new(ptask_maxmin_system, this, speedInitial * speedScale),
+ core, speedInitial, speedScale, state_initial)
{
xbt_assert(m_speedScale > 0, "Power has to be >0");
- if (power_trace)
- p_powerEvent = tmgr_history_add_trace(history, power_trace, 0.0, 0, this);
+ if (speedTrace)
+ p_speedEvent = tmgr_history_add_trace(history, speedTrace, 0.0, 0, this);
else
- p_powerEvent = NULL;
+ p_speedEvent = NULL;
if (state_trace)
p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, this);
void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double /*date*/){
XBT_DEBUG("Updating cpu %s (%p) with value %g", getName(), this, value);
- if (event_type == p_powerEvent) {
+ if (event_type == p_speedEvent) {
m_speedScale = value;
lmm_update_constraint_bound(ptask_maxmin_system, getConstraint(), m_speedPeak * m_speedScale);
if (tmgr_trace_event_free(event_type))
- p_powerEvent = NULL;
+ p_speedEvent = NULL;
} else if (event_type == p_stateEvent) {
if (value > 0)
setState(SURF_RESOURCE_ON);
public:
CpuL07Model(HostL07Model *hmodel) : CpuModel() {p_hostModel = hmodel;};
~CpuL07Model() {surf_cpu_model_pm = NULL;};
- Cpu *createCpu(const char *name, xbt_dynar_t powerPeak,
- int pstate, double power_scale,
- tmgr_trace_t power_trace, int core,
+ Cpu *createCpu(const char *name, xbt_dynar_t speedPeak,
+ int pstate, double speedScale,
+ tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
class CpuL07 : public Cpu {
friend void HostL07Model::addTraces();
tmgr_trace_event_t p_stateEvent;
- tmgr_trace_event_t p_powerEvent;
+ tmgr_trace_event_t p_speedEvent;
public:
CpuL07(CpuL07Model *model, const char* name, xbt_dict_t properties,
double power_scale, double power_initial, tmgr_trace_t power_trace,
}
xbt_dynar_foreach(route, i, _link) {
link = static_cast<NetworkCm02Link*>(_link);
- double bb = bandwidthFactor(size) * link->getBandwidth(); //(link->p_power.peak * link->p_power.scale);
+ double bb = bandwidthFactor(size) * link->getBandwidth();
bandwidth_bound =
(bandwidth_bound < 0.0) ? bb : min(bandwidth_bound, bb);
}
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
- link->p_power.event = tmgr_history_add_trace(history, trace, 0.0, 0, link);
+ link->p_speed.event = tmgr_history_add_trace(history, trace, 0.0, 0, link);
}
xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
{
setState(state_init);
- p_power.scale = 1.0;
- p_power.peak = metric_peak;
+ p_speed.scale = 1.0;
+ p_speed.peak = metric_peak;
if (metric_trace)
- p_power.event = tmgr_history_add_trace(history, metric_trace, 0.0, 0, this);
+ p_speed.event = tmgr_history_add_trace(history, metric_trace, 0.0, 0, this);
else
- p_power.event = NULL;
+ p_speed.event = NULL;
m_latCurrent = lat_initial;
if (lat_trace)
/* "%g" " for event %p\n", surf_get_clock(), nw_link->name, */
/* value, event_type); */
- if (event_type == p_power.event) {
+ if (event_type == p_speed.event) {
updateBandwidth(value, date);
if (tmgr_trace_event_free(event_type))
- p_power.event = NULL;
+ p_speed.event = NULL;
} else if (event_type == p_latEvent) {
updateLatency(value, date);
if (tmgr_trace_event_free(event_type))
void NetworkCm02Link::updateBandwidth(double value, double date){
double delta = sg_weight_S_parameter / value - sg_weight_S_parameter /
- (p_power.peak * p_power.scale);
+ (p_speed.peak * p_speed.scale);
lmm_variable_t var = NULL;
lmm_element_t elem = NULL;
lmm_element_t nextelem = NULL;
NetworkCm02Action *action = NULL;
- p_power.peak = value;
+ p_speed.peak = value;
lmm_update_constraint_bound(getModel()->getMaxminSystem(),
getConstraint(),
sg_bandwidth_factor *
- (p_power.peak * p_power.scale));
- TRACE_surf_link_set_bandwidth(date, getName(), sg_bandwidth_factor * p_power.peak * p_power.scale);
+ (p_speed.peak * p_speed.scale));
+ TRACE_surf_link_set_bandwidth(date, getName(), sg_bandwidth_factor * p_speed.peak * p_speed.scale);
if (sg_weight_S_parameter > 0) {
while ((var = lmm_get_var_from_cnst_safe(getModel()->getMaxminSystem(), getConstraint(), &elem, &nextelem, &numelem))) {
action = (NetworkCm02Action*) lmm_variable_id(var);
double Link::getBandwidth()
{
- return p_power.peak * p_power.scale;
+ return p_speed.peak * p_speed.scale;
}
int Link::sharingPolicy()
/* LMM */
tmgr_trace_event_t p_stateEvent = NULL;
- s_surf_metric_t p_power;
+ s_surf_metric_t p_speed;
/* User data */
public: