+ XBT_DEBUG
+ ("Before share resources, the size of modified actions set is %d",
+ xbt_swag_size(model->model_private->modified_set));
+
+ lmm_solve(model->model_private->maxmin_system);
+
+ XBT_DEBUG
+ ("After share resources, The size of modified actions set is %d",
+ xbt_swag_size(model->model_private->modified_set));
+
+ while((action = xbt_swag_extract(model->model_private->modified_set))) {
+ int max_dur_flag = 0;
+
+ if (action->generic_action.state_set !=
+ model->states.running_action_set)
+ continue;
+
+ /* bogus priority, skip it */
+ if (action->generic_action.priority <= 0)
+ continue;
+
+ generic_update_action_remaining_lazy(action,now);
+
+ min = -1;
+ value = lmm_variable_getvalue(action->variable);
+ if (value > 0) {
+ if (action->generic_action.remains > 0) {
+ value = action->generic_action.remains / value;
+ min = now + value;
+ } else {
+ value = 0.0;
+ min = now;
+ }
+ }
+
+ if ((action->generic_action.max_duration != NO_MAX_DURATION)
+ && (min == -1
+ || action->generic_action.start +
+ action->generic_action.max_duration < min)) {
+ min = action->generic_action.start +
+ action->generic_action.max_duration;
+ max_dur_flag = 1;
+ }