diff --git a/src/core/Activity.c b/src/core/Activity.c index 2d460e67..2d6fd2b2 100644 --- a/src/core/Activity.c +++ b/src/core/Activity.c @@ -704,15 +704,22 @@ Altered_Activity update_activity_coeff_change(Activity *act, double lb, double u #endif // recompute from scratch if necessary - if (act->n_inf_min == 0 && n_inf_min_before == 1) + bool recompute_min = (act->n_inf_min == 0 && n_inf_min_before == 1); + bool recompute_max = (act->n_inf_max == 0 && n_inf_max_before == 1); + + if (recompute_max && recompute_min) { - return MIN_ALTERED_RECOMPUTE; + assert(new_coeff == 0.0); + return MIN_ALTERED_RECOMPUTE | MAX_ALTERED_RECOMPUTE; } - - if (act->n_inf_max == 0 && n_inf_max_before == 1) + else if (recompute_max) { return MAX_ALTERED_RECOMPUTE; } + else if (recompute_min) + { + return MIN_ALTERED_RECOMPUTE; + } return NO_RECOMPUTE; }