- if(action->rate<0)
- lmm_update_variable_bound(maxmin_system, action->variable,
- SG_TCP_CTE_GAMMA / action->lat_current);
- else
- lmm_update_variable_bound(maxmin_system, action->variable,
- min(action->rate,SG_TCP_CTE_GAMMA / action->lat_current));
-
- if(route_size == 0) {
- action_change_state((surf_action_t) action, SURF_ACTION_DONE);
+ if(action->rate<0) {
+ if(action->lat_current>0)
+ lmm_update_variable_bound(maxmin_system, action->variable,
+ SG_TCP_CTE_GAMMA / (2.0 * action->lat_current));
+ else
+ lmm_update_variable_bound(maxmin_system, action->variable, -1.0);
+ } else {
+ if(action->lat_current>0)
+ lmm_update_variable_bound(maxmin_system, action->variable,
+ min(action->rate,SG_TCP_CTE_GAMMA / (2.0 * action->lat_current)));
+ else
+ lmm_update_variable_bound(maxmin_system, action->variable, action->rate);