From: suter Date: Mon, 17 Dec 2012 15:30:12 +0000 (+0100) Subject: when the value of an event is a negative one, don't update resource X-Git-Tag: v3_9_rc1~86^2~107^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/01c70260177e586af94f9d221f9a5e616d8a504f when the value of an event is a negative one, don't update resource state during presolve. Allows to use default status up to the time (>0) of the "real" first event. --- diff --git a/src/surf/surf.c b/src/surf/surf.c index 22aeea5247..3cf22634da 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -518,9 +518,11 @@ void surf_presolve(void) tmgr_history_get_next_event_leq(history, next_event_date, &value, (void **) &resource))) { - resource->model->model_private->update_resource_state(resource, - event, value, - NOW); + if (value >= 0){ + resource->model->model_private->update_resource_state(resource, + event, value, + NOW); + } } } xbt_dynar_foreach(model_list, iter, model)