+ } else { /* Need to check that none of the resource has failed*/
+ lmm_constraint_t cnst = NULL;
+ int tab_size = lmm_get_number_of_cnst_from_var(sys, action->variable);
+ int i=0;
+ cpu_t cpu = NULL;
+
+ while((cnst=lmm_get_cnst_from_var(sys, action->variable, i++))) {
+ cpu = lmm_constraint_id(cnst);
+ if(cpu->current_state==SURF_CPU_OFF) {
+ action_change_state((surf_action_t) action, SURF_ACTION_FAILED);
+ break;
+ }
+ }
+ }
+ }
+
+ xbt_swag_foreach_safe(action, next_action, failed_actions) {
+ lmm_variable_disable(sys, action->variable);