return;
}
+/* I nothing more happens, return the date at which the first action that will terminate does terminate */
+/* This returns the time for the first NETWORK action to complete */
+/* It would be nice to store this minimum somewhere so that the next function can
+ figure out whether the min comes from the network or from something else */
static double share_resources(double now)
{
s_surf_action_network_DASSF_t s_action;
return min;
}
+/* delta: by how many time units the simulation must advance */
+/* In this function: change the state of actions that terminate */
+/* The delta may not come from the network, and thus may be different (smaller)
+ than the one returned by the function above */
+/* If the delta is a network-caused min, then do not emulate any timer in the
+ network simulation, otherwise fake a timer somehow to advance the simulation of min seconds */
+
static void update_actions_state(double now, double delta)
{
double deltap = 0.0;
deltap = delta;
if (action->latency > 0) {
if (action->latency > deltap) {
- surf_double_update(&(action->latency),deltap);
+ double_update(&(action->latency),deltap);
deltap = 0.0;
} else {
- surf_double_update(&(deltap), action->latency);
+ double_update(&(deltap), action->latency);
action->latency = 0.0;
}
if ((action->latency == 0.0) && !(action->suspended))
lmm_update_variable_weight(maxmin_system, action->variable, 1.0);
}
- surf_double_update(&(action->generic_action.remains),
+ double_update(&(action->generic_action.remains),
lmm_variable_getvalue(action->variable) * deltap);
if (action->generic_action.max_duration != NO_MAX_DURATION)
- surf_double_update(&(action->generic_action.max_duration), delta);
+ double_update(&(action->generic_action.max_duration), delta);
/* if(action->generic_action.remains<.00001) action->generic_action.remains=0; */
action->generic_action.finish = surf_get_clock();
action_change_state((surf_action_t) action, SURF_ACTION_DONE);
} else { /* Need to check that none of the resource has failed */
+ /* to ignore for now */
lmm_constraint_t cnst = NULL;
int i = 0;
network_link_DASSF_t nw_link = NULL;
return;
}
+/* Called only when there is a change in trace: Useless in packet-level simulation */
static void update_resource_state(void *id,
tmgr_trace_event_t event_type,
double value)