-
-inline void lmm_decrease_concurrency(lmm_constraint_t cnstr){
- xbt_assert(cnstr->concurrency_current>0);
- cnstr->concurrency_current--;
+
+inline int lmm_element_concurrency(lmm_element_t elem) {
+ //Ignore element with weight less than one (e.g. cross-traffic)
+ return (elem->value>=1)?1:0;
+ //There are other alternatives, but they will change the behaviour of the model..
+ //So do not use it unless you want to make a new model.
+ //If you do, remember to change the variables concurrency share to reflect it.
+ //Potential examples are:
+ //return (elem->weight>0)?1:0;//Include element as soon as weight is non-zero
+ //return (int)ceil(elem->weight);//Include element as the rounded-up integer value of the element weight
+}
+
+inline void lmm_decrease_concurrency(lmm_element_t elem) {
+ xbt_assert(elem->constraint->concurrency_current>=lmm_element_concurrency(elem));
+ elem->constraint->concurrency_current-=lmm_element_concurrency(elem);