Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bug fix. The date given when updating the state of a resource was incorrect. It could...
[simgrid.git] / src / surf / surf.c
index 335351e..8a1b6dd 100644 (file)
@@ -612,7 +612,7 @@ double surf_solve(double max_date)
 
     if ((min == -1.0) || (next_event_date > NOW + min)) break;
 
-    XBT_DEBUG("Updating models");
+    XBT_DEBUG("Updating models (min = %g, NOW = %g, next_event_date = %g)",min, NOW, next_event_date);
     while ((event =
             tmgr_history_get_next_event_leq(history, next_event_date,
                                             &value,
@@ -629,7 +629,7 @@ double surf_solve(double max_date)
              resource->model->name, min);
       resource->model->model_private->update_resource_state(resource,
                                                             event, value,
-                                                            NOW + min);
+                                                            next_event_date);
     }
   } while (1);