- double_update(&(cnst->remaining), elem->value * var->value);
- double_update(&(cnst->usage), elem->value / var->weight);
- if(cnst->usage<=0 || cnst->remaining<=0) {
+ //Remember: shared constraints require that sum(elem->value * var->value) < cnst->bound
+ double_update(&(cnst->remaining), elem->value * var->value, cnst->bound*sg_maxmin_precision);
+ double_update(&(cnst->usage), elem->value / var->weight, sg_maxmin_precision);
+ //If the constraint is saturated, remove it from the set of active constraints (light_tab)
+ if(!double_positive(cnst->usage,sg_maxmin_precision) || !double_positive(cnst->remaining,cnst->bound*sg_maxmin_precision)) {