/* @brief Remove a constraint * Currently this is dead code, but it is exposed in maxmin.h * Apparently, this call was designed assuming that constraint would no more have elements in it. * If not the case, assertion will fail, and you need to add calls e.g. to lmm_shrink before effectively removing it. */ inline void lmm_constraint_free(lmm_system_t sys,lmm_constraint_t cnst) { xbt_assert(!xbt_swag_size(&(cnst->active_element_set)),"Removing constraint but it still has active elements"); xbt_assert(!xbt_swag_size(&(cnst->enabled_element_set)),"Removing constraint but it still has enabled elements"); xbt_assert(!xbt_swag_size(&(cnst->disabled_element_set)),"Removing constraint but it still has disabled elements"); remove_constraint(sys, cnst); lmm_cnst_free(sys, cnst); }
XBT_INLINE void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst) { remove_constraint(sys, cnst); lmm_cnst_free(sys, cnst); }