- cnst = new s_lmm_constraint_t();
- cnst->id = id;
- cnst->id_int = Global_const_debug_id++;
- xbt_swag_init(&(cnst->enabled_element_set), xbt_swag_offset(elem, enabled_element_set_hookup));
- xbt_swag_init(&(cnst->disabled_element_set), xbt_swag_offset(elem, disabled_element_set_hookup));
- xbt_swag_init(&(cnst->active_element_set), xbt_swag_offset(elem, active_element_set_hookup));
-
- cnst->bound = bound_value;
- cnst->concurrency_maximum=0;
- cnst->concurrency_current=0;
- cnst->concurrency_limit = sg_concurrency_limit;
- cnst->usage = 0;
- cnst->sharing_policy = 1; /* FIXME: don't hardcode the value */
- insert_constraint(cnst);
-
- return cnst;
-}
-
-int lmm_constraint_concurrency_limit_get(lmm_constraint_t cnst)
-{
- return cnst->concurrency_limit;
-}
-
-void lmm_constraint_concurrency_limit_set(lmm_constraint_t cnst, int concurrency_limit)
-{
- xbt_assert(concurrency_limit<0 || cnst->concurrency_maximum<=concurrency_limit,
- "New concurrency limit should be larger than observed concurrency maximum. Maybe you want to call"
- " lmm_constraint_concurrency_maximum_reset() to reset the maximum?");
- cnst->concurrency_limit = concurrency_limit;
-}
-
-void lmm_constraint_concurrency_maximum_reset(lmm_constraint_t cnst)
-{
- cnst->concurrency_maximum = 0;
+ id_int = Global_debug_id++;
+ xbt_swag_init(&enabled_element_set, xbt_swag_offset(elem, enabled_element_set_hookup));
+ xbt_swag_init(&disabled_element_set, xbt_swag_offset(elem, disabled_element_set_hookup));
+ xbt_swag_init(&active_element_set, xbt_swag_offset(elem, active_element_set_hookup));
+
+ remaining = 0.0;
+ usage = 0.0;
+ concurrency_limit = sg_concurrency_limit;
+ concurrency_current = 0;
+ concurrency_maximum = 0;
+ sharing_policy = 1; /* FIXME: don't hardcode the value */
+
+ lambda = 0.0;
+ new_lambda = 0.0;
+ cnst_light = nullptr;