double sg_bandwidth_factor = 1.0; /* default value; can be set by model or from command line */
double sg_weight_S_parameter = 0.0; /* default value; can be set by model or from command line */
-double sg_tcp_gamma = 0.0;
int sg_network_crosstraffic = 0;
/************************************************************************/
if (action->rate_ < 0) {
get_maxmin_system()->update_variable_bound(
- action->get_variable(), (action->lat_current_ > 0) ? sg_tcp_gamma / (2.0 * action->lat_current_) : -1.0);
+ action->get_variable(), (action->lat_current_ > 0) ? cfg_tcp_gamma / (2.0 * action->lat_current_) : -1.0);
} else {
get_maxmin_system()->update_variable_bound(
action->get_variable(), (action->lat_current_ > 0)
- ? std::min(action->rate_, sg_tcp_gamma / (2.0 * action->lat_current_))
+ ? std::min(action->rate_, cfg_tcp_gamma / (2.0 * action->lat_current_))
: action->rate_);
}
turn_on();
else {
kernel::lmm::Variable* var = nullptr;
- const_lmm_element_t elem = nullptr;
+ const kernel::lmm::Element* elem = nullptr;
double now = surf_get_clock();
turn_off();
double delta = sg_weight_S_parameter / value - sg_weight_S_parameter / (bandwidth_.peak * bandwidth_.scale);
kernel::lmm::Variable* var;
- const_lmm_element_t elem = nullptr;
- const_lmm_element_t nextelem = nullptr;
+ const kernel::lmm::Element* elem = nullptr;
+ const kernel::lmm::Element* nextelem = nullptr;
int numelem = 0;
while ((var = get_constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
NetworkCm02Action* action = static_cast<NetworkCm02Action*>(var->get_id());
{
double delta = value - latency_.peak;
kernel::lmm::Variable* var = nullptr;
- const_lmm_element_t elem = nullptr;
- const_lmm_element_t nextelem = nullptr;
+ const kernel::lmm::Element* elem = nullptr;
+ const kernel::lmm::Element* nextelem = nullptr;
int numelem = 0;
latency_.peak = value;
action->lat_current_ += delta;
action->weight_ += delta;
if (action->rate_ < 0)
- get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
- sg_tcp_gamma / (2.0 * action->lat_current_));
+ get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(), NetworkModel::cfg_tcp_gamma /
+ (2.0 * action->lat_current_));
else {
get_model()->get_maxmin_system()->update_variable_bound(
- action->get_variable(), std::min(action->rate_, sg_tcp_gamma / (2.0 * action->lat_current_)));
+ action->get_variable(), std::min(action->rate_, NetworkModel::cfg_tcp_gamma / (2.0 * action->lat_current_)));
- if (action->rate_ < sg_tcp_gamma / (2.0 * action->lat_current_)) {
+ if (action->rate_ < NetworkModel::cfg_tcp_gamma / (2.0 * action->lat_current_)) {
XBT_INFO("Flow is limited BYBANDWIDTH");
} else {
XBT_INFO("Flow is limited BYLATENCY, latency of flow is %f", action->lat_current_);