From: alegrand Date: Tue, 24 Jun 2008 13:14:42 +0000 (+0000) Subject: Fix the bug raised by Tchimou. X-Git-Tag: v3.3~307 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cafd59a301e2a958d31718427a03111f8cc1df2f?ds=sidebyside Fix the bug raised by Tchimou. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5793 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/maxmin.c b/src/surf/maxmin.c index dcb4b7064c..61be93462a 100644 --- a/src/surf/maxmin.c +++ b/src/surf/maxmin.c @@ -246,9 +246,10 @@ void lmm_expand_add(lmm_system_t sys, lmm_constraint_t cnst, if (var->cnsts[i].constraint == cnst) break; - if (i < var->cnsts_number) - var->cnsts[i].value += value; - else + if (i < var->cnsts_number) { + if(cnst->shared) var->cnsts[i].value += value; + else var->cnsts[i].value = MAX(var->cnsts[i].value,value); + } else lmm_expand(sys, cnst, var, value); }