Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Taking in account the fact that some resource may have no action terminated.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2004 22:01:45 +0000 (22:01 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2004 22:01:45 +0000 (22:01 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@539 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/surf.c

index 41648de..8d6ce0c 100644 (file)
@@ -114,7 +114,7 @@ xbt_heap_float_t surf_solve(void)
 
   xbt_dynar_foreach (resource_list,i,resource) {
     resource_next_action_end = resource->common_private->share_resources(NOW);
 
   xbt_dynar_foreach (resource_list,i,resource) {
     resource_next_action_end = resource->common_private->share_resources(NOW);
-    if((min<0) || (resource_next_action_end<min)) 
+    if(((min<0.0) || (resource_next_action_end<min)) && (resource_next_action_end>=0.0))
       min = resource_next_action_end;
   }
 
       min = resource_next_action_end;
   }