Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3] only update min using the return of NS3's share resources if there are active...
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 8 Sep 2011 08:16:16 +0000 (10:16 +0200)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Thu, 8 Sep 2011 14:56:11 +0000 (16:56 +0200)
src/surf/surf.c

index 218e8d5..9623d4a 100644 (file)
@@ -474,7 +474,8 @@ double surf_solve(double max_date)
       model_next_action_end = surf_network_model->model_private->share_resources(min);
 
       XBT_DEBUG("Min for NS3 : %f", model_next_action_end);
-      min = model_next_action_end;
+      if(model_next_action_end>=0.0)
+        min = model_next_action_end;
     }
 
     if (next_event_date == -1.0) break;